Break_.php 698 B

1234567891011121314151617181920212223242526272829
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Stmt;
  3. use PhpParser\Node;
  4. class Break_ extends Node\Stmt {
  5. /** @var null|Node\Expr Number of loops to break */
  6. public ?Node\Expr $num;
  7. /**
  8. * Constructs a break node.
  9. *
  10. * @param null|Node\Expr $num Number of loops to break
  11. * @param array<string, mixed> $attributes Additional attributes
  12. */
  13. public function __construct(?Node\Expr $num = null, array $attributes = []) {
  14. $this->attributes = $attributes;
  15. $this->num = $num;
  16. }
  17. public function getSubNodeNames(): array {
  18. return ['num'];
  19. }
  20. public function getType(): string {
  21. return 'Stmt_Break';
  22. }
  23. }