Code Duplication    Length = 20-20 lines in 2 locations

src/voku/db/Result.php 2 locations

@@ 199-218 (lines=20) @@
196
   *
197
   * @return array
198
   */
199
  public function fetchAllArray()
200
  {
201
    // init
202
    $data = array();
203
204
    if (
205
        $this->_result
206
        &&
207
        !$this->is_empty()
208
    ) {
209
      $this->reset();
210
211
      /** @noinspection PhpAssignmentInConditionInspection */
212
      while ($row = \mysqli_fetch_assoc($this->_result)) {
213
        $data[] = $this->cast($row);
214
      }
215
    }
216
217
    return $data;
218
  }
219
220
  /**
221
   * Fetch all results as "Arrayy"-object.
@@ 225-244 (lines=20) @@
222
   *
223
   * @return Arrayy
224
   */
225
  public function fetchAllArrayy()
226
  {
227
    // init
228
    $data = array();
229
230
    if (
231
        $this->_result
232
        &&
233
        !$this->is_empty()
234
    ) {
235
      $this->reset();
236
237
      /** @noinspection PhpAssignmentInConditionInspection */
238
      while ($row = \mysqli_fetch_assoc($this->_result)) {
239
        $data[] = $this->cast($row);
240
      }
241
    }
242
243
    return Arrayy::create($data);
244
  }
245
246
  /**
247
   * Fetch a single column as an 1-dimension array.