mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 06:18:07 +01:00
Fix NamespaceNodeVisitor to catch UseNodes even without namespace
This commit is contained in:
parent
4b4547d3cc
commit
f7646048c6
@ -44,7 +44,9 @@ final class NamespaceNodeVisitor extends NodeVisitorAbstract
|
||||
{
|
||||
$this->namespaceName = null;
|
||||
$this->namespaceNode = null;
|
||||
$this->useNodes = [];
|
||||
|
||||
// init basic use nodes for non-namespaced code
|
||||
$this->useNodes = $this->betterNodeFinder->findInstanceOf($nodes, Use_::class);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user