| Conditions | 6 |
| Paths | 16 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function resolveOverview(array $release) |
||
| 23 | { |
||
| 24 | $overviewLines = isset($release['overview']) |
||
| 25 | ? (is_array($release['overview']) ? $release['overview'] : array($release['overview'])) |
||
| 26 | : array(); |
||
| 27 | |||
| 28 | $reducedLines = explode(PHP_EOL, implode( |
||
| 29 | ' ', |
||
| 30 | array_map(function ($line) { |
||
| 31 | return !trim($line) ? PHP_EOL . PHP_EOL : $line; |
||
| 32 | }, $overviewLines) |
||
| 33 | )); |
||
| 34 | |||
| 35 | $reducedLines = array_map('trim', $reducedLines); |
||
| 36 | |||
| 37 | return array( |
||
| 38 | 'version' => isset($release['version']) ? $release['version'] : '', |
||
| 39 | 'overview' => $overviewLines, |
||
| 40 | 'summary' => isset($release['summary']) ? $release['summary'] : '', |
||
| 41 | 'overview-reduced' => $reducedLines, |
||
| 42 | ); |
||
| 62 |