Skip to content

Commit

Permalink
Merge pull request #4 from reedy/patch-1
Browse files Browse the repository at this point in the history
PHP 8.4: Fix implictly nullable parameters
  • Loading branch information
sorinsarca authored Dec 30, 2024
2 parents 9ebf1a1 + 221d564 commit 6f479b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Exception/InvalidCodePointException.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class InvalidCodePointException extends UnicodeException
* @param $codePoint
* @param Throwable|null $previous
*/
public function __construct($codePoint, Throwable $previous = null)
public function __construct($codePoint, ?Throwable $previous = null)
{
parent::__construct("Invalid code point", 0, $previous);
$this->codePoint = $codePoint;
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidStringException.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class InvalidStringException extends UnicodeException
* @param int $offset
* @param Throwable|null $previous
*/
public function __construct(string $string, int $offset = -1, Throwable $previous = null)
public function __construct(string $string, int $offset = -1, ?Throwable $previous = null)
{
parent::__construct("Invalid UTF-8 string at offset {$offset}", 0, $previous);
$this->string = $string;
Expand Down

0 comments on commit 6f479b6

Please sign in to comment.