@@ -59,35 +59,35 @@ public function testCannotHandleUnknownNode(): void
5959 /**
6060 * @dataProvider typesDataProvider
6161 */
62- public function testExtractFromReturnType (string $ expectedType , string $ method ): void
62+ public function testExtractFromFunctionReturn (string $ expectedType , string $ method ): void
6363 {
6464 $ fallbackExtractor = $ this ->createStub (TypeExtractorInterface::class);
65- $ fallbackExtractor ->method ('extractFromReturnType ' )->willReturn ('FALLBACK ' );
65+ $ fallbackExtractor ->method ('extractFromFunctionReturn ' )->willReturn ('FALLBACK ' );
6666
6767 $ extractor = new PhpstanTypeExtractor ($ fallbackExtractor );
6868 $ reflectionMethod = (new \ReflectionClass (PhpstanExtractableDummy::class))->getMethod ($ method );
6969
70- $ this ->assertSame ($ expectedType , $ extractor ->extractFromReturnType ($ reflectionMethod ));
70+ $ this ->assertSame ($ expectedType , $ extractor ->extractFromFunctionReturn ($ reflectionMethod ));
7171 }
7272
73- public function testFallbackOnVoidAndNeverReturnType (): void
73+ public function testFallbackOnVoidAndNeverFunctionReturn (): void
7474 {
7575 $ fallbackExtractor = $ this ->createStub (TypeExtractorInterface::class);
76- $ fallbackExtractor ->method ('extractFromReturnType ' )->willReturn ('FALLBACK ' );
76+ $ fallbackExtractor ->method ('extractFromFunctionReturn ' )->willReturn ('FALLBACK ' );
7777
7878 $ extractor = new PhpstanTypeExtractor ($ fallbackExtractor );
7979
8080 $ voidReflectionMethod = (new \ReflectionClass (PhpstanExtractableDummy::class))->getMethod ('void ' );
8181 $ neverReflectionMethod = (new \ReflectionClass (PhpstanExtractableDummy::class))->getMethod ('never ' );
8282
83- $ this ->assertSame ('FALLBACK ' , $ extractor ->extractFromReturnType ($ voidReflectionMethod ));
84- $ this ->assertSame ('FALLBACK ' , $ extractor ->extractFromReturnType ($ neverReflectionMethod ));
83+ $ this ->assertSame ('FALLBACK ' , $ extractor ->extractFromFunctionReturn ($ voidReflectionMethod ));
84+ $ this ->assertSame ('FALLBACK ' , $ extractor ->extractFromFunctionReturn ($ neverReflectionMethod ));
8585 }
8686
87- public function testExtractClassTypeFromFunctionReturnType (): void
87+ public function testExtractClassTypeFromFunctionFunctionReturn (): void
8888 {
8989 $ fallbackExtractor = $ this ->createStub (TypeExtractorInterface::class);
90- $ fallbackExtractor ->method ('extractFromReturnType ' )->willReturn ('FALLBACK ' );
90+ $ fallbackExtractor ->method ('extractFromFunctionReturn ' )->willReturn ('FALLBACK ' );
9191
9292 $ extractor = new PhpstanTypeExtractor ($ fallbackExtractor );
9393
@@ -96,7 +96,7 @@ public function testExtractClassTypeFromFunctionReturnType(): void
9696 return $ this ;
9797 });
9898
99- $ this ->assertSame (self ::class, $ extractor ->extractFromReturnType ($ selfReflectionFunction ));
99+ $ this ->assertSame (self ::class, $ extractor ->extractFromFunctionReturn ($ selfReflectionFunction ));
100100 }
101101
102102 /**
@@ -105,27 +105,27 @@ public function testExtractClassTypeFromFunctionReturnType(): void
105105 public function testExtractFromParameter (string $ expectedType , string $ method ): void
106106 {
107107 $ fallbackExtractor = $ this ->createStub (TypeExtractorInterface::class);
108- $ fallbackExtractor ->method ('extractFromParameter ' )->willReturn ('FALLBACK ' );
108+ $ fallbackExtractor ->method ('extractFromFunctionParameter ' )->willReturn ('FALLBACK ' );
109109
110110 $ extractor = new PhpstanTypeExtractor ($ fallbackExtractor );
111111
112112 $ reflectionParameter = (new \ReflectionClass (PhpstanExtractableDummy::class))->getMethod ($ method )->getParameters ()[0 ];
113113
114- $ this ->assertSame ($ expectedType , $ extractor ->extractFromParameter ($ reflectionParameter ));
114+ $ this ->assertSame ($ expectedType , $ extractor ->extractFromFunctionParameter ($ reflectionParameter ));
115115 }
116116
117117 public function testExtractClassTypeFromParameter (): void
118118 {
119119 $ fallbackExtractor = $ this ->createStub (TypeExtractorInterface::class);
120- $ fallbackExtractor ->method ('extractFromParameter ' )->willReturn ('FALLBACK ' );
120+ $ fallbackExtractor ->method ('extractFromFunctionParameter ' )->willReturn ('FALLBACK ' );
121121
122122 $ extractor = new PhpstanTypeExtractor ($ fallbackExtractor );
123123
124124 /** @param self $_ */
125125 $ selfReflectionFunction = new \ReflectionFunction (function ($ _ ) {
126126 });
127127
128- $ this ->assertSame (self ::class, $ extractor ->extractFromParameter ($ selfReflectionFunction ->getParameters ()[0 ]));
128+ $ this ->assertSame (self ::class, $ extractor ->extractFromFunctionParameter ($ selfReflectionFunction ->getParameters ()[0 ]));
129129 }
130130
131131 /**
0 commit comments