Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

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

src/voku/helper/SimpleXmlDom.php 1 location

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