We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 769b9d9 commit 8fd46abCopy full SHA for 8fd46ab
src/Node.php
@@ -584,7 +584,7 @@ public function getImportTablesForCurrentScope() {
584
* @return NamespaceDefinition|null
585
*/
586
public function getNamespaceDefinition() {
587
- $namespaceDefinition = $this instanceof NamespaceDefinition
+ $namespaceDefinition = ($this instanceof NamespaceDefinition || $this instanceof SourceFileNode)
588
? $this
589
: $this->getFirstAncestor(NamespaceDefinition::class, SourceFileNode::class);
590
0 commit comments