Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 830-840 (lines=11) @@
827
     *                              <b>Traversable</b>
828
     *                           </p>
829
     */
830
    public function getIterator(): SimpleHtmlDomNodeInterface
831
    {
832
        $elements = new SimpleHtmlDomNode();
833
        if ($this->node->hasChildNodes()) {
834
            foreach ($this->node->childNodes as $node) {
835
                $elements[] = new static($node);
836
            }
837
        }
838
839
        return $elements;
840
    }
841
842
    /**
843
     * Get dom node's inner html.

src/voku/helper/SimpleXmlDom.php 1 location

@@ 725-735 (lines=11) @@
722
     *                              <b>Traversable</b>
723
     *                           </p>
724
     */
725
    public function getIterator(): SimpleXmlDomNodeInterface
726
    {
727
        $elements = new SimpleXmlDomNode();
728
        if ($this->node->hasChildNodes()) {
729
            foreach ($this->node->childNodes as $node) {
730
                $elements[] = new static($node);
731
            }
732
        }
733
734
        return $elements;
735
    }
736
737
    /**
738
     * Normalize the given input for comparision.