Skip to content

Commit

Permalink
[Traverser] Clean up FileWithoutNamespace check on StmtKeyNodeVisitor…
Browse files Browse the repository at this point in the history
….php (#3901)
  • Loading branch information
samsonasik committed May 20, 2023
1 parent b5807b7 commit e26c80b
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,7 @@ public function enterNode(Node $node): ?Node
{
if (! $node instanceof StmtsAwareInterface) {
return null;
}

// covered on beforeTraverse() as top level node handling
if ($node instanceof FileWithoutNamespace) {
return null;
}
}

if ($node->stmts === null) {
return null;
Expand Down

0 comments on commit e26c80b

Please sign in to comment.