From df262497b877a559bcc2772c3b8265ca9071d782 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 16 Jul 2024 13:25:32 +0200 Subject: [PATCH] Fix ClassConstFetchCollector --- src/Collectors/ClassConstFetchCollector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; }