diff --git a/src/SerializerInterface.php b/src/SerializerInterface.php index b2d1d9d9c..f0ee4e656 100644 --- a/src/SerializerInterface.php +++ b/src/SerializerInterface.php @@ -4,6 +4,8 @@ namespace JMS\Serializer; +use JMS\Serializer\Exception\RuntimeException; + /** * Serializer Interface. * @@ -15,6 +17,8 @@ interface SerializerInterface * Serializes the given data to the specified output format. * * @param mixed $data + * + * @throws RuntimeException */ public function serialize($data, string $format, ?SerializationContext $context = null, ?string $type = null): string; @@ -23,6 +27,8 @@ public function serialize($data, string $format, ?SerializationContext $context * * @return mixed * + * @throws RuntimeException + * * @psalm-template T * @psalm-param class-string $type * @psalm-return T