2020-07-15 21:40:05 +02:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace PhpParser\Node;
|
|
|
|
|
|
|
|
use PhpParser\Node;
|
|
|
|
use PhpParser\NodeAbstract;
|
|
|
|
|
2022-08-28 22:57:06 +02:00
|
|
|
class MatchArm extends NodeAbstract {
|
2022-12-14 22:59:53 +01:00
|
|
|
/** @var null|list<Node\Expr> */
|
2023-08-16 21:18:30 +02:00
|
|
|
public ?array $conds;
|
2020-07-15 21:40:05 +02:00
|
|
|
/** @var Node\Expr */
|
2023-08-16 21:18:30 +02:00
|
|
|
public Expr $body;
|
2020-07-15 21:40:05 +02:00
|
|
|
|
|
|
|
/**
|
2022-12-14 22:59:53 +01:00
|
|
|
* @param null|list<Node\Expr> $conds
|
2020-07-15 21:40:05 +02:00
|
|
|
*/
|
2022-06-04 12:48:12 +02:00
|
|
|
public function __construct(?array $conds, Node\Expr $body, array $attributes = []) {
|
2020-07-15 21:40:05 +02:00
|
|
|
$this->conds = $conds;
|
|
|
|
$this->body = $body;
|
|
|
|
$this->attributes = $attributes;
|
|
|
|
}
|
|
|
|
|
2022-08-28 22:57:06 +02:00
|
|
|
public function getSubNodeNames(): array {
|
2020-07-15 21:40:05 +02:00
|
|
|
return ['conds', 'body'];
|
|
|
|
}
|
|
|
|
|
2022-08-28 22:57:06 +02:00
|
|
|
public function getType(): string {
|
2020-07-15 21:40:05 +02:00
|
|
|
return 'MatchArm';
|
|
|
|
}
|
|
|
|
}
|