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