mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-16 16:17:43 +03:00
Update TypeInterface to extend JsonSerializable and Serializable
This commit is contained in:
@@ -73,4 +73,26 @@ final class Decimal implements NumberInterface
|
||||
{
|
||||
return $this->toString();
|
||||
}
|
||||
|
||||
public function jsonSerialize(): string
|
||||
{
|
||||
return $this->toString();
|
||||
}
|
||||
|
||||
public function serialize(): string
|
||||
{
|
||||
return $this->toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs the object from a serialized string representation
|
||||
*
|
||||
* @param string $serialized The serialized string representation of the object
|
||||
*
|
||||
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
|
||||
*/
|
||||
public function unserialize($serialized): void
|
||||
{
|
||||
$this->__construct($serialized);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user