| Conditions | 4 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 18 | public function __construct(string $path) |
||
| 19 | { |
||
| 20 | parent::__construct(path: $path); |
||
| 21 | $xml = $this->getXMLReader(); |
||
| 22 | |||
| 23 | while ($xml->read()) { |
||
| 24 | if (XMLReader::ELEMENT === $xml->nodeType && 'Relationship' === $xml->name) { |
||
| 25 | $target = 'xl/' . $xml->getAttribute(name: 'Target'); |
||
| 26 | |||
| 27 | match (basename(path: (string) $xml->getAttribute(name: 'Type'))) { |
||
| 28 | 'worksheet' => $this->workSheetPaths[$xml->getAttribute(name: 'Id')] = $target, |
||
| 29 | 'styles' => $this->stylePath = $target, |
||
| 30 | 'sharedStrings' => $this->sharedStringPath = $target, |
||
| 31 | default => null, |
||
| 32 | }; |
||
| 33 | } |
||
| 34 | } |
||
| 35 | |||
| 36 | $this->closeXMLReader(); |
||
| 37 | } |
||
| 54 |