| Conditions | 2 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | protected function setContent($content) |
||
| 34 | { |
||
| 35 | $contentClass = $this->contentClass(); |
||
| 36 | $domDocument = new \DOMDocument('1.0', 'utf-8'); |
||
| 37 | try { |
||
| 38 | $domDocument->loadXML($content, LIBXML_NOERROR); |
||
| 39 | $this->content = new $contentClass($domDocument, $this->generator); |
||
| 40 | } catch (\Exception $exception) { |
||
| 41 | throw new \InvalidArgumentException(sprintf('Unable to load document at "%s"', $this->getName()), __LINE__, $exception); |
||
| 42 | } |
||
| 43 | return $this; |
||
| 44 | } |
||
| 45 | /** |
||
| 62 |