Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

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

src/voku/helper/SimpleXmlDom.php 1 location

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