3 declare(strict_types=1);
5 namespace CuyZ\Valinor\Type\Parser\Factory\Specifications;
7 use CuyZ\Valinor\Type\Parser\Lexer\AliasLexer;
8 use CuyZ\Valinor\Type\Parser\Lexer\TypeLexer;
10 use ReflectionFunction;
14 final class AliasSpecification implements TypeParserSpecification
16 public function __construct(
17 /** @var ReflectionClass<object>|ReflectionFunction */
18 private Reflector $reflection
22 public function transform(TypeLexer $lexer): TypeLexer
24 return new AliasLexer($lexer, $this->reflection);