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