Skip to content

Commit 42a6520

Browse files
authored
Explicit nullable types (#65)
1 parent 5380167 commit 42a6520

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/BaseClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function __construct(
8383
ClientInterface $client,
8484
RequestFactoryInterface $requestFactory,
8585
StreamFactoryInterface $streamFactory,
86-
LoggerInterface $logger = null
86+
?LoggerInterface $logger = null
8787
) {
8888
$this->baseUri = $baseUri;
8989
$this->client = $client;

src/Exceptions/RequestException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class RequestException extends Exception implements RequestExceptionInterface
2222
public function __construct(
2323
string $message = '',
2424
int $code = 0,
25-
Throwable $previous = null,
26-
RequestInterface $request = null
25+
?Throwable $previous = null,
26+
?RequestInterface $request = null
2727
) {
2828
parent::__construct($message, $code, $previous);
2929

tests/unit/ClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private function getAuthenticatedClient(): Client
6161
*
6262
* @return Client
6363
*/
64-
private function getClient(ClientInterface $client = null): Client
64+
private function getClient(?ClientInterface $client = null): Client
6565
{
6666
return new Client(
6767
new Uri('http://127.0.0.1:8200'),

0 commit comments

Comments
 (0)