Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix PHPStan level 6 errors in tests
  • Loading branch information
Art4 committed Oct 8, 2024
commit 912a0550e7ce30c0be83cbe4a9cdfa79504d3092
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
Loading