Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 792-802 (lines=11) @@
789
     *                              <b>Traversable</b>
790
     *                           </p>
791
     */
792
    public function getIterator(): SimpleHtmlDomNodeInterface
793
    {
794
        $elements = new SimpleHtmlDomNode();
795
        if ($this->node->hasChildNodes()) {
796
            foreach ($this->node->childNodes as $node) {
797
                $elements[] = new static($node);
798
            }
799
        }
800
801
        return $elements;
802
    }
803
804
    /**
805
     * Get dom node's inner html.

src/voku/helper/SimpleXmlDom.php 1 location

@@ 690-700 (lines=11) @@
687
     *                              <b>Traversable</b>
688
     *                           </p>
689
     */
690
    public function getIterator(): SimpleXmlDomNodeInterface
691
    {
692
        $elements = new SimpleXmlDomNode();
693
        if ($this->node->hasChildNodes()) {
694
            foreach ($this->node->childNodes as $node) {
695
                $elements[] = new static($node);
696
            }
697
        }
698
699
        return $elements;
700
    }
701
702
    /**
703
     * Normalize the given input for comparision.