Skip to content

Commit

Permalink
Fixed PHPStan issues, upgraded to level 5
Browse files Browse the repository at this point in the history
  • Loading branch information
gplanchat committed Nov 13, 2023
1 parent 83934dc commit b9264b8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 28 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/phpstan-5.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ jobs:
uses: php-actions/phpstan@v3
with:
path: src/
level: 4
level: 5
php_version: '8.2'
3 changes: 2 additions & 1 deletion src/NullRejection.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ public function initialize(): void
// NOOP
}

/** @param non-empty-array<mixed>|object $rejection */
/** @param non-empty-array<array-key, mixed>|object $rejection */
public function reject(StepCodeInterface $step, array|object $rejection, \Throwable $exception = null, string $reason = null): void
{
// NOOP
}

/** @param non-empty-array<array-key, mixed>|object $rejection */
public function rejectWithReason(StepCodeInterface $step, object|array $rejection, string $reason, \Throwable $exception = null): void
{
// NOOP
Expand Down
2 changes: 1 addition & 1 deletion src/PipelineRunnerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
interface PipelineRunnerInterface
{
/**
* @param \Iterator<array|object> $source
* @param \Iterator<int, array|object> $source
* @param \Generator<mixed, Type, ResultBucketInterface<Type>, void> $async
*
* @return \Iterator<array|object>
Expand Down
3 changes: 2 additions & 1 deletion src/RejectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ interface RejectionInterface
{
public function initialize(): void;

/** @param non-empty-array<mixed>|object $rejection */
/** @param non-empty-array<array-key, mixed>|object $rejection */
public function reject(StepCodeInterface $step, array|object $rejection, \Throwable $exception = null): void;

/** @param non-empty-array<array-key, mixed>|object $rejection */
public function rejectWithReason(StepCodeInterface $step, array|object $rejection, string $reason, \Throwable $exception = null): void;

public function teardown(): void;
Expand Down

0 comments on commit b9264b8

Please sign in to comment.