Code Duplication    Length = 7-9 lines in 2 locations

src/Iterators/Combinations.php 1 location

@@ 121-127 (lines=7) @@
118
   * @return array
119
   *   The elements.
120
   */
121
    public function toArray()
122
    {
123
        $data = [];
124
125
        for ($this->rewind(); $this->valid(); $this->next()) {
126
            $data[] = $this->current();
127
        }
128
129
        return $data;
130
    }

src/Iterators/Product.php 1 location

@@ 137-145 (lines=9) @@
134
   * @return array
135
   *   The elements.
136
   */
137
    public function toArray()
138
    {
139
        $data = array();
140
141
        for ($this->rewind(); $this->valid(); $this->next()) {
142
            $data[] = $this->current();
143
        }
144
145
        return $data;
146
    }
147
}
148