Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 837-847 (lines=11) @@
834
     *                              <b>Traversable</b>
835
     *                           </p>
836
     */
837
    public function getIterator(): SimpleHtmlDomNodeInterface
838
    {
839
        $elements = new SimpleHtmlDomNode();
840
        if ($this->node->hasChildNodes()) {
841
            foreach ($this->node->childNodes as $node) {
842
                $elements[] = new static($node);
843
            }
844
        }
845
846
        return $elements;
847
    }
848
849
    /**
850
     * Get dom node's inner html.

src/voku/helper/SimpleXmlDom.php 1 location

@@ 733-743 (lines=11) @@
730
     *                              <b>Traversable</b>
731
     *                           </p>
732
     */
733
    public function getIterator(): SimpleXmlDomNodeInterface
734
    {
735
        $elements = new SimpleXmlDomNode();
736
        if ($this->node->hasChildNodes()) {
737
            foreach ($this->node->childNodes as $node) {
738
                $elements[] = new static($node);
739
            }
740
        }
741
742
        return $elements;
743
    }
744
745
    /**
746
     * Normalize the given input for comparision.