Skip to content

Commit

Permalink
Narrow types #35
Browse files Browse the repository at this point in the history
  • Loading branch information
marein committed Oct 7, 2021
1 parent 689f5b9 commit f6900b7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Common/Normalizer/Normalizer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace Gaming\Common\Normalizer;
Expand All @@ -12,11 +13,18 @@
interface Normalizer
{
/**
* @return mixed A scalar or a nestable array of scalars.
* @throws NormalizerException
*/
public function normalize(mixed $value, string $typeName): mixed;

/**
* @template T
*
* @param mixed $value A scalar or a nestable array of scalars.
* @param T $typeName
*
* @return T
* @throws NormalizerException
*/
public function denormalize(mixed $value, string $typeName): mixed;
Expand Down

0 comments on commit f6900b7

Please sign in to comment.