| Total Complexity | 5 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class Organizer |
||
| 9 | { |
||
| 10 | private Obj $menus; |
||
| 11 | |||
| 12 | public function __construct(array $menus) |
||
| 13 | { |
||
| 14 | $this->menus = new Obj($menus); |
||
| 15 | } |
||
| 16 | |||
| 17 | public function handle(): void |
||
| 20 | } |
||
| 21 | |||
| 22 | private function organize(Obj $menus): void |
||
| 23 | { |
||
| 24 | $menus->each(fn ($menu, $index) => $this->reorder($menu, $index)); |
||
| 25 | } |
||
| 26 | |||
| 27 | private function reorder(Obj $menu, int $index): void |
||
| 34 | } |
||
| 35 | } |
||
| 36 | } |
||
| 37 |