| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function getText($newLineChar = ' ') |
||
| 43 | { |
||
| 44 | $text = ''; |
||
| 45 | foreach ($this->entries as $entry) { |
||
| 46 | if ($entry == '') { // empty string means new line |
||
| 47 | if (substr($text, -2) != '.' . $newLineChar) { |
||
| 48 | $text .= '.' . $newLineChar; |
||
| 49 | } |
||
| 50 | } else { |
||
| 51 | list($msg, $style) = $entry; |
||
| 52 | $text .= $msg; |
||
| 53 | } |
||
| 54 | } |
||
| 55 | |||
| 56 | return $text; |
||
| 57 | } |
||
| 59 |