Conditions | 4 |
Paths | 5 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | 3 | public function convert(ElementInterface $element) |
|
17 | { |
||
18 | 3 | $children = array(); |
|
19 | |||
20 | 3 | foreach ($element->getChildren() as $item) |
|
21 | { |
||
22 | 3 | $value = str_replace("\n", ' ', $item->getValue()); |
|
23 | |||
24 | 3 | $null = $value === ' ' || empty($value); |
|
25 | |||
26 | 3 | $null === false && array_push($children, $value); |
|
27 | 1 | } |
|
28 | |||
29 | 3 | return implode(' - ', $children) . "\n"; |
|
30 | } |
||
42 |