diff --git a/src/Key/AbstractKey.php b/src/Key/AbstractKey.php index dfa890d..7a4a59f 100644 --- a/src/Key/AbstractKey.php +++ b/src/Key/AbstractKey.php @@ -165,7 +165,7 @@ public function jsonSerialize(): array /** * @since 1.0.0 */ - public static function createFromJSON(string $json, KeyInterface $prototype = null): KeyInterface + public static function createFromJSON(string $json, ?KeyInterface $prototype = null): KeyInterface { $assoc = \json_decode($json, true); diff --git a/src/Key/Rsa.php b/src/Key/Rsa.php index 89c9ac2..48adea0 100644 --- a/src/Key/Rsa.php +++ b/src/Key/Rsa.php @@ -100,7 +100,7 @@ public function jsonSerialize(): array * * @return self */ - public static function createFromJSON(string $json, KeyInterface $prototype = null): KeyInterface + public static function createFromJSON(string $json, ?KeyInterface $prototype = null): KeyInterface { if (!$prototype instanceof self) { $prototype = new static();