Code Duplication    Length = 17-17 lines in 2 locations

src/voku/db/Result.php 2 locations

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