Code Duplication    Length = 17-17 lines in 2 locations

src/voku/db/Result.php 2 locations

@@ 598-614 (lines=17) @@
595
   *
596
   * @return array|false <p><strong>false</strong> on error</p>
597
   */
598
  public function fetchArray(bool $reset = false)
599
  {
600
    if ($reset === true) {
601
      $this->reset();
602
    }
603
604
    $row = $this->fetch_assoc();
605
    if ($row) {
606
      return $this->cast($row);
607
    }
608
609
    if ($row === null || $row === false) {
610
      return [];
611
    }
612
613
    return false;
614
  }
615
616
  /**
617
   * Fetch data as a key/value pair array.
@@ 664-680 (lines=17) @@
661
   *
662
   * @return Arrayy|false <p><strong>false</strong> on error</p>
663
   */
664
  public function fetchArrayy(bool $reset = false)
665
  {
666
    if ($reset === true) {
667
      $this->reset();
668
    }
669
670
    $row = $this->fetch_assoc();
671
    if ($row) {
672
      return Arrayy::create($this->cast($row));
673
    }
674
675
    if ($row === null || $row === false) {
676
      return Arrayy::create();
677
    }
678
679
    return false;
680
  }
681
682
  /**
683
   * Fetches a row or a single column within a row. Returns null if there are