Code Duplication    Length = 11-11 lines in 2 locations

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.

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 908-918 (lines=11) @@
905
     *                              <b>Traversable</b>
906
     *                           </p>
907
     */
908
    public function getIterator(): SimpleHtmlDomNodeInterface
909
    {
910
        $elements = new SimpleHtmlDomNode();
911
        if ($this->node->hasChildNodes()) {
912
            foreach ($this->node->childNodes as $node) {
913
                $elements[] = new static($node);
914
            }
915
        }
916
917
        return $elements;
918
    }
919
920
    /**
921
     * Get dom node's inner html.