Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
18 | 2 | protected function getAllowedAttributes() |
|
19 | { |
||
20 | // "value" attribute for "li" which are children of "ol" elements. |
||
21 | 2 | if ($this->getParent() instanceof Ol) { |
|
22 | $liAllowedAttributes = array( |
||
23 | '/^value$/i' => Element::ATTR_INT |
||
24 | 1 | ); |
|
25 | |||
26 | 1 | return array_merge( |
|
27 | 1 | $liAllowedAttributes, |
|
28 | 1 | parent::getAllowedAttributes() |
|
29 | 1 | ); |
|
30 | } |
||
31 | |||
32 | 1 | return parent::getAllowedAttributes(); |
|
33 | } |
||
34 | |||
58 |