BigInteger: fix deprecation notice

This commit is contained in:
terrafrost 2022-03-18 12:47:40 -05:00
parent 2a3951538b
commit eb971aaaac
3 changed files with 3 additions and 0 deletions

View File

@ -443,6 +443,7 @@ class BigInteger implements \JsonSerializable
*
* Will be called, automatically, when json_encode() is called on a BigInteger object.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$result = ['hex' => $this->toHex(true)];

View File

@ -376,6 +376,7 @@ abstract class Engine implements \JsonSerializable
*
* Will be called, automatically, when json_encode() is called on a BigInteger object.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$result = ['hex' => $this->toHex(true)];

View File

@ -31,6 +31,7 @@ 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
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ['hex' => $this->toHex(true)];