|
7 | 7 | use Nette\Utils\Random;
|
8 | 8 | use PHPStan\Analyser\AnalyserResult;
|
9 | 9 | use PHPStan\Analyser\Error;
|
10 |
| -use PHPStan\Command\Output; |
11 | 10 | use PHPStan\Dependency\ExportedNode;
|
12 | 11 | use PHPStan\Process\ProcessHelper;
|
13 | 12 | use React\EventLoop\StreamSelectLoop;
|
@@ -53,8 +52,7 @@ public function analyse(
|
53 | 52 | ?string $projectConfigFile,
|
54 | 53 | ?string $tmpFile,
|
55 | 54 | ?string $insteadOfFile,
|
56 |
| - InputInterface $input, |
57 |
| - Output $errorOutput |
| 55 | + InputInterface $input |
58 | 56 | ): AnalyserResult
|
59 | 57 | {
|
60 | 58 | $jobs = array_reverse($schedule->getJobs());
|
@@ -133,7 +131,7 @@ public function analyse(
|
133 | 131 | $commandOptions,
|
134 | 132 | $input
|
135 | 133 | ), $loop, $this->processTimeout);
|
136 |
| - $process->start(function (array $json) use ($process, &$internalErrors, &$errors, &$dependencies, &$exportedNodes, &$jobs, $postFileCallback, &$internalErrorsCount, &$reachedInternalErrorsCountLimit, $processIdentifier, $errorOutput): void { |
| 134 | + $process->start(function (array $json) use ($process, &$internalErrors, &$errors, &$dependencies, &$exportedNodes, &$jobs, $postFileCallback, &$internalErrorsCount, &$reachedInternalErrorsCountLimit, $processIdentifier): void { |
137 | 135 | foreach ($json['errors'] as $jsonError) {
|
138 | 136 | if (is_string($jsonError)) {
|
139 | 137 | $internalErrors[] = sprintf('Internal error: %s', $jsonError);
|
@@ -177,24 +175,14 @@ public function analyse(
|
177 | 175 | }
|
178 | 176 |
|
179 | 177 | if (count($jobs) === 0) {
|
180 |
| - if ($errorOutput->isDebug()) { |
181 |
| - $errorOutput->writeLineFormatted(sprintf('Process %s ended successfully - no more jobs remaining.', $processIdentifier)); |
182 |
| - } |
183 | 178 | $this->processPool->quitProcess($processIdentifier);
|
184 | 179 | return;
|
185 | 180 | }
|
186 | 181 |
|
187 |
| - if ($errorOutput->isDebug()) { |
188 |
| - $errorOutput->writeLineFormatted(sprintf('Process %s analysis successful - queueing a new job.', $processIdentifier)); |
189 |
| - } |
190 |
| - |
191 | 182 | $job = array_pop($jobs);
|
192 | 183 | $process->request(['action' => 'analyse', 'files' => $job]);
|
193 |
| - }, $handleError, function ($exitCode, $termSignal, string $output) use (&$internalErrors, &$internalErrorsCount, $processIdentifier, $errorOutput): void { |
| 184 | + }, $handleError, function ($exitCode, string $output) use (&$internalErrors, &$internalErrorsCount, $processIdentifier): void { |
194 | 185 | $this->processPool->tryQuitProcess($processIdentifier);
|
195 |
| - if ($errorOutput->isDebug()) { |
196 |
| - $errorOutput->writeLineFormatted(sprintf('Process %s exited - exit code %s, term signal %s, output: %s', $processIdentifier, $exitCode ?? 'null', $termSignal ?? 'null', $output)); |
197 |
| - } |
198 | 186 | if ($exitCode === 0) {
|
199 | 187 | return;
|
200 | 188 | }
|
|
0 commit comments