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:
6
6
path : ../src/Reflection/ClassConstantReflection.php
7
7
8
8
-
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\\ .$#"
10
10
count : 1
11
- path : ../src/Reflection/Php/PhpPropertyReflection .php
11
+ path : ../src/Reflection/ClassReflection .php
12
12
13
13
-
14
14
message : " #^Call to function method_exists\\ (\\ ) with ReflectionMethod and 'getTentativeReturnT…' will always evaluate to true\\ .$#"
15
15
count : 1
16
16
path : ../src/Reflection/Php/NativeBuiltinMethodReflection.php
17
17
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 23
23
"nette/utils" : " ^3.2.5" ,
24
24
"nikic/php-parser" : " 4.13.1" ,
25
25
"ondram/ci-detector" : " ^3.4.0" ,
26
- "ondrejmirtes/better-reflection" : " 4.3.80 " ,
26
+ "ondrejmirtes/better-reflection" : " 4.3.81 " ,
27
27
"phpstan/php-8-stubs" : " 0.1.36" ,
28
28
"phpstan/phpdoc-parser" : " ^1.2.0" ,
29
29
"react/child-process" : " ^0.6.4" ,
Original file line number Diff line number Diff line change @@ -521,9 +521,18 @@ public function isTrait(): bool
521
521
return $ this ->reflection ->isTrait ();
522
522
}
523
523
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
+
524
533
public function isClass (): bool
525
534
{
526
- return !$ this ->isInterface () && !$ this ->isTrait ();
535
+ return !$ this ->isInterface () && !$ this ->isTrait () && ! $ this -> isEnum () ;
527
536
}
528
537
529
538
public function isAnonymous (): bool
You can’t perform that action at this time.
0 commit comments