Skip to content

Commit

Permalink
Fix PHPStan level 6 errors in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Art4 committed Oct 8, 2024
1 parent 43446d5 commit 912a055
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 3 additions & 0 deletions tests/Behat/Bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public static function clean(AfterSuiteScope $scope)

private mixed $lastReturn;

/**
* @var array<mixed>
*/
private array $lastReturnAsArray;

public function __construct(string $redmineVersion)
Expand Down
8 changes: 6 additions & 2 deletions tests/Fixtures/AssertingHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ public static function create(TestCase $testCase, array $dataSet, ...$dataSets):
return $client;
}

private $testCase;
private $client;
private TestCase $testCase;
private HttpClient $client;

/**
* @var array<mixed>
*/
private $fifoStack = [];

private function __construct(TestCase $testCase, HttpClient $client)
Expand Down
8 changes: 4 additions & 4 deletions tests/Fixtures/MockClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class MockClient implements Client
{
use ClientApiTrait;

public static function create()
public static function create(): self
{
return new self();
}
Expand All @@ -35,9 +35,9 @@ public static function create()
*/
public $useOriginalGetMethod = false;

public $responseBodyMock;
public $responseCodeMock;
public $responseContentTypeMock;
public string $responseBodyMock;
public int $responseCodeMock;
public string $responseContentTypeMock;

private function __construct() {}

Expand Down

0 comments on commit 912a055

Please sign in to comment.