Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

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

src/voku/helper/SimpleXmlDom.php 1 location

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