Total Complexity | 3 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class Spine |
||
10 | { |
||
11 | /** |
||
12 | * @var array<int, string> |
||
13 | */ |
||
14 | protected array $spine = []; |
||
15 | |||
16 | /** |
||
17 | * Spine constructor. |
||
18 | */ |
||
19 | 21 | public function __construct(private readonly SimpleXMLElement $opfXml) |
|
20 | { |
||
21 | 21 | foreach ($this->opfXml->spine->itemref as $item) { |
|
22 | 21 | $attr = $item->attributes(); |
|
23 | 21 | $this->spine[] = (string) $attr->idref; |
|
24 | } |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @return array<int, string> |
||
29 | */ |
||
30 | 7 | public function get(): array |
|
33 | } |
||
34 | } |
||
35 |