Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function testSetXMLSettings() |
||
31 | { |
||
32 | \PhpOffice\PhpSpreadsheet\Settings::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID); |
||
33 | $result = \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions(); |
||
34 | $this->assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID) & $result)); |
||
35 | $this->assertFalse(libxml_disable_entity_loader()); |
||
36 | } |
||
37 | } |
||
38 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.