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