Skip to content

Commit

Permalink
Make implicit nullable types explicit (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas authored Mar 21, 2024
1 parent 0d729b0 commit 4d21ac9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Cookie/ResponseCookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}'");
Expand Down
2 changes: 1 addition & 1 deletion src/Http2/Http2Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4d21ac9

Please sign in to comment.