Skip to content

Commit

Permalink
Dive into a trait that starts on the same line as the one in the refl…
Browse files Browse the repository at this point in the history
…ection
  • Loading branch information
ondrejmirtes committed Jun 24, 2020
1 parent 1cd97b4 commit e6dd87b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Analyser/NodeScopeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -2587,7 +2587,7 @@ private function processTraitUse(Node\Stmt\TraitUse $node, MutatingScope $classS
private function processNodesForTraitUse($node, ClassReflection $traitReflection, MutatingScope $scope, \Closure $nodeCallback): void
{
if ($node instanceof Node) {
if ($node instanceof Node\Stmt\Trait_ && $traitReflection->getName() === (string) $node->namespacedName) {
if ($node instanceof Node\Stmt\Trait_ && $traitReflection->getName() === (string) $node->namespacedName && $traitReflection->getNativeReflection()->getStartLine() === $node->getStartLine()) {
$this->processStmtNodes($node, $node->stmts, $scope->enterTrait($traitReflection), $nodeCallback);
return;
}
Expand Down

0 comments on commit e6dd87b

Please sign in to comment.