diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 276d7af3..434b3cfa 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -405,6 +405,8 @@ class BigInteger implements \JsonSerializable * JSON Serialize * * Will be called, automatically, when json_encode() is called on a BigInteger object. + * + * @return array{hex: string, precision?: int] */ #[\ReturnTypeWillChange] public function jsonSerialize(): array diff --git a/phpseclib/Math/BigInteger/Engines/Engine.php b/phpseclib/Math/BigInteger/Engines/Engine.php index 21f82921..813beeeb 100644 --- a/phpseclib/Math/BigInteger/Engines/Engine.php +++ b/phpseclib/Math/BigInteger/Engines/Engine.php @@ -363,6 +363,8 @@ abstract class Engine implements \JsonSerializable * JSON Serialize * * Will be called, automatically, when json_encode() is called on a BigInteger object. + * + * @return array{hex: string, precision?: int] */ #[\ReturnTypeWillChange] public function jsonSerialize(): array diff --git a/phpseclib/Math/Common/FiniteField/Integer.php b/phpseclib/Math/Common/FiniteField/Integer.php index 207d6c0d..615a03e0 100644 --- a/phpseclib/Math/Common/FiniteField/Integer.php +++ b/phpseclib/Math/Common/FiniteField/Integer.php @@ -28,6 +28,8 @@ abstract class Integer implements \JsonSerializable * * PHP Serialize isn't supported because unserializing would require the factory be * serialized as well and that just sounds like too much + * + * @return array{hex: string} */ #[\ReturnTypeWillChange] public function jsonSerialize(): array