Total Complexity | 6 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | trait Attributes |
||
9 | { |
||
10 | 27 | public function readAttr(string $name, $default = '', DOMNode $node = null) |
|
11 | { |
||
12 | 27 | if (!$node) { |
|
13 | 27 | return $this->node->attributes->getNamedItem($name)->nodeValue ?? $default; |
|
14 | } |
||
15 | |||
16 | 2 | return $node->attributes->getNamedItem($name)->nodeValue ?? $default; |
|
|
|||
17 | } |
||
18 | |||
19 | 15 | public function readAttrHydrate(string $name = 'text', $default = '', DOMNode $node = null) |
|
20 | { |
||
21 | 15 | $value = $this->readAttr($name, $default, $node); |
|
22 | |||
23 | 15 | if (!$value) { |
|
24 | 2 | return $value; |
|
25 | } |
||
26 | |||
27 | 14 | return Util::hydrate($this->store, $value); |
|
28 | } |
||
29 | |||
30 | 15 | public function readAttrText(string $name = 'text', $default = '', DOMNode $node = null) |
|
39 | } |
||
40 | } |
||
41 |
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.