File tree Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use BenSampo \Enum \Exceptions \InvalidEnumMemberException ;
6
6
7
+ /**
8
+ * @method static static None()
9
+ */
7
10
abstract class FlaggedEnum extends Enum
8
11
{
9
12
/**
Original file line number Diff line number Diff line change 8
8
use PHPStan \Reflection \MethodReflection ;
9
9
use PHPStan \TrinaryLogic ;
10
10
use PHPStan \Type \Generic \TemplateTypeMap ;
11
- use PHPStan \Type \ObjectType ;
11
+ use PHPStan \Type \StaticType ;
12
12
use PHPStan \Type \Type ;
13
13
14
14
class EnumMethodReflection implements MethodReflection
15
15
{
16
- /**
17
- * @var \PHPStan\Reflection\ClassReflection
18
- */
19
- private $ classReflection ;
20
-
21
- /**
22
- * @var string
23
- */
24
- private $ name ;
25
-
26
- public function __construct (ClassReflection $ classReflection , string $ name )
27
- {
28
- $ this ->classReflection = $ classReflection ;
29
- $ this ->name = $ name ;
16
+ public function __construct (
17
+ private ClassReflection $ classReflection ,
18
+ private string $ name
19
+ ) {
30
20
}
31
21
32
22
public function getDeclaringClass (): ClassReflection
@@ -68,7 +58,7 @@ public function getVariants(): array
68
58
null ,
69
59
[],
70
60
false ,
71
- new ObjectType ($ this ->classReflection -> getName () )
61
+ new StaticType ($ this ->classReflection )
72
62
),
73
63
];
74
64
}
You can’t perform that action at this time.
0 commit comments