| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | 2 | public function asStr(): string |
|
| 26 | { |
||
| 27 | $envelope = <<<EOD |
||
| 28 | 2 | <?xml version="1.0" encoding="UTF-8"?> |
|
| 29 | <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" |
||
| 30 | xmlns:id="http://x-road.eu/xsd/identifiers" |
||
| 31 | xmlns:xrd="http://x-road.eu/xsd/xroad.xsd"> |
||
| 32 | <env:Header/> |
||
| 33 | <env:Body/> |
||
| 34 | </env:Envelope> |
||
| 35 | EOD; |
||
| 36 | |||
| 37 | 2 | $dom = new \DOMDocument(); |
|
| 38 | 2 | $dom->loadXML($envelope); |
|
| 39 | |||
| 40 | 2 | foreach ($this->elements as $element) { |
|
| 41 | 2 | $element->inject($dom); |
|
| 42 | } |
||
| 43 | |||
| 44 | 2 | return $dom->saveXML(); |
|
| 45 | } |
||
| 65 |