Skip to content

Commit 4157333

Browse files
committed
AnalyseApplication - cleanup
1 parent 1711429 commit 4157333

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

conf/config.neon

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,6 @@ services:
569569

570570
-
571571
class: PHPStan\Command\AnalyseApplication
572-
arguments:
573-
internalErrorsCountLimit: %internalErrorsCountLimit%
574572

575573
-
576574
class: PHPStan\Command\AnalyserRunner

src/Command/AnalyseApplication.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
use PHPStan\Analyser\AnalyserResult;
66
use PHPStan\Analyser\AnalyserResultFinalizer;
77
use PHPStan\Analyser\Ignore\IgnoredErrorHelper;
8-
use PHPStan\Analyser\InternalError;
98
use PHPStan\Analyser\ResultCache\ResultCacheManagerFactory;
109
use PHPStan\Internal\BytesHelper;
1110
use PHPStan\PhpDoc\StubFilesProvider;
1211
use PHPStan\PhpDoc\StubValidator;
1312
use PHPStan\ShouldNotHappenException;
1413
use Symfony\Component\Console\Input\InputInterface;
15-
use function array_map;
1614
use function array_merge;
1715
use function count;
1816
use 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

Comments
 (0)