Skip to content

Commit

Permalink
[NodeTypeResolver] Decorate trait Attribute scope from trait context (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik authored Sep 18, 2024
1 parent db5f353 commit e0c9c04
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ public function processNodes(

if ($node instanceof Trait_) {
$this->processTrait($node, $mutatingScope, $nodeCallback);
$this->decorateNodeAttrGroups($node, $mutatingScope, $nodeCallback);

return;
}
Expand Down Expand Up @@ -538,6 +537,7 @@ private function processTrait(Trait_ $trait, MutatingScope $mutatingScope, calla
if (! $this->reflectionProvider->hasClass($traitName)) {
$trait->setAttribute(AttributeKey::SCOPE, $mutatingScope);
$this->nodeScopeResolverProcessNodes($trait->stmts, $mutatingScope, $nodeCallback);
$this->decorateNodeAttrGroups($trait, $mutatingScope, $nodeCallback);

return;
}
Expand All @@ -557,5 +557,6 @@ private function processTrait(Trait_ $trait, MutatingScope $mutatingScope, calla

$trait->setAttribute(AttributeKey::SCOPE, $traitScope);
$this->nodeScopeResolverProcessNodes($trait->stmts, $traitScope, $nodeCallback);
$this->decorateNodeAttrGroups($trait, $traitScope, $nodeCallback);
}
}

0 comments on commit e0c9c04

Please sign in to comment.