diff --git a/src/Cookie/ResponseCookie.php b/src/Cookie/ResponseCookie.php index dedeae8..7cd3126 100644 --- a/src/Cookie/ResponseCookie.php +++ b/src/Cookie/ResponseCookie.php @@ -166,7 +166,7 @@ private static function parseDate(string $date): ?\DateTimeImmutable public function __construct( string $name, string $value = '', - CookieAttributes $attributes = null + ?CookieAttributes $attributes = null ) { if (!\preg_match('(^[^()<>@,;:\\\"/[\]?={}\x01-\x20\x7F]++$)', $name)) { throw new InvalidCookieException("Invalid cookie name: '{$name}'"); diff --git a/src/Http2/Http2Parser.php b/src/Http2/Http2Parser.php index df4fce9..866da6a 100644 --- a/src/Http2/Http2Parser.php +++ b/src/Http2/Http2Parser.php @@ -158,7 +158,7 @@ public function getReceivedFrameCount(): int return $this->receivedFrameCount; } - public function parse(string $settings = null): \Generator + public function parse(?string $settings = null): \Generator { if ($settings !== null) { $this->parseSettings($settings, \strlen($settings), self::NO_FLAG, 0);