From 8fca4373364a9d3b4154d11bcb0786dda783a8b2 Mon Sep 17 00:00:00 2001 From: Jacek Karczmarczyk Date: Thu, 27 Feb 2025 16:58:26 +0700 Subject: [PATCH] fix: php 8.4 compatibility --- src/Key/AbstractKey.php | 2 +- src/Key/Rsa.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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();