Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

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

src/voku/helper/SimpleXmlDom.php 1 location

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