We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb9d320 commit 00e3090Copy full SHA for 00e3090
src/Reflection/ClassReflection.php
@@ -608,7 +608,13 @@ public function getParentClassesNames(): array
608
609
public function hasConstant(string $name): bool
610
{
611
- return $this->getNativeReflection()->hasConstant($name);
+ if (!$this->getNativeReflection()->hasConstant($name)) {
612
+ return false;
613
+ }
614
+
615
+ $reflectionConstant = $this->getNativeReflection()->getReflectionConstant($name);
616
617
+ return $this->reflectionProvider->hasClass($reflectionConstant->getDeclaringClass()->getName());
618
}
619
620
public function getConstant(string $name): ConstantReflection
0 commit comments