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