Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 604-614 (lines=11) @@
601
     *
602
     * @return SimpleHtmlDomInterface|null
603
     */
604
    public function lastChild()
605
    {
606
        /** @var \DOMNode|null $node */
607
        $node = $this->node->lastChild;
608
609
        if ($node === null) {
610
            return null;
611
        }
612
613
        return new static($node);
614
    }
615
616
    /**
617
     * Returns the next sibling of node.

src/voku/helper/SimpleXmlDom.php 1 location

@@ 589-599 (lines=11) @@
586
     *
587
     * @return SimpleXmlDomInterface|null
588
     */
589
    public function lastChild()
590
    {
591
        /** @var \DOMNode|null $node */
592
        $node = $this->node->lastChild;
593
594
        if ($node === null) {
595
            return null;
596
        }
597
598
        return new static($node);
599
    }
600
601
    /**
602
     * Returns the next sibling of node.