Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

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

src/voku/helper/SimpleXmlDom.php 1 location

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