@@ -162,6 +162,7 @@ function (string $filePath, string $prefix, string $content): string {
162
162
if (!in_array ($ filePath , [
163
163
'src/Testing/TestCaseSourceLocatorFactory.php ' ,
164
164
'src/Testing/PHPStanTestCase.php ' ,
165
+ 'vendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/ComposerSourceLocator.php ' ,
165
166
], true )) {
166
167
return $ content ;
167
168
}
@@ -196,10 +197,26 @@ function (string $filePath, string $prefix, string $content): string {
196
197
197
198
return str_replace (sprintf ('%s \\ReflectionUnionType ' , $ prefix ), 'ReflectionUnionType ' , $ content );
198
199
},
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
+ },
199
215
function (string $ filePath , string $ prefix , string $ content ): string {
200
216
if (!in_array ($ filePath , [
201
217
'src/Type/TypehintHelper.php ' ,
202
218
'vendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionIntersectionType.php ' ,
219
+ 'vendor/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/ReflectionSourceStubber.php ' ,
203
220
], true )) {
204
221
return $ content ;
205
222
}
0 commit comments