Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 850-860 (lines=11) @@
847
     *                              <b>Traversable</b>
848
     *                           </p>
849
     */
850
    public function getIterator(): SimpleHtmlDomNodeInterface
851
    {
852
        $elements = new SimpleHtmlDomNode();
853
        if ($this->node->hasChildNodes()) {
854
            foreach ($this->node->childNodes as $node) {
855
                $elements[] = new static($node);
856
            }
857
        }
858
859
        return $elements;
860
    }
861
862
    /**
863
     * Get dom node's inner html.

src/voku/helper/SimpleXmlDom.php 1 location

@@ 757-767 (lines=11) @@
754
     *                              <b>Traversable</b>
755
     *                           </p>
756
     */
757
    public function getIterator(): SimpleXmlDomNodeInterface
758
    {
759
        $elements = new SimpleXmlDomNode();
760
        if ($this->node->hasChildNodes()) {
761
            foreach ($this->node->childNodes as $node) {
762
                $elements[] = new static($node);
763
            }
764
        }
765
766
        return $elements;
767
    }
768
769
    /**
770
     * Normalize the given input for comparision.