Skip to content

Commit 0548704

Browse files
committed
Fix leave anonymous class
1 parent b78d092 commit 0548704

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/phpDocumentor/Reflection/NodeVisitor/ElementNameResolver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ public function leaveNode(Node $node)
5959
case Const_::class:
6060
case Interface_::class:
6161
case Function_::class:
62-
$this->parts->pop();
62+
if (!$this->parts->isEmpty()) {
63+
$this->parts->pop();
64+
}
6365
break;
6466
}
6567
}

0 commit comments

Comments
 (0)