| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | 8 | public function run(): string |
|
| 22 | { |
||
| 23 | 8 | $flashes = $this->flash->getAll(); |
|
| 24 | 8 | $html = ''; |
|
| 25 | |||
| 26 | 8 | foreach ($flashes as $type => $data) { |
|
| 27 | 2 | foreach ($data as $message) { |
|
| 28 | 2 | $html .= Message::widget() |
|
| 29 | 2 | ->headerColor($type) |
|
|
|
|||
| 30 | 2 | ->headerMessage($message['header'] ?? '') |
|
| 31 | 2 | ->body($message['body'] ?? '') |
|
| 32 | 2 | ->withoutCloseButton($this->withoutCloseButton) |
|
| 33 | 2 | ->size($this->size) |
|
| 34 | 2 | ->render(); |
|
| 35 | } |
||
| 36 | } |
||
| 37 | |||
| 38 | 8 | return $html; |
|
| 39 | } |
||
| 55 |