| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function __construct(string $filePath) |
||
| 17 | { |
||
| 18 | Assert::fileExists($filePath); |
||
| 19 | $this->filePath = $filePath; |
||
| 20 | |||
| 21 | $fileContent = file_get_contents($filePath); |
||
| 22 | Assert::string($fileContent); |
||
| 23 | |||
| 24 | $simpleXmlElement = simplexml_load_string($fileContent); |
||
| 25 | Assert::isInstanceOf($simpleXmlElement, SimpleXMLElement::class); |
||
| 26 | |||
| 27 | $this->data = $simpleXmlElement; |
||
| 28 | } |
||
| 40 |