| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 1 | public function getXML(): \SimpleXMLElement |
|
| 19 | { |
||
| 20 | 1 | $xml = $this->createXML()->addChild('sup:supplierItem', '', $this->namespace('sup')); |
|
| 21 | |||
| 22 | // handle default |
||
| 23 | 1 | if (isset($this->data->default)) { |
|
| 24 | 1 | $xml->addAttribute('default', strval($this->data->default)); |
|
| 25 | 1 | $this->data->default = null; |
|
| 26 | } |
||
| 27 | |||
| 28 | 1 | $this->addElements($xml, $this->getDataElements(), 'sup'); |
|
| 29 | |||
| 30 | 1 | return $xml; |
|
| 31 | } |
||
| 41 |