| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php # -*- coding: utf-8 -*- |
||
| 24 | 2 | public function parse(string $content): string |
|
| 25 | 2 | { |
|
| 26 | |||
| 27 | // Split for each line to exclude. |
||
| 28 | 2 | $content = explode("\n", $content); |
|
| 29 | 2 | $pContent = ''; |
|
| 30 | 2 | foreach ($content as $line) { |
|
| 31 | 2 | if (!$this->strposa($line, self::$paragraphExcludes)) { |
|
| 32 | 2 | $line = sprintf('<p>%s</p>', trim($line)); |
|
| 33 | } |
||
| 34 | 2 | $pContent .= $line; |
|
| 35 | } |
||
| 36 | |||
| 37 | 2 | return $pContent; |
|
| 38 | } |
||
| 64 |