diff --git a/src/Collectors/ClassConstFetchCollector.php b/src/Collectors/ClassConstFetchCollector.php index 8808ea2..f2e40af 100644 --- a/src/Collectors/ClassConstFetchCollector.php +++ b/src/Collectors/ClassConstFetchCollector.php @@ -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]; }