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: | |
11: | |
12: | final class MatchExpressionNode extends NodeAbstract implements VirtualNode |
13: | { |
14: | |
15: | |
16: | |
17: | |
18: | public function __construct( |
19: | private Expr $condition, |
20: | private array $arms, |
21: | Expr\Match_ $originalNode, |
22: | private Scope $endScope, |
23: | ) |
24: | { |
25: | parent::__construct($originalNode->getAttributes()); |
26: | } |
27: | |
28: | public function getCondition(): Expr |
29: | { |
30: | return $this->condition; |
31: | } |
32: | |
33: | |
34: | |
35: | |
36: | public function getArms(): array |
37: | { |
38: | return $this->arms; |
39: | } |
40: | |
41: | public function getEndScope(): Scope |
42: | { |
43: | return $this->endScope; |
44: | } |
45: | |
46: | public function getType(): string |
47: | { |
48: | return 'PHPStan_Node_MatchExpression'; |
49: | } |
50: | |
51: | |
52: | |
53: | |
54: | public function getSubNodeNames(): array |
55: | { |
56: | return []; |
57: | } |
58: | |
59: | } |
60: | |