Code Duplication    Length = 7-9 lines in 2 locations

src/Iterators/Combinations.php 1 location

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

src/Iterators/Product.php 1 location

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