Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

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

src/voku/helper/SimpleXmlDom.php 1 location

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