140603610eabc893a3093ab2559ca8f90c219b96
[GitHub/WoltLab/WCF.git] /
1 <?php
2
3 declare(strict_types=1);
4
5 namespace CuyZ\Valinor\Type\Parser\Factory\Specifications;
6
7 use CuyZ\Valinor\Type\Parser\Lexer\TypeAliasLexer;
8 use CuyZ\Valinor\Type\Parser\Lexer\TypeLexer;
9 use CuyZ\Valinor\Type\Type;
10
11 /** @internal */
12 final class TypeAliasAssignerSpecification implements TypeParserSpecification
13 {
14 public function __construct(
15 /** @var array<string, Type> */
16 private array $aliases
17 ) {}
18
19 public function transform(TypeLexer $lexer): TypeLexer
20 {
21 return new TypeAliasLexer($lexer, $this->aliases);
22 }
23 }