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