| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 15 | public function toXml() |
|
| 17 | { |
||
| 18 | 15 | if (!$this->xml instanceof MergedStructure) { |
|
| 19 | 15 | $file = $this->getFile(); |
|
| 20 | 15 | $content = file_get_contents($file); |
|
| 21 | 15 | $doc = new \DOMDocument(); |
|
| 22 | 15 | $doc->loadXML($content); |
|
| 23 | 15 | $this->validateSchema($doc); |
|
| 24 | 14 | $this->xml = new MergedStructure($content); |
|
| 25 | } |
||
| 26 | 14 | return $this->xml; |
|
| 27 | } |
||
| 28 | |||
| 30 |