Skip to content

Commit

Permalink
Merge pull request #1091 from bdsl/templated-return
Browse files Browse the repository at this point in the history
Add psalm specific generic return type for deserialize
  • Loading branch information
goetas authored Jun 3, 2019
2 parents fffaea1 + e9e8fa2 commit 48be7ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/SerializerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ public function serialize($data, string $format, ?SerializationContext $context
* Deserializes the given data to the specified type.
*
* @return mixed
*
* @psalm-template T
* @psalm-param class-string<T> $type
* @psalm-return T
*/
public function deserialize(string $data, string $type, string $format, ?DeserializationContext $context = null);
}

0 comments on commit 48be7ea

Please sign in to comment.