Skip to content

Commit 87e3801

Browse files
committed
Add don't traverse for methods and functions
phpdocumentor doesn't handle the internals of a method so we don't care about the internal iterations. Our name resolver only has to resolve FQSEN.
1 parent c1fe126 commit 87e3801

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/phpDocumentor/Reflection/NodeVisitor/ElementNameResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ public function enterNode(Node $node): ?int
9494
case Function_::class:
9595
$this->parts->push($node->name . '()');
9696
$node->fqsen = new Fqsen($this->buildName());
97-
break;
97+
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
9898
case ClassMethod::class:
9999
$this->parts->push('::' . $node->name . '()');
100100
$node->fqsen = new Fqsen($this->buildName());
101-
break;
101+
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
102102
case ClassConst::class:
103103
$this->parts->push('::');
104104
break;

0 commit comments

Comments
 (0)