Skip to content

Commit

Permalink
Fixed implicitly nullable params (#6616)
Browse files Browse the repository at this point in the history
  • Loading branch information
huangdijia authored Mar 23, 2024
1 parent ce4cbf1 commit 753dbdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/GrpcClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public function write(int $streamId, $data, bool $end = false)
return $this->getHttpClient()->write($streamId, $data, $end);
}

public function recv(int $streamId, float $timeout = null)
public function recv(int $streamId, ?float $timeout = null)
{
if (! $this->isConnected() || $streamId <= 0 || ! $this->isStreamExist($streamId)) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Request extends BaseRequest
*/
public $usePipelineRead;

public function __construct(string $method, Message $argument = null, $headers = [])
public function __construct(string $method, ?Message $argument = null, $headers = [])
{
$this->method = 'POST';
$this->headers = array_replace($this->getDefaultHeaders(), $headers);
Expand Down

0 comments on commit 753dbdd

Please sign in to comment.