Code Duplication    Length = 13-13 lines in 2 locations

src/voku/helper/AbstractDomParser.php 2 locations

@@ 229-241 (lines=13) @@
226
     *
227
     * @return string
228
     */
229
    public function innerHtml(bool $multiDecodeNewHtmlEntity = false): string
230
    {
231
        // init
232
        $text = '';
233
234
        if ($this->document->documentElement) {
235
            foreach ($this->document->documentElement->childNodes as $node) {
236
                $text .= $this->document->saveHTML($node);
237
            }
238
        }
239
240
        return $this->fixHtmlOutput($text, $multiDecodeNewHtmlEntity);
241
    }
242
243
    /**
244
     * Get dom node's inner html.
@@ 250-262 (lines=13) @@
247
     *
248
     * @return string
249
     */
250
    public function innerXml(bool $multiDecodeNewHtmlEntity = false): string
251
    {
252
        // init
253
        $text = '';
254
255
        if ($this->document->documentElement) {
256
            foreach ($this->document->documentElement->childNodes as $node) {
257
                $text .= $this->document->saveXML($node);
258
            }
259
        }
260
261
        return $this->fixHtmlOutput($text, $multiDecodeNewHtmlEntity);
262
    }
263
264
    /**
265
     * Load HTML from string.