From 7247cb8e574893140e01cc8b1845682198a0e3ef Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Wed, 6 Jan 2021 11:55:49 +0100 Subject: [PATCH] Add throws tag --- src/SerializerInterface.php | 6 ++++++ 1 file changed, 6 insertions(+) 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