1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Node;
4:
5: use PhpParser\Node\Expr\Array_;
6: use PhpParser\NodeAbstract;
7:
8: /**
9: * @api
10: * @final
11: */
12: class LiteralArrayNode extends NodeAbstract implements VirtualNode
13: {
14:
15: /**
16: * @param LiteralArrayItem[] $itemNodes
17: */
18: public function __construct(Array_ $originalNode, private array $itemNodes)
19: {
20: parent::__construct($originalNode->getAttributes());
21: }
22:
23: /**
24: * @return LiteralArrayItem[]
25: */
26: public function getItemNodes(): array
27: {
28: return $this->itemNodes;
29: }
30:
31: public function getType(): string
32: {
33: return 'PHPStan_Node_LiteralArray';
34: }
35:
36: /**
37: * @return string[]
38: */
39: public function getSubNodeNames(): array
40: {
41: return [];
42: }
43:
44: }
45: