From d9af194b4c46a01737826132153a984b2d404e4b Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Mon, 29 Jun 2026 21:17:44 +0800 Subject: [PATCH 1/2] refactor: replace narrowable mixed PHPDocs with specific types --- system/Config/BaseConfig.php | 2 +- system/Database/BaseBuilder.php | 4 +- system/Database/BaseConnection.php | 2 +- system/Database/BaseUtils.php | 4 +- system/Database/ConnectionInterface.php | 2 +- system/Database/OCI8/Builder.php | 2 +- system/Database/Postgre/Builder.php | 2 +- system/Database/SQLSRV/Builder.php | 4 +- system/Database/SQLSRV/Forge.php | 2 +- system/Encryption/Handlers/BaseHandler.php | 2 +- system/Encryption/KeyRotationDecorator.php | 2 +- system/HTTP/IncomingRequest.php | 6 +- system/I18n/TimeTrait.php | 2 +- system/Test/Mock/MockConnection.php | 2 +- system/Traits/ConditionalTrait.php | 2 - utils/phpstan-baseline/empty.notAllowed.neon | 2 +- utils/phpstan-baseline/loader.neon | 2 +- .../method.childParameterType.neon | 7 +-- .../missingType.iterableValue.neon | 57 +------------------ 19 files changed, 23 insertions(+), 85 deletions(-) diff --git a/system/Config/BaseConfig.php b/system/Config/BaseConfig.php index 24c1ce019c08..40782a243b96 100644 --- a/system/Config/BaseConfig.php +++ b/system/Config/BaseConfig.php @@ -166,7 +166,7 @@ protected function parseEncryptionKey(string $key): string /** * Initialization an environment-specific configuration setting * - * @param array|bool|float|int|string|null $property + * @param array|bool|float|int|string|null $property * * @return void */ diff --git a/system/Database/BaseBuilder.php b/system/Database/BaseBuilder.php index df2fa411ca36..4900d7cd3db7 100644 --- a/system/Database/BaseBuilder.php +++ b/system/Database/BaseBuilder.php @@ -2817,7 +2817,7 @@ public function getCompiledDelete(bool $reset = true): string /** * Compiles a delete string and runs the query * - * @param array|RawSql|string $where + * @param array|RawSql|string $where * * @return bool|string Returns a SQL string if in test mode. * @@ -3075,7 +3075,7 @@ protected function trackAliases($table) * Generates a query string based on which functions were used. * Should not be called directly. * - * @param mixed $selectOverride + * @param false|string $selectOverride */ protected function compileSelect($selectOverride = false): string { diff --git a/system/Database/BaseConnection.php b/system/Database/BaseConnection.php index 273e4c60c4d5..b4aed2d6209b 100644 --- a/system/Database/BaseConnection.php +++ b/system/Database/BaseConnection.php @@ -781,7 +781,7 @@ abstract protected function execute(string $sql); * Should automatically handle different connections for read/write * queries if needed. * - * @param array|string|null $binds + * @param array|string|null $binds * * @return BaseResult|bool|Query * diff --git a/system/Database/BaseUtils.php b/system/Database/BaseUtils.php index a9310e1d4e32..0286e177a060 100644 --- a/system/Database/BaseUtils.php +++ b/system/Database/BaseUtils.php @@ -125,7 +125,7 @@ public function optimizeTable(string $tableName) /** * Optimize Database * - * @return mixed + * @return array|bool * * @throws DatabaseException */ @@ -170,7 +170,7 @@ public function optimizeDatabase() /** * Repair Table * - * @return mixed + * @return array|bool * * @throws DatabaseException */ diff --git a/system/Database/ConnectionInterface.php b/system/Database/ConnectionInterface.php index 97c8fa0bbcba..3c493e12e818 100644 --- a/system/Database/ConnectionInterface.php +++ b/system/Database/ConnectionInterface.php @@ -100,7 +100,7 @@ public function getVersion(): string; * Should automatically handle different connections for read/write * queries if needed. * - * @param array|string|null $binds + * @param array|string|null $binds * * @return BaseResult|bool|Query */ diff --git a/system/Database/OCI8/Builder.php b/system/Database/OCI8/Builder.php index 0bbf4283d056..25af517dc959 100644 --- a/system/Database/OCI8/Builder.php +++ b/system/Database/OCI8/Builder.php @@ -150,7 +150,7 @@ protected function _truncate(string $table): string /** * Compiles a delete string and runs the query * - * @param mixed $where + * @param array|RawSql|string $where * * @return bool|string * diff --git a/system/Database/Postgre/Builder.php b/system/Database/Postgre/Builder.php index 502a5278482f..4cf0bde40060 100644 --- a/system/Database/Postgre/Builder.php +++ b/system/Database/Postgre/Builder.php @@ -225,7 +225,7 @@ protected function _insertBatch(string $table, array $keys, array $values): stri /** * Compiles a delete string and runs the query * - * @param mixed $where + * @param array|RawSql|string $where * * @return bool|string * diff --git a/system/Database/SQLSRV/Builder.php b/system/Database/SQLSRV/Builder.php index 67f2f26c33f9..098b08599808 100644 --- a/system/Database/SQLSRV/Builder.php +++ b/system/Database/SQLSRV/Builder.php @@ -538,7 +538,7 @@ protected function _delete(string $table): string /** * Compiles a delete string and runs the query * - * @param mixed $where + * @param array|RawSql|string $where * * @return bool|string * @@ -578,7 +578,7 @@ public function delete($where = '', ?int $limit = null, bool $resetData = true) * * Generates a query string based on which functions were used. * - * @param bool $selectOverride + * @param false|string $selectOverride */ protected function compileSelect($selectOverride = false): string { diff --git a/system/Database/SQLSRV/Forge.php b/system/Database/SQLSRV/Forge.php index 0622de5e8e81..64a4ffaf6d35 100644 --- a/system/Database/SQLSRV/Forge.php +++ b/system/Database/SQLSRV/Forge.php @@ -321,7 +321,7 @@ protected function _alterTable(string $alterType, string $table, $processedField /** * Drop index for table * - * @return mixed + * @return false|resource */ protected function _dropIndex(string $table, object $indexData) { diff --git a/system/Encryption/Handlers/BaseHandler.php b/system/Encryption/Handlers/BaseHandler.php index 365ed961d323..c324a465dbb8 100644 --- a/system/Encryption/Handlers/BaseHandler.php +++ b/system/Encryption/Handlers/BaseHandler.php @@ -55,7 +55,7 @@ protected static function substr($str, $start, $length = null) * * @param string $key Property name * - * @return array|bool|int|string|null + * @return array|bool|int|string|null */ public function __get($key) { diff --git a/system/Encryption/KeyRotationDecorator.php b/system/Encryption/KeyRotationDecorator.php index 8778b7ce800b..9e4b6ef0002b 100644 --- a/system/Encryption/KeyRotationDecorator.php +++ b/system/Encryption/KeyRotationDecorator.php @@ -86,7 +86,7 @@ public function decrypt($data, #[SensitiveParameter] $params = null) /** * Delegate property access to the inner handler. * - * @return array|bool|int|string|null + * @return array|bool|int|string|null */ public function __get(string $key) { diff --git a/system/HTTP/IncomingRequest.php b/system/HTTP/IncomingRequest.php index f9a57a4098ba..3b2c21348cea 100644 --- a/system/HTTP/IncomingRequest.php +++ b/system/HTTP/IncomingRequest.php @@ -363,7 +363,7 @@ public function getDefaultLocale(): string * @param int|null $filter Filter constant * @param array|int|null $flags * - * @return array|bool|float|int|stdClass|string|null + * @return array|bool|float|int|stdClass|string|null */ public function getVar($index = null, $filter = null, $flags = null) { @@ -390,7 +390,7 @@ public function getVar($index = null, $filter = null, $flags = null) * * @see http://php.net/manual/en/function.json-decode.php * - * @return array|bool|float|int|stdClass|null + * @return array|bool|float|int|stdClass|null * * @throws HTTPException When the body is invalid as JSON. */ @@ -417,7 +417,7 @@ public function getJSON(bool $assoc = false, int $depth = 512, int $options = 0) * @param int|null $filter Filter Constant * @param array|int|null $flags Option * - * @return array|bool|float|int|stdClass|string|null + * @return array|bool|float|int|stdClass|string|null */ public function getJsonVar($index = null, bool $assoc = false, ?int $filter = null, $flags = null) { diff --git a/system/I18n/TimeTrait.php b/system/I18n/TimeTrait.php index 9daa1f9b7848..04499668f5ed 100644 --- a/system/I18n/TimeTrait.php +++ b/system/I18n/TimeTrait.php @@ -1211,7 +1211,7 @@ public function __toString(): string * * @param string $name * - * @return array|bool|DateTimeInterface|DateTimeZone|int|IntlCalendar|self|string|null + * @return array|bool|DateTimeInterface|DateTimeZone|int|IntlCalendar|self|string|null */ public function __get($name) { diff --git a/system/Test/Mock/MockConnection.php b/system/Test/Mock/MockConnection.php index d14160595333..7f6aa5240e27 100644 --- a/system/Test/Mock/MockConnection.php +++ b/system/Test/Mock/MockConnection.php @@ -70,7 +70,7 @@ public function shouldReturn(string $method, $return) * Should automatically handle different connections for read/write * queries if needed. * - * @param mixed $binds + * @param array|string|null $binds * * @return BaseResult|bool|Query * diff --git a/system/Traits/ConditionalTrait.php b/system/Traits/ConditionalTrait.php index 6835de6c3a4f..b24fbdcd1b0c 100644 --- a/system/Traits/ConditionalTrait.php +++ b/system/Traits/ConditionalTrait.php @@ -23,7 +23,6 @@ trait ConditionalTrait * @param TWhen $condition * @param callable(self, TWhen): mixed $callback * @param (callable(self): mixed)|null $defaultCallback - * @param mixed $condition * * @return $this */ @@ -46,7 +45,6 @@ public function when($condition, callable $callback, ?callable $defaultCallback * @param TWhenNot $condition * @param callable(self, TWhenNot): mixed $callback * @param (callable(self): mixed)|null $defaultCallback - * @param mixed $condition * * @return $this */ diff --git a/utils/phpstan-baseline/empty.notAllowed.neon b/utils/phpstan-baseline/empty.notAllowed.neon index e526a441d344..a302b0433f39 100644 --- a/utils/phpstan-baseline/empty.notAllowed.neon +++ b/utils/phpstan-baseline/empty.notAllowed.neon @@ -1,4 +1,4 @@ -# total 214 errors +# total 213 errors parameters: ignoreErrors: diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 672ff3a32e43..ef72e73896c3 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 1944 errors +# total 1931 errors includes: - argument.type.neon diff --git a/utils/phpstan-baseline/method.childParameterType.neon b/utils/phpstan-baseline/method.childParameterType.neon index d5b6014b15a6..6df502317753 100644 --- a/utils/phpstan-baseline/method.childParameterType.neon +++ b/utils/phpstan-baseline/method.childParameterType.neon @@ -1,4 +1,4 @@ -# total 12 errors +# total 11 errors parameters: ignoreErrors: @@ -17,11 +17,6 @@ parameters: count: 1 path: ../../system/Database/BaseResult.php - - - message: '#^Parameter \#1 \$selectOverride \(bool\) of method CodeIgniter\\Database\\SQLSRV\\Builder\:\:compileSelect\(\) should be contravariant with parameter \$selectOverride \(mixed\) of method CodeIgniter\\Database\\BaseBuilder\:\:compileSelect\(\)$#' - count: 1 - path: ../../system/Database/SQLSRV/Builder.php - - message: '#^Parameter \#1 \$value \(bool\|int\|string\) of method CodeIgniter\\Entity\\Cast\\IntBoolCast\:\:set\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\BaseCast\:\:set\(\)$#' count: 1 diff --git a/utils/phpstan-baseline/missingType.iterableValue.neon b/utils/phpstan-baseline/missingType.iterableValue.neon index 571912cb7ad4..2e358342f34a 100644 --- a/utils/phpstan-baseline/missingType.iterableValue.neon +++ b/utils/phpstan-baseline/missingType.iterableValue.neon @@ -1,4 +1,4 @@ -# total 1257 errors +# total 1246 errors parameters: ignoreErrors: @@ -207,11 +207,6 @@ parameters: count: 1 path: ../../system/Config/BaseConfig.php - - - message: '#^Method CodeIgniter\\Config\\BaseConfig\:\:initEnvValue\(\) has parameter \$property with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Config/BaseConfig.php - - message: '#^Property CodeIgniter\\Config\\BaseConfig\:\:\$registrars type has no value type specified in iterable type array\.$#' count: 1 @@ -447,11 +442,6 @@ parameters: count: 1 path: ../../system/Database/BaseBuilder.php - - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:delete\(\) has parameter \$where with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:fieldsFromQuery\(\) return type has no value type specified in iterable type array\.$#' count: 1 @@ -837,11 +827,6 @@ parameters: count: 1 path: ../../system/Database/BaseConnection.php - - - message: '#^Method CodeIgniter\\Database\\BaseConnection\:\:query\(\) has parameter \$binds with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/BaseConnection.php - - message: '#^Method CodeIgniter\\Database\\BaseConnection\:\:setAliasedTables\(\) has parameter \$aliases with no value type specified in iterable type array\.$#' count: 1 @@ -1047,11 +1032,6 @@ parameters: count: 1 path: ../../system/Database/ConnectionInterface.php - - - message: '#^Method CodeIgniter\\Database\\ConnectionInterface\:\:query\(\) has parameter \$binds with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/ConnectionInterface.php - - message: '#^Method CodeIgniter\\Database\\ConnectionInterface\:\:table\(\) has parameter \$tableName with no value type specified in iterable type array\.$#' count: 1 @@ -2132,11 +2112,6 @@ parameters: count: 1 path: ../../system/Encryption/Encryption.php - - - message: '#^Method CodeIgniter\\Encryption\\Handlers\\BaseHandler\:\:__get\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Encryption/Handlers/BaseHandler.php - - message: '#^Method CodeIgniter\\Encryption\\Handlers\\OpenSSLHandler\:\:decrypt\(\) has parameter \$params with no value type specified in iterable type array\.$#' count: 1 @@ -2167,11 +2142,6 @@ parameters: count: 1 path: ../../system/Encryption/Handlers/SodiumHandler.php - - - message: '#^Method CodeIgniter\\Encryption\\KeyRotationDecorator\:\:__get\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Encryption/KeyRotationDecorator.php - - message: '#^Method CodeIgniter\\Encryption\\KeyRotationDecorator\:\:decrypt\(\) has parameter \$params with no value type specified in iterable type array\.$#' count: 1 @@ -2727,11 +2697,6 @@ parameters: count: 1 path: ../../system/HTTP/IncomingRequest.php - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getJSON\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getJsonVar\(\) has parameter \$flags with no value type specified in iterable type array\.$#' count: 1 @@ -2742,11 +2707,6 @@ parameters: count: 1 path: ../../system/HTTP/IncomingRequest.php - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getJsonVar\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getOldInput\(\) return type has no value type specified in iterable type array\.$#' count: 1 @@ -2812,11 +2772,6 @@ parameters: count: 1 path: ../../system/HTTP/IncomingRequest.php - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getVar\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:negotiate\(\) has parameter \$supported with no value type specified in iterable type array\.$#' count: 1 @@ -3587,16 +3542,6 @@ parameters: count: 1 path: ../../system/HotReloader/IteratorFilter.php - - - message: '#^Method CodeIgniter\\I18n\\Time\:\:__get\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/I18n/Time.php - - - - message: '#^Method CodeIgniter\\I18n\\TimeLegacy\:\:__get\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/I18n/TimeLegacy.php - - message: '#^Method CodeIgniter\\Images\\Handlers\\BaseHandler\:\:__call\(\) has parameter \$args with no value type specified in iterable type array\.$#' count: 1 From a5648a35992e618bf7945415c7bc802d9f1a2ae1 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Mon, 29 Jun 2026 22:02:44 +0800 Subject: [PATCH 2/2] refactor: collapse long form `mixed` to just `mixed` --- system/Common.php | 8 +- system/Config/BaseService.php | 2 +- system/Database/BaseConnection.php | 4 +- system/Database/ConnectionInterface.php | 4 +- system/Database/Postgre/Connection.php | 2 +- system/Debug/Toolbar.php | 2 +- system/Entity/Cast/CastInterface.php | 12 +- system/Entity/Entity.php | 8 +- system/HTTP/CURLRequest.php | 2 +- system/HTTP/IncomingRequest.php | 12 +- system/HTTP/RequestTrait.php | 2 +- system/Helpers/Array/ArrayHelper.php | 4 +- system/Helpers/array_helper.php | 12 +- system/Model.php | 4 +- system/Validation/Rules.php | 10 +- .../StrictRules/CreditCardRules.php | 2 +- system/Validation/StrictRules/FormatRules.php | 50 +- system/Validation/StrictRules/Rules.php | 56 +-- system/Validation/Validation.php | 18 +- system/Validation/ValidationInterface.php | 8 +- system/View/Parser.php | 2 +- utils/phpstan-baseline/loader.neon | 2 +- .../method.childParameterType.neon | 8 +- .../missingType.iterableValue.neon | 467 +----------------- utils/phpstan-baseline/return.type.neon | 7 +- 25 files changed, 125 insertions(+), 583 deletions(-) diff --git a/system/Common.php b/system/Common.php index c0bab0fd3acd..d74fe403c302 100644 --- a/system/Common.php +++ b/system/Common.php @@ -403,9 +403,9 @@ function db_connect($db = null, bool $getShared = true) * retrieving values set from the .env file for * use in config files. * - * @param array|bool|float|int|object|string|null $default + * @param mixed $default * - * @return array|bool|float|int|object|string|null + * @return mixed */ function env(string $key, $default = null) { @@ -1080,7 +1080,7 @@ function session(?string $val = null) * - $timer = service('timer') * - $timer = \CodeIgniter\Config\Services::timer(); * - * @param array|bool|float|int|object|string|null ...$params + * @param mixed ...$params */ function service(string $name, ...$params): ?object { @@ -1096,7 +1096,7 @@ function service(string $name, ...$params): ?object /** * Always returns a new instance of the class. * - * @param array|bool|float|int|object|string|null ...$params + * @param mixed ...$params */ function single_service(string $name, ...$params): ?object { diff --git a/system/Config/BaseService.php b/system/Config/BaseService.php index 579879e9c768..64b5266da041 100644 --- a/system/Config/BaseService.php +++ b/system/Config/BaseService.php @@ -244,7 +244,7 @@ public static function override(string $key, object $value): void * * $key must be a name matching a service. * - * @param array|bool|float|int|object|string|null ...$params + * @param mixed ...$params * * @return object */ diff --git a/system/Database/BaseConnection.php b/system/Database/BaseConnection.php index b4aed2d6209b..c0cb7174dd52 100644 --- a/system/Database/BaseConnection.php +++ b/system/Database/BaseConnection.php @@ -1533,7 +1533,7 @@ abstract public function affectedRows(): int; * Escapes data based on type. * Sets boolean and null types * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str * * @return ($str is array ? array : float|int|string) */ @@ -2059,7 +2059,7 @@ protected function _enableForeignKeyChecks() /** * Accessor for properties if they exist. * - * @return array|bool|float|int|object|resource|string|null + * @return mixed */ public function __get(string $key) { diff --git a/system/Database/ConnectionInterface.php b/system/Database/ConnectionInterface.php index 3c493e12e818..15fd63e1c7aa 100644 --- a/system/Database/ConnectionInterface.php +++ b/system/Database/ConnectionInterface.php @@ -137,7 +137,7 @@ public function getLastQuery(); * Escapes data based on type. * Sets boolean and null types. * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str * * @return ($str is array ? array : float|int|string) */ @@ -149,7 +149,7 @@ public function escape($str); * * @param array ...$params * - * @return array|bool|float|int|object|resource|string|null + * @return mixed */ public function callFunction(string $functionName, ...$params); diff --git a/system/Database/Postgre/Connection.php b/system/Database/Postgre/Connection.php index 37c1d678fcc0..4c3358a4b470 100644 --- a/system/Database/Postgre/Connection.php +++ b/system/Database/Postgre/Connection.php @@ -241,7 +241,7 @@ public function affectedRows(): int * * Escapes data based on type * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str * * @return ($str is array ? array : float|int|string) */ diff --git a/system/Debug/Toolbar.php b/system/Debug/Toolbar.php index fdd0b0f3f54c..f5885aa0555c 100644 --- a/system/Debug/Toolbar.php +++ b/system/Debug/Toolbar.php @@ -479,7 +479,7 @@ public function respond(): void // Otherwise, if it includes ?debugbar_time, then // we should return the entire debugbar. - if ($request->getGet('debugbar_time')) { + if ($request->getGet('debugbar_time') !== null) { helper('security'); // Negotiate the content-type to format the output diff --git a/system/Entity/Cast/CastInterface.php b/system/Entity/Cast/CastInterface.php index 8b727fb0117f..9f5552826859 100644 --- a/system/Entity/Cast/CastInterface.php +++ b/system/Entity/Cast/CastInterface.php @@ -23,20 +23,20 @@ interface CastInterface /** * Takes a raw value from Entity, returns its value for PHP. * - * @param array|bool|float|int|object|string|null $value Data - * @param array $params Additional param + * @param mixed $value Data + * @param array $params Additional param * - * @return array|bool|float|int|object|string|null + * @return mixed */ public static function get($value, array $params = []); /** * Takes a PHP value, returns its raw value for Entity. * - * @param array|bool|float|int|object|string|null $value Data - * @param array $params Additional param + * @param mixed $value Data + * @param array $params Additional param * - * @return array|bool|float|int|object|string|null + * @return mixed */ public static function set($value, array $params = []); } diff --git a/system/Entity/Entity.php b/system/Entity/Entity.php index e3733bd0fc02..95261f607458 100644 --- a/system/Entity/Entity.php +++ b/system/Entity/Entity.php @@ -157,7 +157,7 @@ public function __construct(?array $data = null) * properties, using any `setCamelCasedProperty()` methods * that may or may not exist. * - * @param array|bool|float|int|object|string|null> $data + * @param array $data * * @return $this */ @@ -556,7 +556,7 @@ protected function mutateDate($value) * @param string $attribute Attribute name * @param string $method Allowed to "get" and "set" * - * @return array|bool|float|int|object|string|null + * @return mixed * * @throws CastException */ @@ -631,7 +631,7 @@ public function cast(?bool $cast = null) * $this->my_property = $p; * $this->setMyProperty() = $p; * - * @param array|bool|float|int|object|string|null $value + * @param mixed $value * * @return void * @@ -682,7 +682,7 @@ public function __set(string $key, $value = null) * $p = $this->my_property * $p = $this->getMyProperty() * - * @return array|bool|float|int|object|string|null + * @return mixed * * @throws Exception */ diff --git a/system/HTTP/CURLRequest.php b/system/HTTP/CURLRequest.php index 02aadfa8f97b..ac05f9ae903b 100644 --- a/system/HTTP/CURLRequest.php +++ b/system/HTTP/CURLRequest.php @@ -289,7 +289,7 @@ public function setForm(array $params, bool $multipart = false) /** * Set JSON data to be sent. * - * @param array|bool|float|int|object|string|null $data + * @param mixed $data * * @return $this */ diff --git a/system/HTTP/IncomingRequest.php b/system/HTTP/IncomingRequest.php index 3b2c21348cea..a4a4c357ac74 100644 --- a/system/HTTP/IncomingRequest.php +++ b/system/HTTP/IncomingRequest.php @@ -508,7 +508,7 @@ public function getRawInput() * @param int|null $filter Filter Constant * @param array|int|null $flags Option * - * @return array|bool|float|int|object|string|null + * @return mixed */ public function getRawInputVar($index = null, ?int $filter = null, $flags = null) { @@ -562,7 +562,7 @@ public function getRawInputVar($index = null, ?int $filter = null, $flags = null * @param int|null $filter A filter name to apply. * @param array|int|null $flags * - * @return array|bool|float|int|object|string|null + * @return mixed */ public function getGet($index = null, $filter = null, $flags = null) { @@ -576,7 +576,7 @@ public function getGet($index = null, $filter = null, $flags = null) * @param int|null $filter A filter name to apply * @param array|int|null $flags * - * @return array|bool|float|int|object|string|null + * @return mixed */ public function getPost($index = null, $filter = null, $flags = null) { @@ -590,7 +590,7 @@ public function getPost($index = null, $filter = null, $flags = null) * @param int|null $filter A filter name to apply * @param array|int|null $flags * - * @return array|bool|float|int|object|string|null + * @return mixed */ public function getPostGet($index = null, $filter = null, $flags = null) { @@ -613,7 +613,7 @@ public function getPostGet($index = null, $filter = null, $flags = null) * @param int|null $filter A filter name to apply * @param array|int|null $flags * - * @return array|bool|float|int|object|string|null + * @return mixed */ public function getGetPost($index = null, $filter = null, $flags = null) { @@ -636,7 +636,7 @@ public function getGetPost($index = null, $filter = null, $flags = null) * @param int|null $filter A filter name to be applied * @param array|int|null $flags * - * @return array|bool|float|int|object|string|null + * @return mixed */ public function getCookie($index = null, $filter = null, $flags = null) { diff --git a/system/HTTP/RequestTrait.php b/system/HTTP/RequestTrait.php index 6adfe3794935..67c5382adc1c 100644 --- a/system/HTTP/RequestTrait.php +++ b/system/HTTP/RequestTrait.php @@ -257,7 +257,7 @@ public function setGlobal(string $name, $value) * @param int|null $filter Filter constant * @param array|int|null $flags Options * - * @return array|bool|float|int|object|string|null + * @return mixed */ public function fetchGlobal(string $name, $index = null, ?int $filter = null, $flags = null) { diff --git a/system/Helpers/Array/ArrayHelper.php b/system/Helpers/Array/ArrayHelper.php index 6741dc4bbb0e..1e7d6904796c 100644 --- a/system/Helpers/Array/ArrayHelper.php +++ b/system/Helpers/Array/ArrayHelper.php @@ -35,7 +35,7 @@ final class ArrayHelper * * @param string $index The index as dot array syntax. * - * @return array|bool|int|object|string|null + * @return mixed */ public static function dotSearch(string $index, array $array) { @@ -68,7 +68,7 @@ private static function convertToArray(string $index): array * * @used-by dotSearch() * - * @return array|bool|float|int|object|string|null + * @return mixed */ private static function arraySearchDot(array $indexes, array $array) { diff --git a/system/Helpers/array_helper.php b/system/Helpers/array_helper.php index 837a612e4cef..4d5d12488d78 100644 --- a/system/Helpers/array_helper.php +++ b/system/Helpers/array_helper.php @@ -20,7 +20,7 @@ * Searches an array through dot syntax. Supports * wildcard searches, like foo.*.bar * - * @return array|bool|int|object|string|null + * @return mixed */ function dot_array_search(string $index, array $array) { @@ -34,7 +34,7 @@ function dot_array_search(string $index, array $array) * * @param int|string $key * - * @return array|bool|float|int|object|string|null + * @return mixed */ function array_deep_search($key, array $array) { @@ -43,8 +43,12 @@ function array_deep_search($key, array $array) } foreach ($array as $value) { - if (is_array($value) && ($result = array_deep_search($key, $value))) { - return $result; + if (is_array($value)) { + $result = array_deep_search($key, $value); + + if ($result !== null) { + return $result; + } } } diff --git a/system/Model.php b/system/Model.php index 3599ba963176..0d3c55ee0568 100644 --- a/system/Model.php +++ b/system/Model.php @@ -714,7 +714,7 @@ public function update($id = null, $row = null): bool /** * Provides/instantiates the builder/db connection and model's table/primary key names and return type. * - * @return array|BaseBuilder|bool|float|int|object|string|null + * @return mixed */ public function __get(string $name) { @@ -741,7 +741,7 @@ public function __isset(string $name): bool * Provides direct access to method in the builder (if available) * and the database connection. * - * @return $this|array|BaseBuilder|bool|float|int|object|string|null + * @return mixed */ public function __call(string $name, array $params) { diff --git a/system/Validation/Rules.php b/system/Validation/Rules.php index 17d3ced44e44..7617b283f099 100644 --- a/system/Validation/Rules.php +++ b/system/Validation/Rules.php @@ -316,7 +316,7 @@ public function not_in_list($value, string $list): bool } /** - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function required($str = null): bool { @@ -454,10 +454,10 @@ public function required_without( /** * The field exists in $data. * - * @param array|bool|float|int|object|string|null $value The field value. - * @param string|null $param The rule's parameter. - * @param array $data The data to be validated. - * @param string|null $field The field name. + * @param mixed $value The field value. + * @param string|null $param The rule's parameter. + * @param array $data The data to be validated. + * @param string|null $field The field name. */ public function field_exists( $value = null, diff --git a/system/Validation/StrictRules/CreditCardRules.php b/system/Validation/StrictRules/CreditCardRules.php index 6512568317ed..fd28e4454095 100644 --- a/system/Validation/StrictRules/CreditCardRules.php +++ b/system/Validation/StrictRules/CreditCardRules.php @@ -42,7 +42,7 @@ public function __construct() * 'cc_num' => 'valid_cc_number[visa]' * ]; * - * @param array|bool|float|int|object|string|null $ccNumber + * @param mixed $ccNumber */ public function valid_cc_number($ccNumber, string $type): bool { diff --git a/system/Validation/StrictRules/FormatRules.php b/system/Validation/StrictRules/FormatRules.php index 0363f4be4afc..8557a6de070d 100644 --- a/system/Validation/StrictRules/FormatRules.php +++ b/system/Validation/StrictRules/FormatRules.php @@ -32,7 +32,7 @@ public function __construct() /** * Alpha * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function alpha($str = null): bool { @@ -46,7 +46,7 @@ public function alpha($str = null): bool /** * Alpha with spaces. * - * @param array|bool|float|int|object|string|null $value Value. + * @param mixed $value Value. * * @return bool True if alpha with spaces, else false. */ @@ -62,7 +62,7 @@ public function alpha_space($value = null): bool /** * Alphanumeric with underscores and dashes * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function alpha_dash($str = null): bool { @@ -84,7 +84,7 @@ public function alpha_dash($str = null): bool * _ underscore, + plus, = equals, | vertical bar, : colon, . period * ~ ! # $ % & * - _ + = | : . * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str * * @return bool */ @@ -104,7 +104,7 @@ public function alpha_numeric_punct($str) /** * Alphanumeric * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function alpha_numeric($str = null): bool { @@ -122,7 +122,7 @@ public function alpha_numeric($str = null): bool /** * Alphanumeric w/ spaces * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function alpha_numeric_space($str = null): bool { @@ -140,7 +140,7 @@ public function alpha_numeric_space($str = null): bool /** * Any type of string * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function string($str = null): bool { @@ -150,7 +150,7 @@ public function string($str = null): bool /** * Decimal number * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function decimal($str = null): bool { @@ -168,7 +168,7 @@ public function decimal($str = null): bool /** * String of hexidecimal characters * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function hex($str = null): bool { @@ -186,7 +186,7 @@ public function hex($str = null): bool /** * Integer * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function integer($str = null): bool { @@ -204,7 +204,7 @@ public function integer($str = null): bool /** * Is a Natural number (0,1,2,3, etc.) * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function is_natural($str = null): bool { @@ -222,7 +222,7 @@ public function is_natural($str = null): bool /** * Is a Natural number, but not a zero (1,2,3, etc.) * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function is_natural_no_zero($str = null): bool { @@ -240,7 +240,7 @@ public function is_natural_no_zero($str = null): bool /** * Numeric * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function numeric($str = null): bool { @@ -258,7 +258,7 @@ public function numeric($str = null): bool /** * Compares value against a regular expression pattern. * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function regex_match($str, string $pattern): bool { @@ -275,7 +275,7 @@ public function regex_match($str, string $pattern): bool * * @see http://php.net/manual/en/datetimezone.listidentifiers.php * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function timezone($str = null): bool { @@ -292,7 +292,7 @@ public function timezone($str = null): bool * Tests a string for characters outside of the Base64 alphabet * as defined by RFC 2045 http://www.faqs.org/rfcs/rfc2045 * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function valid_base64($str = null): bool { @@ -306,7 +306,7 @@ public function valid_base64($str = null): bool /** * Valid JSON * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function valid_json($str = null): bool { @@ -320,7 +320,7 @@ public function valid_json($str = null): bool /** * Checks for a correctly formatted email address * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function valid_email($str = null): bool { @@ -337,7 +337,7 @@ public function valid_email($str = null): bool * Example: * valid_emails[one@example.com,two@example.com] * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function valid_emails($str = null): bool { @@ -351,8 +351,8 @@ public function valid_emails($str = null): bool /** * Validate an IP address (human readable format or binary string - inet_pton) * - * @param array|bool|float|int|object|string|null $ip - * @param string|null $which IP protocol: 'ipv4' or 'ipv6' + * @param mixed $ip + * @param string|null $which IP protocol: 'ipv4' or 'ipv6' */ public function valid_ip($ip = null, ?string $which = null): bool { @@ -369,7 +369,7 @@ public function valid_ip($ip = null, ?string $which = null): bool * Warning: this rule will pass basic strings like * "banana"; use valid_url_strict for a stricter rule. * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function valid_url($str = null): bool { @@ -383,8 +383,8 @@ public function valid_url($str = null): bool /** * Checks a URL to ensure it's formed correctly. * - * @param array|bool|float|int|object|string|null $str - * @param string|null $validSchemes comma separated list of allowed schemes + * @param mixed $str + * @param string|null $validSchemes comma separated list of allowed schemes */ public function valid_url_strict($str = null, ?string $validSchemes = null): bool { @@ -398,7 +398,7 @@ public function valid_url_strict($str = null, ?string $validSchemes = null): boo /** * Checks for a valid date and matches a given date format * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function valid_date($str = null, ?string $format = null): bool { diff --git a/system/Validation/StrictRules/Rules.php b/system/Validation/StrictRules/Rules.php index 0a03e6461dba..6d8dce14588b 100644 --- a/system/Validation/StrictRules/Rules.php +++ b/system/Validation/StrictRules/Rules.php @@ -33,8 +33,8 @@ public function __construct() /** * The value does not match another field in $data. * - * @param array|bool|float|int|object|string|null $str - * @param array $data Other field/value pairs + * @param mixed $str + * @param array $data Other field/value pairs */ public function differs( $str, @@ -65,7 +65,7 @@ public function differs( /** * Equals the static value provided. * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function equals($str, string $val): bool { @@ -76,7 +76,7 @@ public function equals($str, string $val): bool * Returns true if $str is $val characters long. * $val = "5" (one) | "5,8,12" (multiple values) * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function exact_length($str, string $val): bool { @@ -94,7 +94,7 @@ public function exact_length($str, string $val): bool /** * Greater than * - * @param array|bool|float|int|object|string|null $str expects int|string + * @param mixed $str expects int|string */ public function greater_than($str, string $min): bool { @@ -112,7 +112,7 @@ public function greater_than($str, string $min): bool /** * Equal to or Greater than * - * @param array|bool|float|int|object|string|null $str expects int|string + * @param mixed $str expects int|string */ public function greater_than_equal_to($str, string $min): bool { @@ -137,7 +137,7 @@ public function greater_than_equal_to($str, string $min): bool * is_not_unique[table.field,where_field,where_value] * is_not_unique[menu.id,active,1] * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function is_not_unique($str, string $field, array $data): bool { @@ -151,7 +151,7 @@ public function is_not_unique($str, string $field, array $data): bool /** * Value should be within an array of values * - * @param array|bool|float|int|object|string|null $value + * @param mixed $value */ public function in_list($value, string $list): bool { @@ -176,7 +176,7 @@ public function in_list($value, string $list): bool * is_unique[table.field,ignore_field,ignore_value] * is_unique[users.email,id,5] * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function is_unique($str, string $field, array $data): bool { @@ -190,7 +190,7 @@ public function is_unique($str, string $field, array $data): bool /** * Less than * - * @param array|bool|float|int|object|string|null $str expects int|string + * @param mixed $str expects int|string */ public function less_than($str, string $max): bool { @@ -208,7 +208,7 @@ public function less_than($str, string $max): bool /** * Equal to or Less than * - * @param array|bool|float|int|object|string|null $str expects int|string + * @param mixed $str expects int|string */ public function less_than_equal_to($str, string $max): bool { @@ -226,8 +226,8 @@ public function less_than_equal_to($str, string $max): bool /** * Matches the value of another field in $data. * - * @param array|bool|float|int|object|string|null $str - * @param array $data Other field/value pairs + * @param mixed $str + * @param array $data Other field/value pairs */ public function matches( $str, @@ -258,7 +258,7 @@ public function matches( /** * Returns true if $str is $val or fewer characters in length. * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function max_length($str, string $val): bool { @@ -276,7 +276,7 @@ public function max_length($str, string $val): bool /** * Returns true if $str is at least $val length. * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function min_length($str, string $val): bool { @@ -294,7 +294,7 @@ public function min_length($str, string $val): bool /** * Does not equal the static value provided. * - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function not_equals($str, string $val): bool { @@ -304,7 +304,7 @@ public function not_equals($str, string $val): bool /** * Value should not be within an array of values. * - * @param array|bool|float|int|object|string|null $value + * @param mixed $value */ public function not_in_list($value, string $list): bool { @@ -324,7 +324,7 @@ public function not_in_list($value, string $list): bool } /** - * @param array|bool|float|int|object|string|null $str + * @param mixed $str */ public function required($str = null): bool { @@ -339,9 +339,9 @@ public function required($str = null): bool * * required_with[password] * - * @param array|bool|float|int|object|string|null $str - * @param string|null $fields List of fields that we should check if present - * @param array $data Complete list of fields from the form + * @param mixed $str + * @param string|null $fields List of fields that we should check if present + * @param array $data Complete list of fields from the form */ public function required_with($str = null, ?string $fields = null, array $data = []): bool { @@ -356,9 +356,9 @@ public function required_with($str = null, ?string $fields = null, array $data = * * required_without[id,email] * - * @param array|bool|float|int|object|string|null $str - * @param string|null $otherFields The param fields of required_without[]. - * @param string|null $field This rule param fields aren't present, this field is required. + * @param mixed $str + * @param string|null $otherFields The param fields of required_without[]. + * @param string|null $field This rule param fields aren't present, this field is required. */ public function required_without( $str = null, @@ -373,10 +373,10 @@ public function required_without( /** * The field exists in $data. * - * @param array|bool|float|int|object|string|null $value The field value. - * @param string|null $param The rule's parameter. - * @param array $data The data to be validated. - * @param string|null $field The field name. + * @param mixed $value The field value. + * @param string|null $param The rule's parameter. + * @param array $data The data to be validated. + * @param string|null $field The field name. */ public function field_exists( $value = null, diff --git a/system/Validation/Validation.php b/system/Validation/Validation.php index 6ca3233f746f..38210fbdb705 100644 --- a/system/Validation/Validation.php +++ b/system/Validation/Validation.php @@ -242,10 +242,10 @@ private static function getRegex(string $field): string * Runs the validation process, returning true or false determining whether * validation was successful or not. * - * @param array|bool|float|int|object|string|null $value The data to validate. - * @param array|string $rules The validation rules. - * @param list $errors The custom error message. - * @param string|null $dbGroup The database group to use. + * @param mixed $value The data to validate. + * @param array|string $rules The validation rules. + * @param list $errors The custom error message. + * @param string|null $dbGroup The database group to use. */ public function check($value, $rules, array $errors = [], $dbGroup = null): bool { @@ -1000,8 +1000,7 @@ protected function splitRules(string $rules): array * Entry point: allocates a single accumulator and delegates to the * recursive collector, so no intermediate arrays are built or unpacked. * - * @param list $segments - * @param array|mixed $current + * @param list $segments * * @return list */ @@ -1019,10 +1018,9 @@ private function walkForAllPossiblePaths(array $segments, mixed $current, string * paths where the key is genuinely absent are recorded - intermediate * missing segments are silently skipped so `*` never appears in a result. * - * @param list $segments - * @param int<0, max> $segmentCount - * @param array|mixed $current - * @param list $result + * @param list $segments + * @param int<0, max> $segmentCount + * @param list $result */ private function collectMissingPaths( array $segments, diff --git a/system/Validation/ValidationInterface.php b/system/Validation/ValidationInterface.php index 997bfb2bc0a4..836516d561b8 100644 --- a/system/Validation/ValidationInterface.php +++ b/system/Validation/ValidationInterface.php @@ -35,10 +35,10 @@ public function run(?array $data = null, ?string $group = null, $dbGroup = null) * Check; runs the validation process, returning true or false * determining whether or not validation was successful. * - * @param array|bool|float|int|object|string|null $value Value to validate. - * @param array|string $rules - * @param list $errors - * @param string|null $dbGroup The database group to use. + * @param mixed $value Value to validate. + * @param array|string $rules + * @param list $errors + * @param string|null $dbGroup The database group to use. * * @return bool True if valid, else false. */ diff --git a/system/View/Parser.php b/system/View/Parser.php index 9a2d7d9d83b1..5de115f8236b 100644 --- a/system/View/Parser.php +++ b/system/View/Parser.php @@ -748,7 +748,7 @@ public function removePlugin(string $alias) * Converts an object to an array, respecting any * toArray() methods on an object. * - * @param array|bool|float|int|object|string|null $value + * @param mixed $value * * @return array|bool|float|int|string|null */ diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index ef72e73896c3..8c8e2bbe900e 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 1931 errors +# total 1839 errors includes: - argument.type.neon diff --git a/utils/phpstan-baseline/method.childParameterType.neon b/utils/phpstan-baseline/method.childParameterType.neon index 6df502317753..21752412ee34 100644 --- a/utils/phpstan-baseline/method.childParameterType.neon +++ b/utils/phpstan-baseline/method.childParameterType.neon @@ -18,22 +18,22 @@ parameters: path: ../../system/Database/BaseResult.php - - message: '#^Parameter \#1 \$value \(bool\|int\|string\) of method CodeIgniter\\Entity\\Cast\\IntBoolCast\:\:set\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\BaseCast\:\:set\(\)$#' + message: '#^Parameter \#1 \$value \(bool\|int\|string\) of method CodeIgniter\\Entity\\Cast\\IntBoolCast\:\:set\(\) should be contravariant with parameter \$value \(mixed\) of method CodeIgniter\\Entity\\Cast\\BaseCast\:\:set\(\)$#' count: 1 path: ../../system/Entity/Cast/IntBoolCast.php - - message: '#^Parameter \#1 \$value \(bool\|int\|string\) of method CodeIgniter\\Entity\\Cast\\IntBoolCast\:\:set\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\CastInterface\:\:set\(\)$#' + message: '#^Parameter \#1 \$value \(bool\|int\|string\) of method CodeIgniter\\Entity\\Cast\\IntBoolCast\:\:set\(\) should be contravariant with parameter \$value \(mixed\) of method CodeIgniter\\Entity\\Cast\\CastInterface\:\:set\(\)$#' count: 1 path: ../../system/Entity/Cast/IntBoolCast.php - - message: '#^Parameter \#1 \$value \(int\) of method CodeIgniter\\Entity\\Cast\\IntBoolCast\:\:get\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\BaseCast\:\:get\(\)$#' + message: '#^Parameter \#1 \$value \(int\) of method CodeIgniter\\Entity\\Cast\\IntBoolCast\:\:get\(\) should be contravariant with parameter \$value \(mixed\) of method CodeIgniter\\Entity\\Cast\\BaseCast\:\:get\(\)$#' count: 1 path: ../../system/Entity/Cast/IntBoolCast.php - - message: '#^Parameter \#1 \$value \(int\) of method CodeIgniter\\Entity\\Cast\\IntBoolCast\:\:get\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\CastInterface\:\:get\(\)$#' + message: '#^Parameter \#1 \$value \(int\) of method CodeIgniter\\Entity\\Cast\\IntBoolCast\:\:get\(\) should be contravariant with parameter \$value \(mixed\) of method CodeIgniter\\Entity\\Cast\\CastInterface\:\:get\(\)$#' count: 1 path: ../../system/Entity/Cast/IntBoolCast.php diff --git a/utils/phpstan-baseline/missingType.iterableValue.neon b/utils/phpstan-baseline/missingType.iterableValue.neon index 2e358342f34a..80d45074b96e 100644 --- a/utils/phpstan-baseline/missingType.iterableValue.neon +++ b/utils/phpstan-baseline/missingType.iterableValue.neon @@ -1,4 +1,4 @@ -# total 1246 errors +# total 1153 errors parameters: ignoreErrors: @@ -172,16 +172,6 @@ parameters: count: 1 path: ../../system/Common.php - - - message: '#^Function service\(\) has parameter \$params with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Common.php - - - - message: '#^Function single_service\(\) has parameter \$params with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Common.php - - message: '#^Function stringify_attributes\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' count: 1 @@ -227,11 +217,6 @@ parameters: count: 1 path: ../../system/Config/BaseService.php - - - message: '#^Method CodeIgniter\\Config\\BaseService\:\:getSharedInstance\(\) has parameter \$params with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Config/BaseService.php - - message: '#^Property CodeIgniter\\Config\\BaseService\:\:\$services type has no value type specified in iterable type array\.$#' count: 1 @@ -777,11 +762,6 @@ parameters: count: 1 path: ../../system/Database/BaseConnection.php - - - message: '#^Method CodeIgniter\\Database\\BaseConnection\:\:__get\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/BaseConnection.php - - message: '#^Method CodeIgniter\\Database\\BaseConnection\:\:callFunction\(\) has parameter \$params with no value type specified in iterable type array\.$#' count: 1 @@ -797,11 +777,6 @@ parameters: count: 1 path: ../../system/Database/BaseConnection.php - - - message: '#^Method CodeIgniter\\Database\\BaseConnection\:\:escape\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/BaseConnection.php - - message: '#^Method CodeIgniter\\Database\\BaseConnection\:\:escape\(\) return type has no value type specified in iterable type array\.$#' count: 1 @@ -1017,16 +992,6 @@ parameters: count: 1 path: ../../system/Database/ConnectionInterface.php - - - message: '#^Method CodeIgniter\\Database\\ConnectionInterface\:\:callFunction\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/ConnectionInterface.php - - - - message: '#^Method CodeIgniter\\Database\\ConnectionInterface\:\:escape\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/ConnectionInterface.php - - message: '#^Method CodeIgniter\\Database\\ConnectionInterface\:\:escape\(\) return type has no value type specified in iterable type array\.$#' count: 1 @@ -1397,11 +1362,6 @@ parameters: count: 1 path: ../../system/Database/Postgre/Builder.php - - - message: '#^Method CodeIgniter\\Database\\Postgre\\Connection\:\:escape\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Postgre/Connection.php - - message: '#^Method CodeIgniter\\Database\\Postgre\\Connection\:\:escape\(\) return type has no value type specified in iterable type array\.$#' count: 1 @@ -2152,146 +2112,16 @@ parameters: count: 1 path: ../../system/Encryption/KeyRotationDecorator.php - - - message: '#^Method CodeIgniter\\Entity\\Cast\\ArrayCast\:\:get\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/ArrayCast.php - - message: '#^Method CodeIgniter\\Entity\\Cast\\ArrayCast\:\:get\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Entity/Cast/ArrayCast.php - - - message: '#^Method CodeIgniter\\Entity\\Cast\\ArrayCast\:\:set\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/ArrayCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\BaseCast\:\:get\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/BaseCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\BaseCast\:\:get\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/BaseCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\BaseCast\:\:set\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/BaseCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\BaseCast\:\:set\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/BaseCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\BooleanCast\:\:get\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/BooleanCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\CSVCast\:\:get\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/CSVCast.php - - message: '#^Method CodeIgniter\\Entity\\Cast\\CSVCast\:\:get\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Entity/Cast/CSVCast.php - - - message: '#^Method CodeIgniter\\Entity\\Cast\\CSVCast\:\:set\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/CSVCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\CastInterface\:\:get\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/CastInterface.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\CastInterface\:\:get\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/CastInterface.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\CastInterface\:\:set\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/CastInterface.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\CastInterface\:\:set\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/CastInterface.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\DatetimeCast\:\:get\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/DatetimeCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\EnumCast\:\:get\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/EnumCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\EnumCast\:\:set\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/EnumCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\FloatCast\:\:get\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/FloatCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\IntegerCast\:\:get\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/IntegerCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\JsonCast\:\:get\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/JsonCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\JsonCast\:\:get\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/JsonCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\JsonCast\:\:set\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/JsonCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\ObjectCast\:\:get\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/ObjectCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\StringCast\:\:get\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/StringCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\TimestampCast\:\:get\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/TimestampCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\TimestampCast\:\:get\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/TimestampCast.php - - - - message: '#^Method CodeIgniter\\Entity\\Cast\\URICast\:\:get\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Entity/Cast/URICast.php - - message: '#^Method CodeIgniter\\Exceptions\\PageNotFoundException\:\:lang\(\) has parameter \$args with no value type specified in iterable type array\.$#' count: 1 @@ -2577,11 +2407,6 @@ parameters: count: 1 path: ../../system/HTTP/CURLRequest.php - - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:setJSON\(\) has parameter \$data with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - message: '#^Method CodeIgniter\\HTTP\\CURLRequest\:\:setResponseHeaders\(\) has parameter \$headers with no value type specified in iterable type array\.$#' count: 1 @@ -2652,11 +2477,6 @@ parameters: count: 1 path: ../../system/HTTP/IncomingRequest.php - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getCookie\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getFileMultiple\(\) return type has no value type specified in iterable type array\.$#' count: 1 @@ -2677,11 +2497,6 @@ parameters: count: 1 path: ../../system/HTTP/IncomingRequest.php - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGetPost\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGet\(\) has parameter \$flags with no value type specified in iterable type array\.$#' count: 1 @@ -2692,11 +2507,6 @@ parameters: count: 1 path: ../../system/HTTP/IncomingRequest.php - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGet\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getJsonVar\(\) has parameter \$flags with no value type specified in iterable type array\.$#' count: 1 @@ -2722,11 +2532,6 @@ parameters: count: 1 path: ../../system/HTTP/IncomingRequest.php - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPostGet\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPost\(\) has parameter \$flags with no value type specified in iterable type array\.$#' count: 1 @@ -2737,11 +2542,6 @@ parameters: count: 1 path: ../../system/HTTP/IncomingRequest.php - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPost\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getRawInputVar\(\) has parameter \$flags with no value type specified in iterable type array\.$#' count: 1 @@ -2752,11 +2552,6 @@ parameters: count: 1 path: ../../system/HTTP/IncomingRequest.php - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getRawInputVar\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getRawInput\(\) return type has no value type specified in iterable type array\.$#' count: 1 @@ -2907,11 +2702,6 @@ parameters: count: 1 path: ../../system/HTTP/Request.php - - - message: '#^Method CodeIgniter\\HTTP\\Request\:\:fetchGlobal\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Request.php - - message: '#^Method CodeIgniter\\HTTP\\Request\:\:getEnv\(\) has parameter \$flags with no value type specified in iterable type array\.$#' count: 1 @@ -3067,11 +2857,6 @@ parameters: count: 1 path: ../../system/Helpers/Array/ArrayHelper.php - - - message: '#^Method CodeIgniter\\Helpers\\Array\\ArrayHelper\:\:arraySearchDot\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Helpers/Array/ArrayHelper.php - - message: '#^Method CodeIgniter\\Helpers\\Array\\ArrayHelper\:\:dotKeyExists\(\) has parameter \$array with no value type specified in iterable type array\.$#' count: 1 @@ -3082,11 +2867,6 @@ parameters: count: 1 path: ../../system/Helpers/Array/ArrayHelper.php - - - message: '#^Method CodeIgniter\\Helpers\\Array\\ArrayHelper\:\:dotSearch\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Helpers/Array/ArrayHelper.php - - message: '#^Method CodeIgniter\\Helpers\\Array\\ArrayHelper\:\:groupBy\(\) has parameter \$array with no value type specified in iterable type array\.$#' count: 1 @@ -3127,11 +2907,6 @@ parameters: count: 1 path: ../../system/Helpers/array_helper.php - - - message: '#^Function array_deep_search\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Helpers/array_helper.php - - message: '#^Function array_flatten_with_dots\(\) has parameter \$array with no value type specified in iterable type iterable\.$#' count: 1 @@ -3172,11 +2947,6 @@ parameters: count: 1 path: ../../system/Helpers/array_helper.php - - - message: '#^Function dot_array_search\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Helpers/array_helper.php - - message: '#^Function directory_map\(\) return type has no value type specified in iterable type array\.$#' count: 1 @@ -4112,11 +3882,6 @@ parameters: count: 1 path: ../../system/Validation/Rules.php - - - message: '#^Method CodeIgniter\\Validation\\Rules\:\:field_exists\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/Rules.php - - message: '#^Method CodeIgniter\\Validation\\Rules\:\:is_not_unique\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 @@ -4132,11 +3897,6 @@ parameters: count: 1 path: ../../system/Validation/Rules.php - - - message: '#^Method CodeIgniter\\Validation\\Rules\:\:required\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/Rules.php - - message: '#^Method CodeIgniter\\Validation\\Rules\:\:required_with\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 @@ -4147,266 +3907,46 @@ parameters: count: 1 path: ../../system/Validation/Rules.php - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\CreditCardRules\:\:valid_cc_number\(\) has parameter \$ccNumber with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/CreditCardRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:alpha\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:alpha_dash\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:alpha_numeric\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:alpha_numeric_punct\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:alpha_numeric_space\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:alpha_space\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:decimal\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:hex\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:integer\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:is_natural\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:is_natural_no_zero\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:numeric\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:regex_match\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:string\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:timezone\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:valid_base64\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:valid_date\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:valid_email\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:valid_emails\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:valid_ip\(\) has parameter \$ip with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:valid_json\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:valid_url\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\FormatRules\:\:valid_url_strict\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/FormatRules.php - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:differs\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Validation/StrictRules/Rules.php - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:differs\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:equals\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:exact_length\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:field_exists\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Validation/StrictRules/Rules.php - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:field_exists\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:greater_than\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:greater_than_equal_to\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:in_list\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:is_not_unique\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Validation/StrictRules/Rules.php - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:is_not_unique\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:is_unique\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Validation/StrictRules/Rules.php - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:is_unique\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:less_than\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:less_than_equal_to\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:matches\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Validation/StrictRules/Rules.php - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:matches\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:max_length\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:min_length\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:not_equals\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:not_in_list\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:required\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:required_with\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Validation/StrictRules/Rules.php - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:required_with\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:required_without\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Validation/StrictRules/Rules.php - - - message: '#^Method CodeIgniter\\Validation\\StrictRules\\Rules\:\:required_without\(\) has parameter \$str with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/StrictRules/Rules.php - - message: '#^Method CodeIgniter\\Validation\\Validation\:\:check\(\) has parameter \$rules with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Validation/Validation.php - - - message: '#^Method CodeIgniter\\Validation\\Validation\:\:check\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/Validation.php - - message: '#^Method CodeIgniter\\Validation\\Validation\:\:fillPlaceholders\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 @@ -4572,11 +4112,6 @@ parameters: count: 1 path: ../../system/Validation/ValidationInterface.php - - - message: '#^Method CodeIgniter\\Validation\\ValidationInterface\:\:check\(\) has parameter \$value with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Validation/ValidationInterface.php - - message: '#^Method CodeIgniter\\Validation\\ValidationInterface\:\:getRules\(\) return type has no value type specified in iterable type array\.$#' count: 1 diff --git a/utils/phpstan-baseline/return.type.neon b/utils/phpstan-baseline/return.type.neon index b181bcabebd9..cd3da83ccce5 100644 --- a/utils/phpstan-baseline/return.type.neon +++ b/utils/phpstan-baseline/return.type.neon @@ -1,4 +1,4 @@ -# total 2 errors +# total 3 errors parameters: ignoreErrors: @@ -7,6 +7,11 @@ parameters: count: 1 path: ../../system/Database/BaseBuilder.php + - + message: '#^Method CodeIgniter\\Entity\\Cast\\DatetimeCast\:\:get\(\) should return CodeIgniter\\I18n\\Time but returns mixed\.$#' + count: 1 + path: ../../system/Entity/Cast/DatetimeCast.php + - message: '#^Method CodeIgniter\\Router\\Router\:\:getRouteAttributes\(\) should return array\{class\: list\, method\: list\\} but returns array\{class\: list\, method\: list\\}\.$#' count: 1