mirror of
https://github.com/danog/Valinor.git
synced 2024-11-30 04:39:05 +01:00
fix: improve type definitions to allow Psalm automatic inferring
This commit is contained in:
parent
7a49f45175
commit
f9b04c5c27
@ -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<TObject>
|
||||
*
|
||||
* @param string|class-string<T> $signature
|
||||
* @param TypeDefinition $signature
|
||||
* @param mixed $source
|
||||
* @return T|mixed
|
||||
* @return TObject|mixed
|
||||
*
|
||||
* @psalm-return (
|
||||
* $signature is class-string<TObject>
|
||||
* ? TObject
|
||||
* : mixed
|
||||
* )
|
||||
*
|
||||
* @throws MappingError
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user