Skip to content

Commit 6067608

Browse files
Added phpstan 0.12.33+ compatibility (#14)
1 parent a5eddec commit 6067608

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Reflection/EnumMethodsClassReflectionExtension.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ class EnumMethodsClassReflectionExtension implements MethodsClassReflectionExten
1414
public function hasMethod(ClassReflection $classReflection, string $methodName): bool
1515
{
1616
if ($classReflection->isSubclassOf(Enum::class)) {
17-
$array = $classReflection->getNativeReflection()->getMethod('toArray')->invoke(null);
18-
19-
return array_key_exists($methodName, $array);
17+
return $classReflection->getNativeReflection()->hasConstant($methodName);
2018
}
2119

2220
return false;

0 commit comments

Comments
 (0)