Conditions | 4 |
Paths | 3 |
Total Lines | 22 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
17 | protected function getAllowedAttributes() |
||
18 | { |
||
19 | // "value" attribute for "li" which are children of "ol" elements. |
||
20 | $parent = $this->getParent(); |
||
21 | if ($parent == null) { |
||
22 | return parent::getAllowedAttributes(); |
||
23 | } |
||
24 | |||
25 | if ($parent->getType() === Token::ELEMENT && |
||
26 | $parent->getName() == 'ol') { |
||
27 | $liAllowedAttributes = array( |
||
28 | '/^value$/i' => Element::ATTR_INT |
||
29 | ); |
||
30 | |||
31 | return array_merge( |
||
32 | $liAllowedAttributes, |
||
33 | parent::getAllowedAttributes() |
||
34 | ); |
||
35 | } |
||
36 | |||
37 | return parent::getAllowedAttributes(); |
||
38 | } |
||
39 | |||
67 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.