diff --git a/src/Context/InfoContext.php b/src/Context/InfoContext.php index 1fa25da..82893e7 100644 --- a/src/Context/InfoContext.php +++ b/src/Context/InfoContext.php @@ -20,7 +20,7 @@ public function __construct(ResponseInterface $response) /** * @return mixed */ - public function getInfo(string $type = null) + public function getInfo(?string $type = null) { return $this->response->getInfo($type); } diff --git a/src/Context/InfoContextInterface.php b/src/Context/InfoContextInterface.php index 4d939cf..24c9054 100644 --- a/src/Context/InfoContextInterface.php +++ b/src/Context/InfoContextInterface.php @@ -8,6 +8,6 @@ interface InfoContextInterface /** * @return mixed */ - public function getInfo(string $type = null); + public function getInfo(?string $type = null); } diff --git a/src/LoggableHttpClient.php b/src/LoggableHttpClient.php index c5c5c0a..8e92b69 100644 --- a/src/LoggableHttpClient.php +++ b/src/LoggableHttpClient.php @@ -79,7 +79,7 @@ public function request(string $method, string $url, array $options = []): Respo /** * @param LoggableResponse|iterable $responses */ - public function stream($responses, float $timeout = null): ResponseStreamInterface + public function stream($responses, ?float $timeout = null): ResponseStreamInterface { if ($responses instanceof LoggableResponse) { $responses = [$responses]; diff --git a/src/Response/LoggableResponse.php b/src/Response/LoggableResponse.php index f084ace..6cad98a 100644 --- a/src/Response/LoggableResponse.php +++ b/src/Response/LoggableResponse.php @@ -163,7 +163,7 @@ public function cancel(): void /** * @return mixed */ - public function getInfo(string $type = null) + public function getInfo(?string $type = null) { if (null !== $type) { return $this->info[$type] ?? $this->response->getInfo($type);