@@ -113,28 +113,44 @@ public function setRow($key, $value = null);
113113 /**
114114 * Returns the "first" row of the current results.
115115 *
116- * @return array|object|null
116+ * @template T of object
117+ *
118+ * @param 'array'|'object'|class-string<T> $type The type of result object. 'array', 'object' or class name.
119+ *
120+ * @return ($type is 'object' ? stdClass|null : ($type is 'array' ? array|null : T|null))
117121 */
118122 public function getFirstRow (string $ type = 'object ' );
119123
120124 /**
121125 * Returns the "last" row of the current results.
122126 *
123- * @return array|object|null
127+ * @template T of object
128+ *
129+ * @param 'array'|'object'|class-string<T> $type The type of result object. 'array', 'object' or class name.
130+ *
131+ * @return ($type is 'object' ? stdClass|null : ($type is 'array' ? array|null : T|null))
124132 */
125133 public function getLastRow (string $ type = 'object ' );
126134
127135 /**
128136 * Returns the "next" row of the current results.
129137 *
130- * @return array|object|null
138+ * @template T of object
139+ *
140+ * @param 'array'|'object'|class-string<T> $type The type of result object. 'array', 'object' or class name.
141+ *
142+ * @return ($type is 'object' ? stdClass|null : ($type is 'array' ? array|null : T|null))
131143 */
132144 public function getNextRow (string $ type = 'object ' );
133145
134146 /**
135147 * Returns the "previous" row of the current results.
136148 *
137- * @return array|object|null
149+ * @template T of object
150+ *
151+ * @param 'array'|'object'|class-string<T> $type The type of result object. 'array', 'object' or class name.
152+ *
153+ * @return ($type is 'object' ? stdClass|null : ($type is 'array' ? array|null : T|null))
138154 */
139155 public function getPreviousRow (string $ type = 'object ' );
140156
0 commit comments