Skip to content

Commit 9b95f72

Browse files
Add type to final/internal public/protected properties
1 parent 4d0b0db commit 9b95f72

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

Internal/NativeClientState.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,14 @@
2020
*/
2121
final class NativeClientState extends ClientState
2222
{
23-
/** @var int */
24-
public $id;
25-
/** @var int */
26-
public $maxHostConnections = \PHP_INT_MAX;
27-
/** @var int */
28-
public $responseCount = 0;
23+
public int $id;
24+
public int $maxHostConnections = \PHP_INT_MAX;
25+
public int $responseCount = 0;
2926
/** @var string[] */
30-
public $dnsCache = [];
31-
/** @var bool */
32-
public $sleep = false;
27+
public array $dnsCache = [];
28+
public bool $sleep = false;
3329
/** @var int[] */
34-
public $hosts = [];
30+
public array $hosts = [];
3531

3632
public function __construct()
3733
{

Response/StreamWrapper.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ class StreamWrapper
2525
/** @var resource|string|null */
2626
public $context;
2727

28-
/** @var HttpClientInterface */
29-
private $client;
28+
private HttpClientInterface|ResponseInterface $client;
3029

3130
private ResponseInterface $response;
3231

@@ -37,7 +36,7 @@ class StreamWrapper
3736
private $handle;
3837

3938
private bool $blocking = true;
40-
private $timeout;
39+
private ?float $timeout = null;
4140
private bool $eof = false;
4241
private int $offset = 0;
4342

0 commit comments

Comments
 (0)