Total Complexity | 2 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php # -*- coding: utf-8 -*- |
||
6 | class CleanUpList extends AbstractRegexRule |
||
7 | { |
||
8 | |||
9 | /** |
||
10 | * Get the regex rule to identify the content for the callback. |
||
11 | * Clean up unordered list blocks to get for a block only one ul, ol block, |
||
12 | * not each line and leave the li element. |
||
13 | * |
||
14 | * @return string |
||
15 | */ |
||
16 | 6 | public function rule(): string |
|
17 | 6 | { |
|
18 | 6 | return '/\s*<\/(ol|ul)>\n<\1>\s*/'; |
|
19 | } |
||
20 | |||
21 | /** |
||
22 | * {@inheritdoc} |
||
23 | */ |
||
24 | 2 | public function render(array $content): string |
|
27 | } |
||
28 | } |
||
29 |