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: * @api
11: */
12: final class TypeAliasTag
13: {
14:
15: public function __construct(
16: private string $aliasName,
17: private TypeNode $typeNode,
18: private NameScope $nameScope,
19: )
20: {
21: }
22:
23: public function getAliasName(): string
24: {
25: return $this->aliasName;
26: }
27:
28: public function getTypeAlias(): TypeAlias
29: {
30: return new TypeAlias(
31: $this->typeNode,
32: $this->nameScope,
33: );
34: }
35:
36: }
37: