Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 458-468 (lines=11) @@
455
     *
456
     * @return SimpleHtmlDomInterface|null
457
     */
458
    public function firstChild()
459
    {
460
        /** @var \DOMNode|null $node */
461
        $node = $this->node->firstChild;
462
463
        if ($node === null) {
464
            return null;
465
        }
466
467
        return new static($node);
468
    }
469
470
    /**
471
     * Return elements by ".class".

src/voku/helper/SimpleXmlDom.php 1 location

@@ 431-441 (lines=11) @@
428
     *
429
     * @return SimpleXmlDomInterface|null
430
     */
431
    public function firstChild()
432
    {
433
        /** @var \DOMNode|null $node */
434
        $node = $this->node->firstChild;
435
436
        if ($node === null) {
437
            return null;
438
        }
439
440
        return new static($node);
441
    }
442
443
    /**
444
     * Return elements by ".class".