Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
54 | 3 | private function search(string $name): XmlElement |
|
55 | { |
||
56 | 3 | foreach ($this->getElements() as $element) { |
|
57 | 3 | if ($element->getName() === $name) { |
|
58 | 3 | return $element; |
|
59 | } |
||
60 | } |
||
61 | |||
62 | 3 | $element = new XmlElement($name); |
|
63 | 3 | $this->appendElement($element); |
|
64 | |||
65 | 3 | return $element; |
|
66 | } |
||
67 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.