MatchArm.php 652 B

1234567891011121314151617181920212223242526272829
  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. public Expr $body;
  9. /**
  10. * @param null|list<Node\Expr> $conds
  11. */
  12. public function __construct(?array $conds, Node\Expr $body, array $attributes = []) {
  13. $this->conds = $conds;
  14. $this->body = $body;
  15. $this->attributes = $attributes;
  16. }
  17. public function getSubNodeNames(): array {
  18. return ['conds', 'body'];
  19. }
  20. public function getType(): string {
  21. return 'MatchArm';
  22. }
  23. }