| 1: | <?php declare(strict_types=1); |
| 2: | |
| 3: | namespace PhpParser\Node\Stmt; |
| 4: | |
| 5: | use PhpParser\Node; |
| 6: | |
| 7: | class For_ extends Node\Stmt { |
| 8: | |
| 9: | public array $init; |
| 10: | |
| 11: | public array $cond; |
| 12: | |
| 13: | public array $loop; |
| 14: | |
| 15: | public array $stmts; |
| 16: | |
| 17: | |
| 18: | |
| 19: | |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | |
| 25: | |
| 26: | |
| 27: | |
| 28: | |
| 29: | |
| 30: | |
| 31: | |
| 32: | public function __construct(array $subNodes = [], array $attributes = []) { |
| 33: | $this->attributes = $attributes; |
| 34: | $this->init = $subNodes['init'] ?? []; |
| 35: | $this->cond = $subNodes['cond'] ?? []; |
| 36: | $this->loop = $subNodes['loop'] ?? []; |
| 37: | $this->stmts = $subNodes['stmts'] ?? []; |
| 38: | } |
| 39: | |
| 40: | public function getSubNodeNames(): array { |
| 41: | return ['init', 'cond', 'loop', 'stmts']; |
| 42: | } |
| 43: | |
| 44: | public function getType(): string { |
| 45: | return 'Stmt_For'; |
| 46: | } |
| 47: | } |
| 48: | |