Skip to content

Commit

Permalink
Add tools/ directory
Browse files Browse the repository at this point in the history
With php-cs-fixer and phpstan. Also reformat one file.
  • Loading branch information
nikic committed Sep 11, 2022
1 parent 2070cb7 commit e9800cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/PhpParser/NodeTraverser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 6 additions & 0 deletions tools/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"require": {
"friendsofphp/php-cs-fixer": "^3.10",
"phpstan/phpstan": "^1.8"
}
}

0 comments on commit e9800cf

Please sign in to comment.