Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
34 | 1 | public function add(BaseXmlObject $object): self |
|
35 | { |
||
36 | 1 | $className = mb_strtolower((new ReflectionClass($object))->getShortName()); |
|
37 | 1 | $mainElement = $this->mainElement->addChild($className); |
|
38 | 1 | foreach ($object as $attributeName => $attributeValue) { |
|
39 | 1 | $this->processAttributeNameAndValue($mainElement, $attributeName, $attributeValue); |
|
40 | } |
||
41 | 1 | return $this; |
|
42 | } |
||
53 |