| Conditions | 4 |
| Paths | 6 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 21 | protected function booting(Application $app, Bootable ...$mods) : void |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var Component $mod |
||
| 25 | */ |
||
| 26 | |||
| 27 | foreach ($mods as $idx => $mod) { |
||
| 28 | $mod->ordered($idx); |
||
|
|
|||
| 29 | } |
||
| 30 | |||
| 31 | uasort($mods, static function (Bootable $com1, Bootable $com2) { |
||
| 32 | return $com1->priority() <=> $com2->priority(); |
||
| 33 | }); |
||
| 34 | |||
| 35 | foreach ($mods as $idx => $com) { |
||
| 36 | if ($com->runnable()) { |
||
| 37 | $com->starting($app); |
||
| 38 | logger('console')->debug('Component starting', ['p' => $com->priority(), 'com' => get_class($com)]); |
||
| 39 | } else { |
||
| 40 | logger('console')->debug('Component non-runnable', ['p' => $com->priority(), 'com' => get_class($com)]); |
||
| 41 | } |
||
| 45 |