| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 2 | public function getXML(): \SimpleXMLElement |
|
| 19 | { |
||
| 20 | 2 | $xml = $this->createXML()->addChild('lst:itemUserCode', '', $this->namespace('lst')); |
|
| 21 | 2 | $xml->addAttribute('code', strval($this->data->code)); |
|
| 22 | 2 | $xml->addAttribute('name', strval($this->data->name)); |
|
| 23 | |||
| 24 | 2 | if (isset($this->data->constant)) { |
|
| 25 | 1 | $xml->addAttribute('constant', strval($this->data->constant)); |
|
| 26 | } |
||
| 27 | |||
| 28 | 2 | return $xml; |
|
| 29 | } |
||
| 39 |