Skip to content

Commit 4a8a47c

Browse files
authored
Update PHPStan (#196)
1 parent 744c0b0 commit 4a8a47c

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

phpstan-src.neon.dist

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
parameters:
2-
level: 9
2+
level: max
33
paths:
44
- bin/set-composer-conflicts.php
55
- src
66
ignoreErrors:
77
- path: src/ErrorHandler/ResetServiceErrorHandler.php
88
message: '#ResettableContainerInterface#'
9-
10-
- path: src/CpuCoreCounter.php
11-
message: '#getNumberOfCpuCores\(\) should return#'
12-
13-
# https://github.com/phpstan/phpstan/issues/8222
14-
- path: src/Process/SymfonyProcessLauncher.php
15-
message: '#\$runningProcesses \(array<int<0, max>, .*>\) does not accept non-empty-array<int, .*>\.#'

src/Logger/Logger.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function logItemProcessingFailed(string $item, Throwable $throwable): voi
6060
public function logChildProcessStarted(int $index, int $pid, string $commandName): void;
6161

6262
/**
63-
* @param positive-int|0 $index Index of the process amoung the list of running processes.
63+
* @param int $index Index of the process amoung the list of running processes.
6464
*/
6565
public function logChildProcessFinished(int $index): void;
6666

src/Process/CpuCoreCounter.php

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
*/
2323
final class CpuCoreCounter
2424
{
25+
/**
26+
* @var positive-int|null
27+
*/
2528
private static ?int $count = null;
2629

2730
/**

src/Process/SymfonyProcessLauncher.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ final class SymfonyProcessLauncher implements ProcessLauncher
6363
private $processOutput;
6464

6565
/**
66-
* @var array<positive-int|0, Process>
66+
* @var array<int, Process>
6767
*/
6868
private array $runningProcesses = [];
6969

@@ -211,8 +211,6 @@ private function freeTerminatedProcesses(): int
211211
}
212212

213213
/**
214-
* @param positive-int|0 $index
215-
*
216214
* @return positive-int|0
217215
*/
218216
private function freeProcess(int $index, Process $process): int

0 commit comments

Comments
 (0)