File tree Expand file tree Collapse file tree 4 files changed +26
-12
lines changed Expand file tree Collapse file tree 4 files changed +26
-12
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,17 @@ parameters:
66 path : ../src/Reflection/ClassConstantReflection.php
77
88 -
9- message : " #^Call to function method_exists\\ (\\ ) with ReflectionProperty and 'isReadOnly ' will always evaluate to true\\ .$#"
9+ message : " #^Call to function method_exists\\ (\\ ) with ReflectionClass and 'isEnum ' will always evaluate to true\\ .$#"
1010 count : 1
11- path : ../src/Reflection/Php/PhpPropertyReflection .php
11+ path : ../src/Reflection/ClassReflection .php
1212
1313 -
1414 message : " #^Call to function method_exists\\ (\\ ) with ReflectionMethod and 'getTentativeReturnT…' will always evaluate to true\\ .$#"
1515 count : 1
1616 path : ../src/Reflection/Php/NativeBuiltinMethodReflection.php
1717
18+ -
19+ message : " #^Call to function method_exists\\ (\\ ) with ReflectionProperty and 'isReadOnly' will always evaluate to true\\ .$#"
20+ count : 1
21+ path : ../src/Reflection/Php/PhpPropertyReflection.php
22+
Original file line number Diff line number Diff line change 2323 "nette/utils" : " ^3.2.5" ,
2424 "nikic/php-parser" : " 4.13.1" ,
2525 "ondram/ci-detector" : " ^3.4.0" ,
26- "ondrejmirtes/better-reflection" : " 4.3.80 " ,
26+ "ondrejmirtes/better-reflection" : " 4.3.81 " ,
2727 "phpstan/php-8-stubs" : " 0.1.36" ,
2828 "phpstan/phpdoc-parser" : " ^1.2.0" ,
2929 "react/child-process" : " ^0.6.4" ,
Original file line number Diff line number Diff line change @@ -521,9 +521,18 @@ public function isTrait(): bool
521521 return $ this ->reflection ->isTrait ();
522522 }
523523
524+ public function isEnum (): bool
525+ {
526+ if (method_exists ($ this ->reflection , 'isEnum ' )) {
527+ return $ this ->reflection ->isEnum ();
528+ }
529+
530+ return false ;
531+ }
532+
524533 public function isClass (): bool
525534 {
526- return !$ this ->isInterface () && !$ this ->isTrait ();
535+ return !$ this ->isInterface () && !$ this ->isTrait () && ! $ this -> isEnum () ;
527536 }
528537
529538 public function isAnonymous (): bool
You can’t perform that action at this time.
0 commit comments