diff --git a/phpstan-baseline.php b/phpstan-baseline.php index edf7e2771bfb..d3a50f311dcb 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -11,26 +11,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Autoloader/Autoloader.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\BaseModel\\:\\:chunk\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/BaseModel.php', -]; $ignoreErrors[] = [ 'message' => '#^Method CodeIgniter\\\\BaseModel\\:\\:chunk\\(\\) has parameter \\$userFunc with no signature specified for Closure\\.$#', 'count' => 1, 'path' => __DIR__ . '/system/BaseModel.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\BaseModel\\:\\:doOnlyDeleted\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/BaseModel.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\BaseModel\\:\\:initialize\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/BaseModel.php', -]; $ignoreErrors[] = [ 'message' => '#^Method CodeIgniter\\\\Cache\\\\CacheInterface\\:\\:initialize\\(\\) has no return type specified\\.$#', 'count' => 1, @@ -1536,21 +1521,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Log/Handlers/ChromeLoggerHandler.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Model\\:\\:chunk\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Model.php', -]; $ignoreErrors[] = [ 'message' => '#^Method CodeIgniter\\\\Model\\:\\:chunk\\(\\) has parameter \\$userFunc with no signature specified for Closure\\.$#', 'count' => 1, 'path' => __DIR__ . '/system/Model.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Model\\:\\:doOnlyDeleted\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Model.php', -]; $ignoreErrors[] = [ 'message' => '#^Method CodeIgniter\\\\Pager\\\\Exceptions\\\\PagerException\\:\\:forInvalidPaginationGroup\\(\\) has no return type specified\\.$#', 'count' => 1, diff --git a/system/BaseModel.php b/system/BaseModel.php index 0f316e6ffa3f..cd8b475196d5 100644 --- a/system/BaseModel.php +++ b/system/BaseModel.php @@ -338,6 +338,8 @@ public function __construct(?ValidationInterface $validation = null) /** * Initializes the instance with any additional steps. * Optionally implemented by child classes. + * + * @return void */ protected function initialize() { @@ -458,6 +460,8 @@ abstract protected function doPurgeDeleted(); * Works with the find* methods to return only the rows that * have been deleted. * This method works only with dbCalls. + * + * @return void */ abstract protected function doOnlyDeleted(); @@ -524,6 +528,8 @@ abstract public function countAllResults(bool $reset = true, bool $test = false) * @param int $size Size * @param Closure $userFunc Callback Function * + * @return void + * * @throws DataException */ abstract public function chunk(int $size, Closure $userFunc); diff --git a/system/Model.php b/system/Model.php index a9c8e4f2eba9..cc901f831de1 100644 --- a/system/Model.php +++ b/system/Model.php @@ -474,6 +474,8 @@ protected function doPurgeDeleted() * Works with the find* methods to return only the rows that * have been deleted. * This method works only with dbCalls. + * + * @return void */ protected function doOnlyDeleted() { @@ -554,6 +556,8 @@ public function getIdValue($data) * determine the rows to operate on. * This method works only with dbCalls. * + * @return void + * * @throws DataException */ public function chunk(int $size, Closure $userFunc)