8484 * @method $this where($key, $value = null, ?bool $escape = null)
8585 * @method $this whereIn(?string $key = null, $values = null, ?bool $escape = null)
8686 * @method $this whereNotIn(?string $key = null, $values = null, ?bool $escape = null)
87+ *
88+ * @phpstan-import-type row_array from BaseModel
8789 */
8890class Model extends BaseModel
8991{
@@ -178,6 +180,7 @@ public function setTable(string $table)
178180 * @param array|int|string|null $id One primary key or an array of primary keys
179181 *
180182 * @return array|object|null The resulting row of data, or null.
183+ * @phpstan-return ($singleton is true ? row_array|null|object : list<row_array|object>)
181184 */
182185 protected function doFind (bool $ singleton , $ id = null )
183186 {
@@ -224,6 +227,7 @@ protected function doFindColumn(string $columnName)
224227 * @param int $offset Offset
225228 *
226229 * @return array
230+ * @phpstan-return list<row_array|object>
227231 */
228232 protected function doFindAll (int $ limit = 0 , int $ offset = 0 )
229233 {
@@ -244,6 +248,7 @@ protected function doFindAll(int $limit = 0, int $offset = 0)
244248 * This method works only with dbCalls.
245249 *
246250 * @return array|object|null
251+ * @phpstan-return row_array|object|null
247252 */
248253 protected function doFirst ()
249254 {
@@ -411,7 +416,7 @@ protected function doUpdateBatch(?array $set = null, ?string $index = null, int
411416 * @param array|int|string|null $id The rows primary key(s)
412417 * @param bool $purge Allows overriding the soft deletes setting.
413418 *
414- * @return bool|string
419+ * @return bool|string SQL string when testMode
415420 *
416421 * @throws DatabaseException
417422 */
@@ -450,7 +455,7 @@ protected function doDelete($id = null, bool $purge = false)
450455 * through soft deletes (deleted = 1)
451456 * This method works only with dbCalls.
452457 *
453- * @return bool|string Returns a string if in test mode.
458+ * @return bool|string Returns a SQL string if in test mode.
454459 */
455460 protected function doPurgeDeleted ()
456461 {
@@ -491,7 +496,7 @@ protected function doReplace(?array $data = null, bool $returnSQL = false)
491496 * ['source' => 'message']
492497 * This method works only with dbCalls.
493498 *
494- * @return array<string,string>
499+ * @return array<string, string>
495500 */
496501 protected function doErrors ()
497502 {
0 commit comments