Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 406-416 (lines=11) @@
403
     *
404
     * @return SimpleHtmlDomInterface|null
405
     */
406
    public function firstChild()
407
    {
408
        /** @var \DOMNode|null $node */
409
        $node = $this->node->firstChild;
410
411
        if ($node === null) {
412
            return null;
413
        }
414
415
        return new static($node);
416
    }
417
418
    /**
419
     * Return elements by .class.

src/voku/helper/SimpleXmlDom.php 1 location

@@ 380-390 (lines=11) @@
377
     *
378
     * @return SimpleXmlDomInterface|null
379
     */
380
    public function firstChild()
381
    {
382
        /** @var \DOMNode|null $node */
383
        $node = $this->node->firstChild;
384
385
        if ($node === null) {
386
            return null;
387
        }
388
389
        return new static($node);
390
    }
391
392
    /**
393
     * Return elements by .class.