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 4eeed44 commit 99b47ffCopy full SHA for 99b47ff
src/Reflection/BetterReflection/SourceLocator/CachingVisitor.php
@@ -32,7 +32,11 @@ public function enterNode(\PhpParser\Node $node): ?int
32
33
if ($node instanceof \PhpParser\Node\Stmt\ClassLike) {
34
if ($node->name !== null) {
35
- $this->classNodes[strtolower($node->namespacedName->toString())][] = new FetchedNode(
+ $fullClassName = $node->name->toString();
36
+ if ($this->currentNamespaceNode !== null && $this->currentNamespaceNode->name !== null) {
37
+ $fullClassName = $this->currentNamespaceNode->name . '\\' . $fullClassName;
38
+ }
39
+ $this->classNodes[strtolower($fullClassName)][] = new FetchedNode(
40
$node,
41
$this->currentNamespaceNode,
42
$this->fileName
0 commit comments