Code Duplication    Length = 20-20 lines in 2 locations

src/voku/db/Result.php 2 locations

@@ 169-188 (lines=20) @@
166
   *
167
   * @return array
168
   */
169
  public function fetchAllArray()
170
  {
171
    // init
172
    $data = array();
173
174
    if (
175
        $this->_result
176
        &&
177
        !$this->is_empty()
178
    ) {
179
      $this->reset();
180
181
      /** @noinspection PhpAssignmentInConditionInspection */
182
      while ($row = mysqli_fetch_assoc($this->_result)) {
183
        $data[] = $this->cast($row);
184
      }
185
    }
186
187
    return $data;
188
  }
189
190
  /**
191
   * fetch all results, return via Arrayy
@@ 195-214 (lines=20) @@
192
   *
193
   * @return Arrayy
194
   */
195
  public function fetchAllArrayy()
196
  {
197
    // init
198
    $data = array();
199
200
    if (
201
        $this->_result
202
        &&
203
        !$this->is_empty()
204
    ) {
205
      $this->reset();
206
207
      /** @noinspection PhpAssignmentInConditionInspection */
208
      while ($row = mysqli_fetch_assoc($this->_result)) {
209
        $data[] = $this->cast($row);
210
      }
211
    }
212
213
    return Arrayy::create($data);
214
  }
215
216
  /**
217
   * is_empty