Code Duplication    Length = 17-17 lines in 2 locations

src/voku/db/Result.php 2 locations

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