Code Duplication    Length = 7-9 lines in 2 locations

src/Iterators/Product.php 1 location

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

src/Iterators/Combinations.php 1 location

@@ 98-104 (lines=7) @@
95
     * @return array
96
     *   The elements.
97
     */
98
    public function toArray()
99
    {
100
        $data = [];
101
102
        for ($this->rewind(); $this->valid(); $this->next()) {
103
            $data[] = $this->current();
104
        }
105
106
        return $data;
107
    }