Code Duplication    Length = 20-20 lines in 2 locations

src/voku/db/Result.php 2 locations

@@ 312-331 (lines=20) @@
309
   *
310
   * @return array
311
   */
312
  public function fetchAllArray()
313
  {
314
    // init
315
    $data = array();
316
317
    if (
318
        $this->_result
319
        &&
320
        !$this->is_empty()
321
    ) {
322
      $this->reset();
323
324
      /** @noinspection PhpAssignmentInConditionInspection */
325
      while ($row = \mysqli_fetch_assoc($this->_result)) {
326
        $data[] = $this->cast($row);
327
      }
328
    }
329
330
    return $data;
331
  }
332
333
  /**
334
   * Fetch all results as "Arrayy"-object.
@@ 338-357 (lines=20) @@
335
   *
336
   * @return Arrayy
337
   */
338
  public function fetchAllArrayy()
339
  {
340
    // init
341
    $data = array();
342
343
    if (
344
        $this->_result
345
        &&
346
        !$this->is_empty()
347
    ) {
348
      $this->reset();
349
350
      /** @noinspection PhpAssignmentInConditionInspection */
351
      while ($row = \mysqli_fetch_assoc($this->_result)) {
352
        $data[] = $this->cast($row);
353
      }
354
    }
355
356
    return Arrayy::create($data);
357
  }
358
359
  /**
360
   * Fetch a single column as an 1-dimension array.