Conditions | 7 |
Paths | 10 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 7.9936 |
Changes | 0 |
1 | <?php |
||
29 | 6 | public function convert(ElementInterface $element) |
|
30 | { |
||
31 | 6 | $return = $this->config->getOption('hard_break') ? "\n" : " \n"; |
|
32 | |||
33 | 6 | $next = $element->getNext(); |
|
34 | 6 | if ($next) { |
|
35 | 6 | $next_value = $next->getValue(); |
|
36 | 6 | if ($next_value) { |
|
37 | 6 | if (in_array(substr($next_value, 0, 2), array('- ', '* ', '+ '))) { |
|
38 | $parent = $element->getParent(); |
||
39 | if ($parent && $parent->getTagName() == 'li') { |
||
40 | $return .= '\\'; |
||
41 | } |
||
42 | } |
||
43 | } |
||
44 | } |
||
45 | |||
46 | 6 | return $return; |
|
47 | } |
||
48 | |||
57 |