mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-11 18:46:49 +00:00
Fix a few Scrutinizer issues
This commit is contained in:
@@ -101,7 +101,7 @@ class XmlScanner
|
||||
$xml = call_user_func($this->callback, $xml);
|
||||
}
|
||||
} finally {
|
||||
if ($this->libxmlDisableEntityLoader) {
|
||||
if (isset($previousLibxmlDisableEntityLoaderValue)) {
|
||||
libxml_disable_entity_loader($previousLibxmlDisableEntityLoaderValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,15 +119,15 @@ class XmlScannerTest extends TestCase
|
||||
/**
|
||||
* @dataProvider providerLibxmlSettings
|
||||
*
|
||||
* @param $libxmDisableLoader
|
||||
* @param $libxmlDisableLoader
|
||||
*/
|
||||
public function testNewInstanceCreationDoesntChangeLibxmlSettings($libxmDisableLoader)
|
||||
public function testNewInstanceCreationDoesntChangeLibxmlSettings($libxmlDisableLoader)
|
||||
{
|
||||
libxml_disable_entity_loader($libxmDisableLoader);
|
||||
libxml_disable_entity_loader($libxmlDisableLoader);
|
||||
|
||||
$reader = new Xml();
|
||||
|
||||
self::assertEquals($libxmDisableLoader, libxml_disable_entity_loader($libxmDisableLoader));
|
||||
self::assertEquals($libxmlDisableLoader, libxml_disable_entity_loader($libxmlDisableLoader));
|
||||
unset($reader);
|
||||
}
|
||||
|
||||
public function providerLibxmlSettings()
|
||||
|
||||
Reference in New Issue
Block a user