Skip to content

Commit

Permalink
[Json] use TypeInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
azjezz committed Feb 21, 2021
1 parent 2af0f62 commit c34f75b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Psl/Json/typed.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@

use Psl\Type\Exception\AssertException;
use Psl\Type\Exception\CoercionException;
use Psl\Type\Type;
use Psl\Type\TypeInterface;

/**
* Decode a json encoded string into a dynamic variable.
*
* @psalm-template T
*
* @psalm-param Type<T> $type
* @psalm-param TypeInterface<T> $type
*
* @psalm-return T
*
* @throws Exception\DecodeException If an error occurred.
*/
function typed(string $json, Type $type)
function typed(string $json, TypeInterface $type)
{
$value = decode($json);

Expand Down

0 comments on commit c34f75b

Please sign in to comment.