Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 892-902 (lines=11) @@
889
     *                              <b>Traversable</b>
890
     *                           </p>
891
     */
892
    public function getIterator(): SimpleHtmlDomNodeInterface
893
    {
894
        $elements = new SimpleHtmlDomNode();
895
        if ($this->node->hasChildNodes()) {
896
            foreach ($this->node->childNodes as $node) {
897
                $elements[] = new static($node);
898
            }
899
        }
900
901
        return $elements;
902
    }
903
904
    /**
905
     * Get dom node's inner html.

src/voku/helper/SimpleXmlDom.php 1 location

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