Skip to content

Commit

Permalink
Fix implicit nullable parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Apr 21, 2024
1 parent f95f13c commit 50267a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Connection/Internal/Http1Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function buffer(string $data): void
/**
* @throws ParseException
*/
public function parse(string $data = null): ?Response
public function parse(?string $data = null): ?Response
{
if ($data !== null && $data !== '') {
$this->buffer .= $data;
Expand Down
2 changes: 1 addition & 1 deletion src/InvalidRequestException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ final class InvalidRequestException extends HttpException
{
private Request $request;

public function __construct(Request $request, string $message, int $code = 0, \Throwable $previous = null)
public function __construct(Request $request, string $message, int $code = 0, ?\Throwable $previous = null)
{
parent::__construct($message, $code, $previous);

Expand Down
2 changes: 1 addition & 1 deletion src/ParseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

final class ParseException extends HttpException
{
public function __construct(string $message, int $code, \Throwable $previousException = null)
public function __construct(string $message, int $code, ?\Throwable $previousException = null)
{
parent::__construct($message, $code, $previousException);
}
Expand Down

0 comments on commit 50267a6

Please sign in to comment.