File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
src/main/php/lang/reflection Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change 6
6
"description" : " Reflection" ,
7
7
"keywords" : [" module" , " xp" ],
8
8
"require" : {
9
- "xp-framework/core" : " ^10.6 " ,
9
+ "xp-framework/core" : " ^10.8 " ,
10
10
"xp-framework/ast" : " ^7.0" ,
11
11
"php" : " >=7.0.0"
12
12
},
Original file line number Diff line number Diff line change 10
10
class Type {
11
11
private $ reflect ;
12
12
private $ annotations = null ;
13
- private static $ ENUMS ;
14
-
15
- static function __static () {
16
- self ::$ ENUMS = interface_exists (\UnitEnum::class, false );
17
- }
18
13
19
14
/** @param ReflectionClass $reflect */
20
15
public function __construct ($ reflect ) {
@@ -58,7 +53,7 @@ public function kind(): Kind {
58
53
return Kind::$ INTERFACE ;
59
54
} else if ($ this ->reflect ->isTrait ()) {
60
55
return Kind::$ TRAIT ;
61
- } else if ($ this ->reflect ->isSubclassOf (Enum::class) || ( self :: $ ENUMS && $ this ->reflect ->isSubclassOf (\UnitEnum::class) )) {
56
+ } else if ($ this ->reflect ->isSubclassOf (Enum::class) || $ this ->reflect ->isSubclassOf (\UnitEnum::class)) {
62
57
return Kind::$ ENUM ;
63
58
} else {
64
59
return Kind::$ CLASS ;
You can’t perform that action at this time.
0 commit comments