Skip to content

Commit

Permalink
Fix ClassConstFetchCollector (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Jul 16, 2024
1 parent 5da0ca6 commit f8c1349
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Collectors/ClassConstFetchCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function processNode(Node $node, Scope $scope): ?array
if ($classReflection->hasConstant($constantName)) {
$constantReflection = $classReflection->getConstant($constantName);
$declaringClass = $constantReflection->getDeclaringClass();
if ($declaringClass->getFileName() !== $classReflection->getFileName()) {
if ($declaringClass->getName() !== $classReflection->getName()) {
return [$declaringClass->getName() . '::' . $constantName];
}

Expand Down

0 comments on commit f8c1349

Please sign in to comment.