Skip to content

Commit d0dea58

Browse files
committed
Fix a few Scrutinizer issues
1 parent 0e8fde9 commit d0dea58

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/PhpSpreadsheet/Reader/Security/XmlScanner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function scan($xml)
101101
$xml = call_user_func($this->callback, $xml);
102102
}
103103
} finally {
104-
if ($this->libxmlDisableEntityLoader) {
104+
if (isset($previousLibxmlDisableEntityLoaderValue)) {
105105
libxml_disable_entity_loader($previousLibxmlDisableEntityLoaderValue);
106106
}
107107
}

tests/PhpSpreadsheetTests/Reader/Security/XmlScannerTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ public function providerValidXMLForCallback()
119119
/**
120120
* @dataProvider providerLibxmlSettings
121121
*
122-
* @param $libxmDisableLoader
122+
* @param $libxmlDisableLoader
123123
*/
124-
public function testNewInstanceCreationDoesntChangeLibxmlSettings($libxmDisableLoader)
124+
public function testNewInstanceCreationDoesntChangeLibxmlSettings($libxmlDisableLoader)
125125
{
126-
libxml_disable_entity_loader($libxmDisableLoader);
126+
libxml_disable_entity_loader($libxmlDisableLoader);
127127

128128
$reader = new Xml();
129-
130-
self::assertEquals($libxmDisableLoader, libxml_disable_entity_loader($libxmDisableLoader));
129+
self::assertEquals($libxmlDisableLoader, libxml_disable_entity_loader($libxmlDisableLoader));
130+
unset($reader);
131131
}
132132

133133
public function providerLibxmlSettings()

0 commit comments

Comments
 (0)