| Total Complexity | 4 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | trait Attributes |
||
| 8 | { |
||
| 9 | 27 | public function readAttr(string $name, $default = '', ?\DOMNode $node = null) |
|
| 10 | { |
||
| 11 | 27 | if (! $node) { |
|
| 12 | 27 | return $this->node->attributes->getNamedItem($name)->nodeValue ?? $default; |
|
| 13 | } |
||
| 14 | |||
| 15 | 2 | return $node->attributes->getNamedItem($name)->nodeValue ?? $default; |
|
|
|
|||
| 16 | } |
||
| 17 | |||
| 18 | 15 | public function readAttrText(string $name = 'text', $default = '', ?\DOMNode $node = null) |
|
| 27 | } |
||
| 28 | } |
||
| 29 |
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.