feat: add return types to few jsonSerialize()

This commit is contained in:
Simon Podlipsky 2023-02-27 12:32:24 +01:00 committed by terrafrost
parent 13833af749
commit 530f8ab210
3 changed files with 6 additions and 0 deletions

View File

@ -437,6 +437,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()

View File

@ -370,6 +370,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()

View File

@ -26,6 +26,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()