Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 885-895 (lines=11) @@
882
     *                              <b>Traversable</b>
883
     *                           </p>
884
     */
885
    public function getIterator(): SimpleHtmlDomNodeInterface
886
    {
887
        $elements = new SimpleHtmlDomNode();
888
        if ($this->node->hasChildNodes()) {
889
            foreach ($this->node->childNodes as $node) {
890
                $elements[] = new static($node);
891
            }
892
        }
893
894
        return $elements;
895
    }
896
897
    /**
898
     * Get dom node's inner html.

src/voku/helper/SimpleXmlDom.php 1 location

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