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 getSubject(): string |
|
18 | { |
||
19 | 9 | $this->opfXml->registerXPathNamespace('dc', $this->dcNamespace); |
|
20 | |||
21 | 9 | $subjectNode = $this->opfXml->xpath('//dc:subject'); |
|
22 | |||
23 | 9 | if ($subjectNode === false || $subjectNode === null || $subjectNode === []) { |
|
24 | 2 | return ''; |
|
25 | } |
||
26 | |||
27 | 7 | return (string) $subjectNode[0]; |
|
28 | } |
||
47 |