| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | 2 | public function render(): string |
|
| 26 | { |
||
| 27 | assert($this->svg->ownerDocument instanceof \DOMDocument); |
||
| 28 | |||
| 29 | 2 | $output = $this->svg->ownerDocument->saveXML($this->svg); |
|
| 30 | 2 | if (false === $output) { |
|
| 31 | // @codeCoverageIgnoreStart |
||
| 32 | throw new RuntimeException(sprintf( |
||
| 33 | 'Unable to render %s to XML', |
||
| 34 | get_class($this->svg) |
||
| 35 | )); |
||
| 36 | // @codeCoverageIgnoreEnd |
||
| 37 | } |
||
| 38 | |||
| 39 | 2 | return $output; |
|
| 40 | } |
||
| 47 |