1313class EnumMethodReflectionTest extends PHPStanTestCase
1414{
1515 /**
16- * @var \PHPStan\Broker\Broker
16+ * @var \PHPStan\Reflection\ReflectionProvider
1717 */
18- protected $ broker ;
18+ protected $ reflectionProvider ;
1919
2020 /**
2121 * @var EnumMethodsClassReflectionExtension
@@ -24,61 +24,61 @@ class EnumMethodReflectionTest extends PHPStanTestCase
2424
2525 public function setUp (): void
2626 {
27- $ this ->broker = $ this ->createBroker ();
27+ $ this ->reflectionProvider = $ this ->createReflectionProvider ();
2828 $ this ->reflectionExtension = new EnumMethodsClassReflectionExtension ();
2929 }
3030
3131 public function testGetName (): void
3232 {
33- $ classReflection = $ this ->broker ->getClass (VisibilityEnum::class);
33+ $ classReflection = $ this ->reflectionProvider ->getClass (VisibilityEnum::class);
3434 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
3535
3636 $ this ->assertSame ('STR ' , $ methodReflection ->getName ());
3737 }
3838
3939 public function testGetDeclaringClass (): void
4040 {
41- $ classReflection = $ this ->broker ->getClass (VisibilityEnum::class);
41+ $ classReflection = $ this ->reflectionProvider ->getClass (VisibilityEnum::class);
4242 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
4343
4444 $ this ->assertSame ($ classReflection , $ methodReflection ->getDeclaringClass ());
4545 }
4646
4747 public function testShouldBeStatic (): void
4848 {
49- $ classReflection = $ this ->broker ->getClass (VisibilityEnum::class);
49+ $ classReflection = $ this ->reflectionProvider ->getClass (VisibilityEnum::class);
5050 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
5151
5252 $ this ->assertTrue ($ methodReflection ->isStatic ());
5353 }
5454
5555 public function testShouldNotBePrivate (): void
5656 {
57- $ classReflection = $ this ->broker ->getClass (VisibilityEnum::class);
57+ $ classReflection = $ this ->reflectionProvider ->getClass (VisibilityEnum::class);
5858 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
5959
6060 $ this ->assertFalse ($ methodReflection ->isPrivate ());
6161 }
6262
6363 public function testShouldBePublic (): void
6464 {
65- $ classReflection = $ this ->broker ->getClass (VisibilityEnum::class);
65+ $ classReflection = $ this ->reflectionProvider ->getClass (VisibilityEnum::class);
6666 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
6767
6868 $ this ->assertTrue ($ methodReflection ->isPublic ());
6969 }
7070
7171 public function testGetPrototype (): void
7272 {
73- $ classReflection = $ this ->broker ->getClass (VisibilityEnum::class);
73+ $ classReflection = $ this ->reflectionProvider ->getClass (VisibilityEnum::class);
7474 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
7575
7676 $ this ->assertSame ($ methodReflection , $ methodReflection ->getPrototype ());
7777 }
7878
7979 public function testGetVariants (): void
8080 {
81- $ classReflection = $ this ->broker ->getClass (VisibilityEnum::class);
81+ $ classReflection = $ this ->reflectionProvider ->getClass (VisibilityEnum::class);
8282 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
8383 $ parametersAcceptor = ParametersAcceptorSelector::selectSingle ($ methodReflection ->getVariants ());
8484
@@ -87,7 +87,7 @@ public function testGetVariants(): void
8787
8888 public function testGetDocComment (): void
8989 {
90- $ classReflection = $ this ->broker ->getClass (DocCommentEnum::class);
90+ $ classReflection = $ this ->reflectionProvider ->getClass (DocCommentEnum::class);
9191 $ docMethodRefl = $ this ->reflectionExtension ->getMethod ($ classReflection , 'WITH_DOC_BLOCK ' );
9292 $ noDocMethodRefl = $ this ->reflectionExtension ->getMethod ($ classReflection , 'WITHOUT_DOC_BLOCK ' );
9393
@@ -103,7 +103,7 @@ public function testGetDocComment(): void
103103
104104 public function testIsDeprecated (): void
105105 {
106- $ classReflection = $ this ->broker ->getClass (DeprecatedEnum::class);
106+ $ classReflection = $ this ->reflectionProvider ->getClass (DeprecatedEnum::class);
107107 $ deprecatedRefl = $ this ->reflectionExtension ->getMethod ($ classReflection , 'DEPRECATED ' );
108108 $ notDeprecatedRefl = $ this ->reflectionExtension ->getMethod ($ classReflection , 'NOT_DEPRECATED ' );
109109
@@ -113,7 +113,7 @@ public function testIsDeprecated(): void
113113
114114 public function testGetDeprecatedDescription (): void
115115 {
116- $ classReflection = $ this ->broker ->getClass (DeprecatedEnum::class);
116+ $ classReflection = $ this ->reflectionProvider ->getClass (DeprecatedEnum::class);
117117 $ deprecatedRefl = $ this ->reflectionExtension ->getMethod ($ classReflection , 'DEPRECATED ' );
118118 $ notDeprecatedRefl = $ this ->reflectionExtension ->getMethod ($ classReflection , 'NOT_DEPRECATED ' );
119119
@@ -123,31 +123,31 @@ public function testGetDeprecatedDescription(): void
123123
124124 public function testIsFinal (): void
125125 {
126- $ classReflection = $ this ->broker ->getClass (DeprecatedEnum::class);
126+ $ classReflection = $ this ->reflectionProvider ->getClass (DeprecatedEnum::class);
127127 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
128128
129129 $ this ->assertTrue ($ methodReflection ->isFinal ()->no ());
130130 }
131131
132132 public function testIsInternal (): void
133133 {
134- $ classReflection = $ this ->broker ->getClass (DeprecatedEnum::class);
134+ $ classReflection = $ this ->reflectionProvider ->getClass (DeprecatedEnum::class);
135135 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
136136
137137 $ this ->assertTrue ($ methodReflection ->isInternal ()->no ());
138138 }
139139
140140 public function testGetThrowType (): void
141141 {
142- $ classReflection = $ this ->broker ->getClass (DeprecatedEnum::class);
142+ $ classReflection = $ this ->reflectionProvider ->getClass (DeprecatedEnum::class);
143143 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
144144
145145 $ this ->assertNull ($ methodReflection ->getThrowType ());
146146 }
147147
148148 public function testHasSideEffects (): void
149149 {
150- $ classReflection = $ this ->broker ->getClass (DeprecatedEnum::class);
150+ $ classReflection = $ this ->reflectionProvider ->getClass (DeprecatedEnum::class);
151151 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'STR ' );
152152
153153 $ this ->assertTrue ($ methodReflection ->hasSideEffects ()->no ());
0 commit comments