Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

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

src/voku/helper/SimpleXmlDom.php 1 location

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