MatchArm.php 678 B

123456789101112131415161718192021222324252627282930
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node;
  3. use PhpParser\Node;
  4. use PhpParser\NodeAbstract;
  5. class MatchArm extends NodeAbstract {
  6. /** @var null|list<Node\Expr> */
  7. public ?array $conds;
  8. /** @var Node\Expr */
  9. public Expr $body;
  10. /**
  11. * @param null|list<Node\Expr> $conds
  12. */
  13. public function __construct(?array $conds, Node\Expr $body, array $attributes = []) {
  14. $this->conds = $conds;
  15. $this->body = $body;
  16. $this->attributes = $attributes;
  17. }
  18. public function getSubNodeNames(): array {
  19. return ['conds', 'body'];
  20. }
  21. public function getType(): string {
  22. return 'MatchArm';
  23. }
  24. }