Conditions | 5 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 5.0342 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 9 | public function getIdentifiers(): array |
|
20 | { |
||
21 | 9 | $this->opfXml->registerXPathNamespace('dc', $this->dcNamespace); |
|
22 | |||
23 | 9 | $identifierNodes = $this->opfXml->xpath('//dc:identifier'); |
|
24 | |||
25 | 9 | $identifiers = []; |
|
26 | |||
27 | 9 | if ($identifierNodes === false || $identifierNodes === null || $identifierNodes === []) { |
|
28 | return $identifiers; |
||
29 | } |
||
30 | |||
31 | 9 | foreach ($identifierNodes as $identifierNode) { |
|
32 | 9 | $identifiers[] = (string) $identifierNode; |
|
33 | } |
||
34 | 9 | return $identifiers; |
|
35 | } |
||
59 |