Skip to content

Commit 1f331d0

Browse files
committed
Remove constructor & add LIBXML_NSCLEAN
1 parent a3bed1a commit 1f331d0

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/DOMDocumentFactory.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,6 @@
2626
*/
2727
final class DOMDocumentFactory
2828
{
29-
/**
30-
* Constructor for DOMDocumentFactory.
31-
* This class should never be instantiated
32-
*/
33-
private function __construct()
34-
{
35-
}
36-
37-
3829
/**
3930
* @param non-empty-string $xml
4031
*
@@ -48,7 +39,7 @@ public static function fromString(string $xml): DOMDocument
4839
libxml_clear_errors();
4940

5041
$domDocument = self::create();
51-
$options = LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_NONET | LIBXML_PARSEHUGE;
42+
$options = LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_NONET | LIBXML_PARSEHUGE | LIBXML_NSCLEAN;
5243
if (defined('LIBXML_COMPACT')) {
5344
$options |= LIBXML_COMPACT;
5445
}

0 commit comments

Comments
 (0)