Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/XmlDomParser.php 1 location

@@ 138-148 (lines=11) @@
135
136
        $documentFound = false;
137
        $sxe = \simplexml_load_string($xml, \SimpleXMLElement::class, $optionsXml);
138
        if ($sxe !== false && \count(\libxml_get_errors()) === 0) {
139
            $domElementTmp = \dom_import_simplexml($sxe);
140
            if (
141
                $domElementTmp
142
                &&
143
                $domElementTmp->ownerDocument
144
            ) {
145
                $documentFound = true;
146
                $this->document = $domElementTmp->ownerDocument;
147
            }
148
        }
149
150
        if ($documentFound === false) {
151

src/voku/helper/HtmlDomParser.php 1 location

@@ 420-430 (lines=11) @@
417
418
        $documentFound = false;
419
        $sxe = \simplexml_load_string($html, \SimpleXMLElement::class, $optionsXml);
420
        if ($sxe !== false && \count(\libxml_get_errors()) === 0) {
421
            $domElementTmp = \dom_import_simplexml($sxe);
422
            if (
423
                $domElementTmp
424
                &&
425
                $domElementTmp->ownerDocument
426
            ) {
427
                $documentFound = true;
428
                $this->document = $domElementTmp->ownerDocument;
429
            }
430
        }
431
432
        if ($documentFound === false) {
433