5
5
use PHPStan \Analyser \AnalyserResult ;
6
6
use PHPStan \Analyser \AnalyserResultFinalizer ;
7
7
use PHPStan \Analyser \Ignore \IgnoredErrorHelper ;
8
- use PHPStan \Analyser \InternalError ;
9
8
use PHPStan \Analyser \ResultCache \ResultCacheManagerFactory ;
10
9
use PHPStan \Internal \BytesHelper ;
11
10
use PHPStan \PhpDoc \StubFilesProvider ;
12
11
use PHPStan \PhpDoc \StubValidator ;
13
12
use PHPStan \ShouldNotHappenException ;
14
13
use Symfony \Component \Console \Input \InputInterface ;
15
- use function array_map ;
16
14
use function array_merge ;
17
15
use function count ;
18
16
use function is_file ;
@@ -30,7 +28,6 @@ public function __construct(
30
28
private StubValidator $ stubValidator ,
31
29
private ResultCacheManagerFactory $ resultCacheManagerFactory ,
32
30
private IgnoredErrorHelper $ ignoredErrorHelper ,
33
- private int $ internalErrorsCountLimit ,
34
31
private StubFilesProvider $ stubFilesProvider ,
35
32
)
36
33
{
@@ -57,7 +54,6 @@ public function analyse(
57
54
58
55
$ ignoredErrorHelperResult = $ this ->ignoredErrorHelper ->initialize ();
59
56
$ fileSpecificErrors = [];
60
- $ notFileSpecificErrors = [];
61
57
if (count ($ ignoredErrorHelperResult ->getErrors ()) > 0 ) {
62
58
$ notFileSpecificErrors = $ ignoredErrorHelperResult ->getErrors ();
63
59
$ internalErrors = [];
@@ -147,10 +143,6 @@ public function analyse(
147
143
$ notFileSpecificErrors = $ ignoredErrorHelperProcessedResult ->getOtherIgnoreMessages ();
148
144
$ collectedData = $ analyserResult ->getCollectedData ();
149
145
$ 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 ));
154
146
}
155
147
156
148
return new AnalysisResult (
0 commit comments