1111
1212namespace CodeIgniter \Database ;
1313
14+ use stdClass ;
15+
1416/**
1517 * @template TConnection of object|resource
1618 * @template TResult of object|resource
@@ -31,7 +33,7 @@ public function getResult(string $type = 'object'): array;
3133 *
3234 * @param string $className The name of the class to use.
3335 *
34- * @return mixed
36+ * @return array
3537 */
3638 public function getCustomResultObject (string $ className );
3739
@@ -55,10 +57,11 @@ public function getResultObject(): array;
5557 *
5658 * If row doesn't exist, returns null.
5759 *
58- * @param mixed $n The index of the results to return
60+ * @param int $n The index of the results to return
5961 * @param string $type The type of result object. 'array', 'object' or class name.
6062 *
61- * @return mixed
63+ * @return array|object|stdClass|null
64+ * @phpstan-return ($type is 'object' ? stdClass|null : ($type is 'array' ? array|null : object|null))
6265 */
6366 public function getRow ($ n = 0 , string $ type = 'object ' );
6467
@@ -67,7 +70,7 @@ public function getRow($n = 0, string $type = 'object');
6770 *
6871 * If row doesn't exists, returns null.
6972 *
70- * @return mixed
73+ * @return array|null
7174 */
7275 public function getCustomRowObject (int $ n , string $ className );
7376
@@ -76,7 +79,7 @@ public function getCustomRowObject(int $n, string $className);
7679 *
7780 * If row doesn't exist, returns null.
7881 *
79- * @return mixed
82+ * @return array|null
8083 */
8184 public function getRowArray (int $ n = 0 );
8285
@@ -85,45 +88,45 @@ public function getRowArray(int $n = 0);
8588 *
8689 * If row doesn't exist, returns null.
8790 *
88- * @return mixed
91+ * @return object|stdClass|null
8992 */
9093 public function getRowObject (int $ n = 0 );
9194
9295 /**
9396 * Assigns an item into a particular column slot.
9497 *
95- * @param string $key
96- * @param mixed $value
98+ * @param array| string $key
99+ * @param array|object|stdClass|null $value
97100 *
98- * @return mixed
101+ * @return void
99102 */
100103 public function setRow ($ key , $ value = null );
101104
102105 /**
103106 * Returns the "first" row of the current results.
104107 *
105- * @return mixed
108+ * @return array|object|null
106109 */
107110 public function getFirstRow (string $ type = 'object ' );
108111
109112 /**
110113 * Returns the "last" row of the current results.
111114 *
112- * @return mixed
115+ * @return array|object|null
113116 */
114117 public function getLastRow (string $ type = 'object ' );
115118
116119 /**
117120 * Returns the "next" row of the current results.
118121 *
119- * @return mixed
122+ * @return array|object|null
120123 */
121124 public function getNextRow (string $ type = 'object ' );
122125
123126 /**
124127 * Returns the "previous" row of the current results.
125128 *
126- * @return mixed
129+ * @return array|object|null
127130 */
128131 public function getPreviousRow (string $ type = 'object ' );
129132
@@ -135,7 +138,7 @@ public function getNumRows(): int;
135138 /**
136139 * Returns an unbuffered row and move the pointer to the next row.
137140 *
138- * @return mixed
141+ * @return array|object|null
139142 */
140143 public function getUnbufferedRow (string $ type = 'object ' );
141144
@@ -164,7 +167,7 @@ public function freeResult();
164167 * internally before fetching results to make sure the result set
165168 * starts at zero.
166169 *
167- * @return mixed
170+ * @return bool
168171 */
169172 public function dataSeek (int $ n = 0 );
170173}
0 commit comments