| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\Node; |
| 4: | |
| 5: | use PhpParser\Node\Expr; |
| 6: | use PhpParser\NodeAbstract; |
| 7: | use PHPStan\Analyser\Scope; |
| 8: | |
| 9: | |
| 10: | class MatchExpressionNode extends NodeAbstract implements VirtualNode |
| 11: | { |
| 12: | |
| 13: | |
| 14: | |
| 15: | |
| 16: | public function __construct( |
| 17: | private Expr $condition, |
| 18: | private array $arms, |
| 19: | Expr\Match_ $originalNode, |
| 20: | private Scope $endScope, |
| 21: | ) |
| 22: | { |
| 23: | parent::__construct($originalNode->getAttributes()); |
| 24: | } |
| 25: | |
| 26: | public function getCondition(): Expr |
| 27: | { |
| 28: | return $this->condition; |
| 29: | } |
| 30: | |
| 31: | |
| 32: | |
| 33: | |
| 34: | public function getArms(): array |
| 35: | { |
| 36: | return $this->arms; |
| 37: | } |
| 38: | |
| 39: | public function getEndScope(): Scope |
| 40: | { |
| 41: | return $this->endScope; |
| 42: | } |
| 43: | |
| 44: | public function getType(): string |
| 45: | { |
| 46: | return 'PHPStan_Node_MatchExpression'; |
| 47: | } |
| 48: | |
| 49: | |
| 50: | |
| 51: | |
| 52: | public function getSubNodeNames(): array |
| 53: | { |
| 54: | return []; |
| 55: | } |
| 56: | |
| 57: | } |
| 58: | |