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