| Conditions | 4 |
| Paths | 6 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | 3 | private function renderMessage(array $message) |
|
| 39 | { |
||
| 40 | 3 | $alert = ''; |
|
| 41 | 3 | if (count($message) > 1) { |
|
| 42 | 2 | array_pop($message); |
|
| 43 | } |
||
| 44 | 3 | $num = count($message); |
|
| 45 | 3 | $x = 1; |
|
| 46 | 3 | foreach ($message as $msg) { |
|
| 47 | 3 | $alert .= $msg; |
|
| 48 | 3 | if ($x < $num) { |
|
| 49 | 1 | $alert .= '<br />'; |
|
| 50 | } |
||
| 51 | 3 | $x++; |
|
| 52 | } |
||
| 53 | 3 | return $alert; |
|
| 54 | } |
||
| 55 | } |