1: | <?php declare(strict_types = 1); |
2: | |
3: | namespace PHPStan\PhpDoc\Tag; |
4: | |
5: | use PHPStan\Analyser\NameScope; |
6: | use PHPStan\PhpDocParser\Ast\Type\TypeNode; |
7: | use PHPStan\Type\TypeAlias; |
8: | |
9: | |
10: | |
11: | |
12: | |
13: | class TypeAliasTag |
14: | { |
15: | |
16: | public function __construct( |
17: | private string $aliasName, |
18: | private TypeNode $typeNode, |
19: | private NameScope $nameScope, |
20: | ) |
21: | { |
22: | } |
23: | |
24: | public function getAliasName(): string |
25: | { |
26: | return $this->aliasName; |
27: | } |
28: | |
29: | public function getTypeAlias(): TypeAlias |
30: | { |
31: | return new TypeAlias( |
32: | $this->typeNode, |
33: | $this->nameScope, |
34: | ); |
35: | } |
36: | |
37: | } |
38: | |