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\GenericTypeNode;
7: use function trim;
8:
9: class UsesTagValueNode implements PhpDocTagValueNode
10: {
11:
12: use NodeAttributes;
13:
14: /** @var GenericTypeNode */
15: public $type;
16:
17: /** @var string (may be empty) */
18: public $description;
19:
20: public function __construct(GenericTypeNode $type, string $description)
21: {
22: $this->type = $type;
23: $this->description = $description;
24: }
25:
26:
27: public function __toString(): string
28: {
29: return trim("{$this->type} {$this->description}");
30: }
31:
32: }
33: