No Description

Switch_.php 800B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Stmt;
  3. use PhpParser\Node;
  4. class Switch_ extends Node\Stmt
  5. {
  6. /** @var Node\Expr Condition */
  7. public $cond;
  8. /** @var Case_[] Case list */
  9. public $cases;
  10. /**
  11. * Constructs a case node.
  12. *
  13. * @param Node\Expr $cond Condition
  14. * @param Case_[] $cases Case list
  15. * @param array $attributes Additional attributes
  16. */
  17. public function __construct(Node\Expr $cond, array $cases, array $attributes = []) {
  18. $this->attributes = $attributes;
  19. $this->cond = $cond;
  20. $this->cases = $cases;
  21. }
  22. public function getSubNodeNames() : array {
  23. return ['cond', 'cases'];
  24. }
  25. public function getType() : string {
  26. return 'Stmt_Switch';
  27. }
  28. }