09cbe4eee77cc23cff553ec55074d745a69fed6d
[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\AliasLexer;
8 use CuyZ\Valinor\Type\Parser\Lexer\TypeLexer;
9 use ReflectionClass;
10 use ReflectionFunction;
11 use Reflector;
12
13 /** @internal */
14 final class AliasSpecification implements TypeParserSpecification
15 {
16 public function __construct(
17 /** @var ReflectionClass<object>|ReflectionFunction */
18 private Reflector $reflection
19 ) {
20 }
21
22 public function transform(TypeLexer $lexer): TypeLexer
23 {
24 return new AliasLexer($lexer, $this->reflection);
25 }
26 }