Code Duplication    Length = 20-20 lines in 2 locations

src/voku/db/Result.php 2 locations

@@ 113-132 (lines=20) @@
110
   *
111
   * @return array
112
   */
113
  public function fetchAllArray()
114
  {
115
    // init
116
    $data = array();
117
118
    if (
119
        $this->_result
120
        &&
121
        !$this->is_empty()
122
    ) {
123
      $this->reset();
124
125
      /** @noinspection PhpAssignmentInConditionInspection */
126
      while ($row = mysqli_fetch_assoc($this->_result)) {
127
        $data[] = $row;
128
      }
129
    }
130
131
    return $data;
132
  }
133
134
  /**
135
   * fetch all results, return via Arrayy
@@ 139-158 (lines=20) @@
136
   *
137
   * @return Arrayy
138
   */
139
  public function fetchAllArrayy()
140
  {
141
    // init
142
    $data = array();
143
144
    if (
145
        $this->_result
146
        &&
147
        !$this->is_empty()
148
    ) {
149
      $this->reset();
150
151
      /** @noinspection PhpAssignmentInConditionInspection */
152
      while ($row = mysqli_fetch_assoc($this->_result)) {
153
        $data[] = $row;
154
      }
155
    }
156
157
    return Arrayy::create($data);
158
  }
159
160
  /**
161
   * is_empty