Skip to content
Snippets Groups Projects
Commit 081a93b4 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fix PossiblyUndefinedVariable|PossiblyNullArgument

parent 8a3d5a71
No related branches found
No related tags found
No related merge requests found
...@@ -262,6 +262,7 @@ class XML ...@@ -262,6 +262,7 @@ class XML
} }
$root = $doc->firstChild; $root = $doc->firstChild;
Assert::notNull($root);
self::formatDOMElement($root, $indentBase); self::formatDOMElement($root, $indentBase);
return $doc->saveXML($root); return $doc->saveXML($root);
...@@ -424,7 +425,7 @@ class XML ...@@ -424,7 +425,7 @@ class XML
} }
} }
if ($res) { if ($res === true) {
$config = Configuration::getInstance(); $config = Configuration::getInstance();
/** @var string $schemaPath */ /** @var string $schemaPath */
$schemaPath = $config->resolvePath('schemas'); $schemaPath = $config->resolvePath('schemas');
...@@ -445,6 +446,7 @@ class XML ...@@ -445,6 +446,7 @@ class XML
} }
); );
/** @psalm-suppress PossiblyUndefinedVariable */
$res = $dom->schemaValidate($schemaFile); $res = $dom->schemaValidate($schemaFile);
if ($res) { if ($res) {
Errors::end(); Errors::end();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment