Skip to content

Commit

Permalink
Merge pull request #1273 from VincentLanglet/addException
Browse files Browse the repository at this point in the history
Add throws tag
  • Loading branch information
goetas authored Jan 13, 2021
2 parents f91971c + 7247cb8 commit d214941
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/SerializerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace JMS\Serializer;

use JMS\Serializer\Exception\RuntimeException;

/**
* Serializer Interface.
*
Expand All @@ -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;

Expand All @@ -23,6 +27,8 @@ public function serialize($data, string $format, ?SerializationContext $context
*
* @return mixed
*
* @throws RuntimeException
*
* @psalm-template T
* @psalm-param class-string<T> $type
* @psalm-return T
Expand Down

0 comments on commit d214941

Please sign in to comment.