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