55use PHPStan \Analyser \AnalyserResult ;
66use PHPStan \Analyser \AnalyserResultFinalizer ;
77use PHPStan \Analyser \Ignore \IgnoredErrorHelper ;
8- use PHPStan \Analyser \InternalError ;
98use PHPStan \Analyser \ResultCache \ResultCacheManagerFactory ;
109use PHPStan \Internal \BytesHelper ;
1110use PHPStan \PhpDoc \StubFilesProvider ;
1211use PHPStan \PhpDoc \StubValidator ;
1312use PHPStan \ShouldNotHappenException ;
1413use Symfony \Component \Console \Input \InputInterface ;
15- use function array_map ;
1614use function array_merge ;
1715use function count ;
1816use function is_file ;
@@ -30,7 +28,6 @@ public function __construct(
3028 private StubValidator $ stubValidator ,
3129 private ResultCacheManagerFactory $ resultCacheManagerFactory ,
3230 private IgnoredErrorHelper $ ignoredErrorHelper ,
33- private int $ internalErrorsCountLimit ,
3431 private StubFilesProvider $ stubFilesProvider ,
3532 )
3633 {
@@ -57,7 +54,6 @@ public function analyse(
5754
5855 $ ignoredErrorHelperResult = $ this ->ignoredErrorHelper ->initialize ();
5956 $ fileSpecificErrors = [];
60- $ notFileSpecificErrors = [];
6157 if (count ($ ignoredErrorHelperResult ->getErrors ()) > 0 ) {
6258 $ notFileSpecificErrors = $ ignoredErrorHelperResult ->getErrors ();
6359 $ internalErrors = [];
@@ -147,10 +143,6 @@ public function analyse(
147143 $ notFileSpecificErrors = $ ignoredErrorHelperProcessedResult ->getOtherIgnoreMessages ();
148144 $ collectedData = $ analyserResult ->getCollectedData ();
149145 $ savedResultCache = $ resultCacheResult ->isSaved ();
150- if ($ analyserResult ->hasReachedInternalErrorsCountLimit ()) {
151- $ notFileSpecificErrors [] = sprintf ('Reached internal errors count limit of %d, exiting... ' , $ this ->internalErrorsCountLimit );
152- }
153- $ notFileSpecificErrors = array_merge ($ notFileSpecificErrors , array_map (static fn (InternalError $ internalError ) => $ internalError ->getMessage (), $ internalErrors ));
154146 }
155147
156148 return new AnalysisResult (
0 commit comments