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