1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\PhpDocParser\Ast\PhpDoc;
4:
5: use PHPStan\PhpDocParser\Ast\NodeAttributes;
6: use PHPStan\PhpDocParser\Ast\Type\TypeNode;
7: use function trim;
8:
9: class TypeAliasTagValueNode implements PhpDocTagValueNode
10: {
11:
12: use NodeAttributes;
13:
14: /** @var string */
15: public $alias;
16:
17: /** @var TypeNode */
18: public $type;
19:
20: public function __construct(string $alias, TypeNode $type)
21: {
22: $this->alias = $alias;
23: $this->type = $type;
24: }
25:
26:
27: public function __toString(): string
28: {
29: return trim("{$this->alias} {$this->type}");
30: }
31:
32: }
33: