Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

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

src/voku/helper/SimpleXmlDom.php 1 location

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