Skip to content

Commit 6f479b6

Browse files
authored
Merge pull request #4 from reedy/patch-1
PHP 8.4: Fix implictly nullable parameters
2 parents 9ebf1a1 + 221d564 commit 6f479b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Exception/InvalidCodePointException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class InvalidCodePointException extends UnicodeException
3030
* @param $codePoint
3131
* @param Throwable|null $previous
3232
*/
33-
public function __construct($codePoint, Throwable $previous = null)
33+
public function __construct($codePoint, ?Throwable $previous = null)
3434
{
3535
parent::__construct("Invalid code point", 0, $previous);
3636
$this->codePoint = $codePoint;

src/Exception/InvalidStringException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class InvalidStringException extends UnicodeException
3636
* @param int $offset
3737
* @param Throwable|null $previous
3838
*/
39-
public function __construct(string $string, int $offset = -1, Throwable $previous = null)
39+
public function __construct(string $string, int $offset = -1, ?Throwable $previous = null)
4040
{
4141
parent::__construct("Invalid UTF-8 string at offset {$offset}", 0, $previous);
4242
$this->string = $string;

0 commit comments

Comments
 (0)