Skip to content

Commit cb876f6

Browse files
authored
Merge pull request #105 from phug-php/fix/strict-in-array
Use strict in_array checks in the lexer split: 594ea1a79de8078e9e5c0edc1440db2b574b23d0
1 parent 75ba738 commit cb876f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Phug/Cli.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function run($arguments)
9494
return false;
9595
}
9696

97-
if (!in_array($method, iterator_to_array($this->getAvailableMethods($customMethods)))) {
97+
if (!in_array($method, iterator_to_array($this->getAvailableMethods($customMethods)), true)) {
9898
echo "The method $action is not available as CLI command in the $facade facade.\n";
9999
$this->listAvailableMethods($customMethods);
100100

@@ -166,7 +166,7 @@ protected function execute($facade, $method, $arguments, $outputFile)
166166
{
167167
$callable = [$facade, $method];
168168
$arguments = array_map(function ($argument) {
169-
return in_array(substr((string) $argument, 0, 1), ['[', '{'])
169+
return in_array(substr((string) $argument, 0, 1), ['[', '{'], true)
170170
? json_decode($argument, true)
171171
: $argument;
172172
}, $arguments);

0 commit comments

Comments
 (0)