| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | 6 | public function run(): string |
|
| 21 | { |
||
| 22 | 6 | $flashes = $this->flash->getAll(); |
|
| 23 | |||
| 24 | 6 | $html = []; |
|
| 25 | 6 | foreach ($flashes as $type => $data) { |
|
| 26 | 2 | foreach ($data as $message) { |
|
| 27 | 2 | $html[] = Alert::widget() |
|
| 28 | 2 | ->options(['class' => "alert-{$type} shadow"]) |
|
|
|
|||
| 29 | 2 | ->body($message['body']) |
|
| 30 | ; |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | 6 | return implode($html); |
|
| 35 | } |
||
| 37 |