| 1 |
<?php declare(strict_types=1); |
| 2 |
|
| 3 |
namespace PhpParser\Node\Expr; |
| 4 |
|
| 5 |
use PhpParser\Node; |
| 6 |
use PhpParser\Node\MatchArm; |
| 7 |
|
| 8 |
class Match_ extends Node\Expr |
| 9 |
{ |
| 10 |
/** @var Node\Expr */ |
| 11 |
public $cond; |
| 12 |
/** @var MatchArm[] */ |
| 13 |
public $arms; |
| 14 |
|
| 15 |
/** |
| 16 |
* @param MatchArm[] $arms |
| 17 |
*/ |
| 18 |
public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) { |
| 19 |
$this->attributes = $attributes; |
| 20 |
$this->cond = $cond; |
| 21 |
$this->arms = $arms; |
| 22 |
} |
| 23 |
|
| 24 |
public function getSubNodeNames() : array { |
| 25 |
return ['cond', 'arms']; |
| 26 |
} |
| 27 |
|
| 28 |
public function getType() : string { |
| 29 |
return 'Expr_Match'; |
| 30 |
} |
| 31 |
} |
| 32 |
|