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