|
16 | 16 | use CodeIgniter\Database\BaseResult; |
17 | 17 | use CodeIgniter\Database\Exceptions\DatabaseException; |
18 | 18 | use CodeIgniter\Database\Exceptions\DataException; |
| 19 | +use CodeIgniter\Database\Query; |
19 | 20 | use CodeIgniter\Exceptions\ModelException; |
20 | 21 | use CodeIgniter\I18n\Time; |
21 | 22 | use CodeIgniter\Pager\Pager; |
@@ -393,7 +394,7 @@ abstract protected function doUpdate($id = null, $data = null): bool; |
393 | 394 | * @param int $batchSize The size of the batch to run |
394 | 395 | * @param bool $returnSQL True means SQL is returned, false will execute the query |
395 | 396 | * |
396 | | - * @return mixed Number of rows affected or FALSE on failure |
| 397 | + * @return false|int|string[] Number of rows affected or FALSE on failure, SQL array when testMode |
397 | 398 | * |
398 | 399 | * @throws DatabaseException |
399 | 400 | */ |
@@ -435,7 +436,7 @@ abstract protected function doOnlyDeleted(); |
435 | 436 | * @param array|null $data Data |
436 | 437 | * @param bool $returnSQL Set to true to return Query String |
437 | 438 | * |
438 | | - * @return mixed |
| 439 | + * @return BaseResult|false|Query|string |
439 | 440 | */ |
440 | 441 | abstract protected function doReplace(?array $data = null, bool $returnSQL = false); |
441 | 442 |
|
@@ -480,7 +481,7 @@ public function getIdValue($data) |
480 | 481 | * @param bool $reset Reset |
481 | 482 | * @param bool $test Test |
482 | 483 | * |
483 | | - * @return mixed |
| 484 | + * @return int|string |
484 | 485 | */ |
485 | 486 | abstract public function countAllResults(bool $reset = true, bool $test = false); |
486 | 487 |
|
@@ -903,7 +904,7 @@ public function update($id = null, $data = null): bool |
903 | 904 | * @param int $batchSize The size of the batch to run |
904 | 905 | * @param bool $returnSQL True means SQL is returned, false will execute the query |
905 | 906 | * |
906 | | - * @return mixed Number of rows affected or FALSE on failure |
| 907 | + * @return false|int|string[] Number of rows affected or FALSE on failure, SQL array when testMode |
907 | 908 | * |
908 | 909 | * @throws DatabaseException |
909 | 910 | * @throws ReflectionException |
@@ -997,7 +998,7 @@ public function delete($id = null, bool $purge = false) |
997 | 998 | * Permanently deletes all rows that have been marked as deleted |
998 | 999 | * through soft deletes (deleted = 1) |
999 | 1000 | * |
1000 | | - * @return mixed |
| 1001 | + * @return bool|string Returns a string if in test mode. |
1001 | 1002 | */ |
1002 | 1003 | public function purgeDeleted() |
1003 | 1004 | { |
@@ -1043,7 +1044,7 @@ public function onlyDeleted() |
1043 | 1044 | * @param array|null $data Data |
1044 | 1045 | * @param bool $returnSQL Set to true to return Query String |
1045 | 1046 | * |
1046 | | - * @return mixed |
| 1047 | + * @return BaseResult|false|Query|string |
1047 | 1048 | */ |
1048 | 1049 | public function replace(?array $data = null, bool $returnSQL = false) |
1049 | 1050 | { |
@@ -1174,7 +1175,7 @@ protected function doProtectFields(array $data): array |
1174 | 1175 | * |
1175 | 1176 | * @param int|null $userData An optional PHP timestamp to be converted. |
1176 | 1177 | * |
1177 | | - * @return mixed |
| 1178 | + * @return int|string |
1178 | 1179 | * |
1179 | 1180 | * @throws ModelException |
1180 | 1181 | */ |
@@ -1461,7 +1462,7 @@ public function allowCallbacks(bool $val = true) |
1461 | 1462 | * @param string $event Event |
1462 | 1463 | * @param array $eventData Event Data |
1463 | 1464 | * |
1464 | | - * @return mixed |
| 1465 | + * @return array |
1465 | 1466 | * |
1466 | 1467 | * @throws DataException |
1467 | 1468 | */ |
|
0 commit comments