Skip to content

Commit 6e84ff5

Browse files
Merge branch '6.4' into 7.0
* 6.4: Use typed properties in tests as much as possible
2 parents 2b35421 + a698209 commit 6e84ff5

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

Tests/AsyncDecoratorTraitTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\HttpClient\DecoratorTrait;
1616
use Symfony\Component\HttpClient\Exception\TransportException;
1717
use Symfony\Component\HttpClient\HttpClient;
18+
use Symfony\Component\HttpClient\NativeHttpClient;
1819
use Symfony\Component\HttpClient\Response\AsyncContext;
1920
use Symfony\Component\HttpClient\Response\AsyncResponse;
2021
use Symfony\Contracts\HttpClient\ChunkInterface;
@@ -40,7 +41,7 @@ protected function getHttpClient(string $testCase, \Closure $chunkFilter = null,
4041
return new class($decoratedClient ?? parent::getHttpClient($testCase), $chunkFilter) implements HttpClientInterface {
4142
use AsyncDecoratorTrait;
4243

43-
private $chunkFilter;
44+
private ?\Closure $chunkFilter;
4445

4546
public function __construct(HttpClientInterface $client, \Closure $chunkFilter = null)
4647
{

Tests/HttpClientTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
abstract class HttpClientTestCase extends BaseHttpClientTestCase
3333
{
34-
private static $vulcainStarted = false;
34+
private static bool $vulcainStarted = false;
3535

3636
public function testTimeoutOnDestruct()
3737
{

Tests/RetryableHttpClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public function testRetryWithDelay()
208208
new GenericRetryStrategy(),
209209
1,
210210
$logger = new class() extends TestLogger {
211-
public $context = [];
211+
public array $context = [];
212212

213213
public function log($level, $message, array $context = []): void
214214
{

Tests/TestLogger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class TestLogger extends AbstractLogger
1717
{
18-
public $logs = [];
18+
public array $logs = [];
1919

2020
public function log($level, $message, array $context = []): void
2121
{

0 commit comments

Comments
 (0)