Code Duplication    Length = 17-17 lines in 2 locations

src/voku/db/Result.php 2 locations

@@ 632-648 (lines=17) @@
629
   *
630
   * @return array|false <p><strong>false</strong> on error</p>
631
   */
632
  public function fetchArray(bool $reset = false)
633
  {
634
    if ($reset === true) {
635
      $this->reset();
636
    }
637
638
    $row = $this->fetch_assoc();
639
    if ($row) {
640
      return $this->cast($row);
641
    }
642
643
    if ($row === null || $row === false) {
644
      return [];
645
    }
646
647
    return false;
648
  }
649
650
  /**
651
   * Fetch data as a key/value pair array.
@@ 698-714 (lines=17) @@
695
   *
696
   * @return Arrayy|false <p><strong>false</strong> on error</p>
697
   */
698
  public function fetchArrayy(bool $reset = false)
699
  {
700
    if ($reset === true) {
701
      $this->reset();
702
    }
703
704
    $row = $this->fetch_assoc();
705
    if ($row) {
706
      return Arrayy::create($this->cast($row));
707
    }
708
709
    if ($row === null || $row === false) {
710
      return Arrayy::create();
711
    }
712
713
    return false;
714
  }
715
716
  /**
717
   * Fetches a row or a single column within a row. Returns null if there are