Code Duplication    Length = 11-11 lines in 2 locations

src/voku/helper/SimpleHtmlDom.php 1 location

@@ 816-826 (lines=11) @@
813
     *                              <b>Traversable</b>
814
     *                           </p>
815
     */
816
    public function getIterator(): SimpleHtmlDomNodeInterface
817
    {
818
        $elements = new SimpleHtmlDomNode();
819
        if ($this->node->hasChildNodes()) {
820
            foreach ($this->node->childNodes as $node) {
821
                $elements[] = new static($node);
822
            }
823
        }
824
825
        return $elements;
826
    }
827
828
    /**
829
     * Get dom node's inner html.

src/voku/helper/SimpleXmlDom.php 1 location

@@ 714-724 (lines=11) @@
711
     *                              <b>Traversable</b>
712
     *                           </p>
713
     */
714
    public function getIterator(): SimpleXmlDomNodeInterface
715
    {
716
        $elements = new SimpleXmlDomNode();
717
        if ($this->node->hasChildNodes()) {
718
            foreach ($this->node->childNodes as $node) {
719
                $elements[] = new static($node);
720
            }
721
        }
722
723
        return $elements;
724
    }
725
726
    /**
727
     * Normalize the given input for comparision.