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