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