Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
43 | private function validateXMLReader(XMLReader $xml): XMLReader |
||
44 | { |
||
45 | try { |
||
46 | $xml->open(uri: $this->path); |
||
47 | } catch (Throwable $throwable) { |
||
48 | throw new InvalidArgumentException(message: sprintf('Not a XLSX file: %s', $this->path), previous: $throwable); |
||
49 | } |
||
50 | |||
51 | return $xml; |
||
52 | } |
||
54 |