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