Skip to content

Update PHPStan #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions phpstan-src.neon.dist
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
parameters:
level: 9
level: max
paths:
- bin/set-composer-conflicts.php
- src
ignoreErrors:
- path: src/ErrorHandler/ResetServiceErrorHandler.php
message: '#ResettableContainerInterface#'

- path: src/CpuCoreCounter.php
message: '#getNumberOfCpuCores\(\) should return#'

# https://github.com/phpstan/phpstan/issues/8222
- path: src/Process/SymfonyProcessLauncher.php
message: '#\$runningProcesses \(array<int<0, max>, .*>\) does not accept non-empty-array<int, .*>\.#'
2 changes: 1 addition & 1 deletion src/Logger/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function logItemProcessingFailed(string $item, Throwable $throwable): voi
public function logChildProcessStarted(int $index, int $pid, string $commandName): void;

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

Expand Down
3 changes: 3 additions & 0 deletions src/Process/CpuCoreCounter.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
*/
final class CpuCoreCounter
{
/**
* @var positive-int|null
*/
private static ?int $count = null;

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Process/SymfonyProcessLauncher.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ final class SymfonyProcessLauncher implements ProcessLauncher
private $processOutput;

/**
* @var array<positive-int|0, Process>
* @var array<int, Process>
*/
private array $runningProcesses = [];

Expand Down Expand Up @@ -211,8 +211,6 @@ private function freeTerminatedProcesses(): int
}

/**
* @param positive-int|0 $index
*
* @return positive-int|0
*/
private function freeProcess(int $index, Process $process): int
Expand Down