Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | 40 | public function __construct(private readonly SimpleXMLElement $opfXml, private string $opfFilePath) |
|
26 | { |
||
27 | 40 | $namespaces = $this->opfXml->getNamespaces(true); |
|
28 | |||
29 | 40 | if (! isset($namespaces['dc'])) { |
|
30 | 1 | throw new Exception('Failed to identify dc namespace'); |
|
31 | } |
||
32 | |||
33 | 39 | $this->dcNamespace = $namespaces['dc']; |
|
34 | } |
||
55 |