@@ -164,9 +164,9 @@ public function fetchAll(string $class = null, mixed ...$constructor) : array
164164 * @param string|null $class
165165 * @param mixed ...$constructor
166166 *
167- * @return object|null
167+ * @return object
168168 */
169- public function fetchRow (int $ offset , string $ class = null , mixed ...$ constructor ) : object | null
169+ public function fetchRow (int $ offset , string $ class = null , mixed ...$ constructor ) : object
170170 {
171171 $ this ->checkIsFree ();
172172 $ this ->moveCursor ($ offset );
@@ -176,12 +176,12 @@ public function fetchRow(int $offset, string $class = null, mixed ...$constructo
176176 /**
177177 * Fetches the current row as array and move the cursor to the next.
178178 *
179- * @return array<string,int|string|null>|null
179+ * @return array<string, float| int|string|null>|null
180180 */
181- public function fetchArray () : ? array
181+ public function fetchArray () : array | null
182182 {
183183 $ this ->checkIsFree ();
184- return $ this ->result ->fetch_assoc ();
184+ return $ this ->result ->fetch_assoc (); // @phpstan-ignore-line
185185 }
186186
187187 /**
@@ -200,13 +200,13 @@ public function fetchArrayAll() : array
200200 *
201201 * @param int $offset
202202 *
203- * @return array<string,int|string|null>
203+ * @return array<string, float| int|string|null>
204204 */
205205 public function fetchArrayRow (int $ offset ) : array
206206 {
207207 $ this ->checkIsFree ();
208208 $ this ->moveCursor ($ offset );
209- return $ this ->result ->fetch_assoc ();
209+ return $ this ->result ->fetch_assoc (); // @phpstan-ignore-line
210210 }
211211
212212 /**
@@ -229,10 +229,10 @@ public function numRows() : int | string
229229 public function fetchFields () : array
230230 {
231231 $ this ->checkIsFree ();
232- $ fields = $ this -> result -> fetch_fields () ;
233- foreach ($ fields as & $ field ) {
234- $ field = new Field ($ field );
232+ $ fields = [] ;
233+ foreach ($ this -> result -> fetch_fields () as $ field ) {
234+ $ fields [] = new Field ($ field );
235235 }
236- return $ fields ; // @phpstan-ignore-line
236+ return $ fields ;
237237 }
238238}
0 commit comments