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