Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 441-451 (lines=11) @@
438
     *
439
     * @return SimpleHtmlDomInterface|null
440
     */
441
    public function firstChild()
442
    {
443
        /** @var \DOMNode|null $node */
444
        $node = $this->node->firstChild;
445
446
        if ($node === null) {
447
            return null;
448
        }
449
450
        return new static($node);
451
    }
452
453
    /**
454
     * Return elements by ".class".

src/voku/helper/SimpleXmlDom.php 1 location

@@ 415-425 (lines=11) @@
412
     *
413
     * @return SimpleXmlDomInterface|null
414
     */
415
    public function firstChild()
416
    {
417
        /** @var \DOMNode|null $node */
418
        $node = $this->node->firstChild;
419
420
        if ($node === null) {
421
            return null;
422
        }
423
424
        return new static($node);
425
    }
426
427
    /**
428
     * Return elements by ".class".