| Conditions | 4 |
| Paths | 4 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function append(ElementInterface $elements) |
||
|
|
|||
| 23 | { |
||
| 24 | /** @var ElementInterface[] $elements */ |
||
| 25 | 150 | $elements = array_filter(func_get_args(), function($item) { |
|
| 26 | 150 | return $item instanceof ElementInterface; |
|
| 27 | 150 | }); |
|
| 28 | |||
| 29 | 150 | foreach ($elements as $element) { |
|
| 30 | 150 | $this->child[] = $element; |
|
| 31 | /** @var \DOMElement $e */ |
||
| 32 | 150 | $e = $this->getElement(); |
|
| 33 | 150 | if ($e instanceof \DOMNode) { |
|
| 34 | 150 | $e->appendChild($element->getElement()->getElement()); |
|
| 35 | 150 | } elseif ($e instanceof XMLDocumentInterface) { |
|
| 36 | 75 | $e->appendChild($element->getElement()); |
|
| 37 | 75 | } |
|
| 38 | 150 | } |
|
| 39 | |||
| 40 | 150 | return $this; |
|
| 41 | } |
||
| 42 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.