Skip to content

Commit

Permalink
Updated PHPSpec level from 3 to 8
Browse files Browse the repository at this point in the history
  • Loading branch information
gplanchat committed Nov 21, 2023
1 parent 488dd94 commit 86acad7
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 76 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/phpstan-6.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/phpstan-7.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/phpstan-8.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PHPStan level 5
name: PHPStan level 9
on: push
jobs:
phpstan:
Expand All @@ -19,5 +19,5 @@ jobs:
uses: php-actions/phpstan@v3
with:
path: src/
level: 5
level: 9
php_version: '8.2'
4 changes: 2 additions & 2 deletions .github/workflows/quality.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Quality
name: Quality (PHPSpec level 8)
on: push
jobs:
cs-fixer:
Expand Down Expand Up @@ -34,5 +34,5 @@ jobs:
uses: php-actions/phpstan@v3
with:
path: src/
level: 3
level: 8
php_version: '8.2'
4 changes: 4 additions & 0 deletions src/BuilderTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ protected function tearDown(): void

protected function getBuilderCompilePath(): string
{
if ($this->fs === null) {
throw new \RuntimeException('The virtual file system was not initialized. The '.__METHOD__.' method should be called after the '.get_class($this).'::setUp() method was called and after the '.get_class($this).'::tearDown() method is called.');
}

return $this->fs->url();
}

Expand Down
7 changes: 5 additions & 2 deletions src/Constraint/Pipeline/PipelineExtractsLike.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Kiboko\Component\PHPUnitExtension\Constraint\Pipeline;

use Kiboko\Contract\Bucket\ResultBucketInterface;
use Kiboko\Contract\Pipeline\ExtractorInterface;
use Kiboko\Contract\Pipeline\NullStepRejection;
use Kiboko\Contract\Pipeline\NullStepState;
Expand All @@ -26,9 +27,11 @@ public function __construct(
}

/**
* @param list<Type> $iterable
* @template ItemType
*
* @return \Iterator<Type>
* @param list<ItemType> $iterable
*
* @return \Iterator<ItemType>
*/
private function asIterator(iterable $iterable): \Iterator
{
Expand Down
2 changes: 1 addition & 1 deletion src/Mock/ApiClientMockBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class ApiClientMockBuilder implements Builder
/** @param array<Node\Arg|Node\VariadicPlaceholder> $mockedArgs */
public function __construct(
private readonly string $mockedClientBuilder,
private readonly ?array $mockedArgs = []
private readonly array $mockedArgs = []
) {
$this->node = new Node\Expr\New_(
class: new Node\Name\FullyQualified($this->mockedClientBuilder),
Expand Down

0 comments on commit 86acad7

Please sign in to comment.