1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine;
4:
5: use PHPStan\PhpDocParser\Ast\Node;
6: use PHPStan\PhpDocParser\Ast\NodeAttributes;
7: use function implode;
8:
9: class DoctrineArray implements Node
10: {
11:
12: use NodeAttributes;
13:
14: /** @var list<DoctrineArrayItem> */
15: public array $items;
16:
17: /**
18: * @param list<DoctrineArrayItem> $items
19: */
20: public function __construct(array $items)
21: {
22: $this->items = $items;
23: }
24:
25: public function __toString(): string
26: {
27: $items = implode(', ', $this->items);
28:
29: return '{' . $items . '}';
30: }
31:
32: }
33: