diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index c6fc1574ab..0d81aedb37 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -201,10 +201,10 @@ protected function traverseArray(array $nodes): array { if ($return instanceof Node) { $this->ensureReplacementReasonable($node, $return); $node = $return; - } else if (\is_array($return)) { + } elseif (\is_array($return)) { $doNodes[] = [$i, $return]; continue 2; - } else if (self::REMOVE_NODE === $return) { + } elseif (self::REMOVE_NODE === $return) { $doNodes[] = [$i, []]; continue 2; } elseif (self::DONT_TRAVERSE_CHILDREN === $return) { diff --git a/tools/composer.json b/tools/composer.json new file mode 100644 index 0000000000..d263715f3f --- /dev/null +++ b/tools/composer.json @@ -0,0 +1,6 @@ +{ + "require": { + "friendsofphp/php-cs-fixer": "^3.10", + "phpstan/phpstan": "^1.8" + } +}