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