Skip to content

Commit 912a055

Browse files
committed
Fix PHPStan level 6 errors in tests
1 parent 43446d5 commit 912a055

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

tests/Behat/Bootstrap/FeatureContext.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ public static function clean(AfterSuiteScope $scope)
7676

7777
private mixed $lastReturn;
7878

79+
/**
80+
* @var array<mixed>
81+
*/
7982
private array $lastReturnAsArray;
8083

8184
public function __construct(string $redmineVersion)

tests/Fixtures/AssertingHttpClient.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,12 @@ public static function create(TestCase $testCase, array $dataSet, ...$dataSets):
3535
return $client;
3636
}
3737

38-
private $testCase;
39-
private $client;
38+
private TestCase $testCase;
39+
private HttpClient $client;
40+
41+
/**
42+
* @var array<mixed>
43+
*/
4044
private $fifoStack = [];
4145

4246
private function __construct(TestCase $testCase, HttpClient $client)

tests/Fixtures/MockClient.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ final class MockClient implements Client
1616
{
1717
use ClientApiTrait;
1818

19-
public static function create()
19+
public static function create(): self
2020
{
2121
return new self();
2222
}
@@ -35,9 +35,9 @@ public static function create()
3535
*/
3636
public $useOriginalGetMethod = false;
3737

38-
public $responseBodyMock;
39-
public $responseCodeMock;
40-
public $responseContentTypeMock;
38+
public string $responseBodyMock;
39+
public int $responseCodeMock;
40+
public string $responseContentTypeMock;
4141

4242
private function __construct() {}
4343

0 commit comments

Comments
 (0)