Skip to content

Commit 5e9bf86

Browse files
committed
Fix fixing nodes in used traits
1 parent cda009b commit 5e9bf86

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Analyser/FileAnalyser.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ public function analyseFile(
108108
$traitNode = $node->getOriginalNode();
109109
$linesToIgnore[$scope->getFileDescription()] = $this->getLinesToIgnoreFromTokens([$traitNode]);
110110
}
111+
112+
if ($scope->isInTrait()) {
113+
$traitReflection = $scope->getTraitReflection();
114+
if ($traitReflection->getFileName() !== null) {
115+
$traitFilePath = $traitReflection->getFileName();
116+
$parserNodes = $this->parser->parseFile($traitFilePath);
117+
}
118+
}
119+
111120
if ($outerNodeCallback !== null) {
112121
$outerNodeCallback($node, $scope);
113122
}

0 commit comments

Comments
 (0)