| Conditions | 4 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 9 | public function getDescription(): string |
|
| 18 | { |
||
| 19 | 9 | $this->opfXml->registerXPathNamespace('dc', $this->dcNamespace); |
|
| 20 | |||
| 21 | 9 | $descriptionNode = $this->opfXml->xpath('//dc:description'); |
|
| 22 | |||
| 23 | 9 | if ($descriptionNode === false || $descriptionNode === null || $descriptionNode === []) { |
|
| 24 | 6 | return ''; |
|
| 25 | } |
||
| 26 | |||
| 27 | 3 | return (string) $descriptionNode[0]; |
|
| 28 | } |
||
| 47 |