From 50267a651aa74b81822735f6ffe882b14a1ca9f2 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sun, 21 Apr 2024 11:29:32 -0500 Subject: [PATCH] Fix implicit nullable parameters --- src/Connection/Internal/Http1Parser.php | 2 +- src/InvalidRequestException.php | 2 +- src/ParseException.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Connection/Internal/Http1Parser.php b/src/Connection/Internal/Http1Parser.php index f37c14ee..cee0482a 100644 --- a/src/Connection/Internal/Http1Parser.php +++ b/src/Connection/Internal/Http1Parser.php @@ -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; diff --git a/src/InvalidRequestException.php b/src/InvalidRequestException.php index 1cfd6753..634df580 100644 --- a/src/InvalidRequestException.php +++ b/src/InvalidRequestException.php @@ -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); diff --git a/src/ParseException.php b/src/ParseException.php index ba052386..3610a15c 100644 --- a/src/ParseException.php +++ b/src/ParseException.php @@ -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); }