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