Skip to content

Commit

Permalink
compatibility with php 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
liborm85 committed Oct 4, 2024
1 parent 75748b7 commit 6d00843
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Context/InfoContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function __construct(ResponseInterface $response)
$this->response = $response;
}

public function getInfo(string $type = null): mixed
public function getInfo(?string $type = null): mixed
{
return $this->response->getInfo($type);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Context/InfoContextInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
interface InfoContextInterface
{

public function getInfo(string $type = null): mixed;
public function getInfo(?string $type = null): mixed;

}
2 changes: 1 addition & 1 deletion src/LoggableHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function request(string $method, string $url, array $options = []): Respo
/**
* @param LoggableResponse|iterable<LoggableResponse> $responses
*/
public function stream(ResponseInterface|iterable $responses, float $timeout = null): ResponseStreamInterface
public function stream(ResponseInterface|iterable $responses, ?float $timeout = null): ResponseStreamInterface
{
if ($responses instanceof LoggableResponse) {
$responses = [$responses];
Expand Down
2 changes: 1 addition & 1 deletion src/Response/LoggableResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function cancel(): void
$this->logResponseContent();
}

public function getInfo(string $type = null): mixed
public function getInfo(?string $type = null): mixed
{
if (null !== $type) {
return $this->info[$type] ?? $this->response->getInfo($type);
Expand Down

0 comments on commit 6d00843

Please sign in to comment.