Code Duplication    Length = 7-9 lines in 2 locations

src/Combinations.php 1 location

@@ 105-111 (lines=7) @@
102
  /**
103
   * @return array
104
   */
105
  public function toArray() {
106
    $data = [];
107
    for($this->rewind(); $this->valid(); $this->next()) {
108
      $data[] = $this->current();
109
    }
110
    return $data;
111
  }
112
113
  /**
114
   * @return int

src/Product.php 1 location

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