Fix a few Scrutinizer issues
This commit is contained in:
parent
0e8fde9be6
commit
d0dea580ad
|
@ -101,7 +101,7 @@ class XmlScanner
|
||||||
$xml = call_user_func($this->callback, $xml);
|
$xml = call_user_func($this->callback, $xml);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
if ($this->libxmlDisableEntityLoader) {
|
if (isset($previousLibxmlDisableEntityLoaderValue)) {
|
||||||
libxml_disable_entity_loader($previousLibxmlDisableEntityLoaderValue);
|
libxml_disable_entity_loader($previousLibxmlDisableEntityLoaderValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,15 +119,15 @@ class XmlScannerTest extends TestCase
|
||||||
/**
|
/**
|
||||||
* @dataProvider providerLibxmlSettings
|
* @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();
|
$reader = new Xml();
|
||||||
|
self::assertEquals($libxmlDisableLoader, libxml_disable_entity_loader($libxmlDisableLoader));
|
||||||
self::assertEquals($libxmDisableLoader, libxml_disable_entity_loader($libxmDisableLoader));
|
unset($reader);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerLibxmlSettings()
|
public function providerLibxmlSettings()
|
||||||
|
|
Loading…
Reference in New Issue