diff --git a/src/Mapper/TreeMapper.php b/src/Mapper/TreeMapper.php index 113330b..a6e4691 100644 --- a/src/Mapper/TreeMapper.php +++ b/src/Mapper/TreeMapper.php @@ -8,11 +8,18 @@ namespace CuyZ\Valinor\Mapper; interface TreeMapper { /** - * @template T of object + * @psalm-template TObject of object + * @psalm-template TypeDefinition of string|class-string * - * @param string|class-string $signature + * @param TypeDefinition $signature * @param mixed $source - * @return T|mixed + * @return TObject|mixed + * + * @psalm-return ( + * $signature is class-string + * ? TObject + * : mixed + * ) * * @throws MappingError */