Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 859-869 (lines=11) @@
856
     *                              <b>Traversable</b>
857
     *                           </p>
858
     */
859
    public function getIterator(): SimpleHtmlDomNodeInterface
860
    {
861
        $elements = new SimpleHtmlDomNode();
862
        if ($this->node->hasChildNodes()) {
863
            foreach ($this->node->childNodes as $node) {
864
                $elements[] = new static($node);
865
            }
866
        }
867
868
        return $elements;
869
    }
870
871
    /**
872
     * Get dom node's inner html.

src/voku/helper/SimpleXmlDom.php 1 location

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