You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
653 B

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