Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ public function enterNode( PhpParser\Node $node ) {

$this->maxLine = $node->getStartLine();

if ( $node instanceof Namespace_ ) {
if ( $node instanceof Namespace_ && $node->name instanceof Name ) {
// as soon as there is a new namespace, we need to empty the useStatements, as there will be new ones for the given namespace
$this->useNamespace = $node->name->toString();
$this->useStatements = [];
Expand Down