@@ -162,6 +162,7 @@ function (string $filePath, string $prefix, string $content): string {
162162 if (!in_array ($ filePath , [
163163 'src/Testing/TestCaseSourceLocatorFactory.php ' ,
164164 'src/Testing/PHPStanTestCase.php ' ,
165+ 'vendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/ComposerSourceLocator.php ' ,
165166 ], true )) {
166167 return $ content ;
167168 }
@@ -196,10 +197,26 @@ function (string $filePath, string $prefix, string $content): string {
196197
197198 return str_replace (sprintf ('%s \\ReflectionUnionType ' , $ prefix ), 'ReflectionUnionType ' , $ content );
198199 },
200+ function (string $ filePath , string $ prefix , string $ content ): string {
201+ if (!in_array ($ filePath , [
202+ 'vendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionClass.php ' ,
203+ 'vendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionClassConstant.php ' ,
204+ 'vendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionFunction.php ' ,
205+ 'vendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionMethod.php ' ,
206+ 'vendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionObject.php ' ,
207+ 'vendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionParameter.php ' ,
208+ 'vendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionProperty.php ' ,
209+ ], true )) {
210+ return $ content ;
211+ }
212+
213+ return str_replace (sprintf ('%s \\ReturnTypeWillChange ' , $ prefix ), 'ReturnTypeWillChange ' , $ content );
214+ },
199215 function (string $ filePath , string $ prefix , string $ content ): string {
200216 if (!in_array ($ filePath , [
201217 'src/Type/TypehintHelper.php ' ,
202218 'vendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionIntersectionType.php ' ,
219+ 'vendor/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/ReflectionSourceStubber.php ' ,
203220 ], true )) {
204221 return $ content ;
205222 }
0 commit comments