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