diff --git a/app/Config/Session.php b/app/Config/Session.php index 6944710f705b..24912865f271 100644 --- a/app/Config/Session.php +++ b/app/Config/Session.php @@ -14,6 +14,7 @@ class Session extends BaseConfig * -------------------------------------------------------------------------- * * The session storage driver to use: + * - `CodeIgniter\Session\Handlers\ArrayHandler` (for testing) * - `CodeIgniter\Session\Handlers\FileHandler` * - `CodeIgniter\Session\Handlers\DatabaseHandler` * - `CodeIgniter\Session\Handlers\MemcachedHandler` diff --git a/system/Language/en/Session.php b/system/Language/en/Session.php index 340ef752c346..53d8bba95789 100644 --- a/system/Language/en/Session.php +++ b/system/Language/en/Session.php @@ -13,7 +13,7 @@ // Session language settings return [ - 'missingDatabaseTable' => '"sessionSavePath" must have the table name for the Database Session Handler to work.', + 'missingDatabaseTable' => 'Session: "savePath" must have the table name for the Database Session Handler to work.', 'invalidSavePath' => 'Session: Configured save path "{0}" is not a directory, does not exist or cannot be created.', 'writeProtectedSavePath' => 'Session: Configured save path "{0}" is not writable by the PHP process.', 'emptySavePath' => 'Session: No save path configured.', diff --git a/system/Session/Handlers/ArrayHandler.php b/system/Session/Handlers/ArrayHandler.php index 8faa00fdc9d7..0db48bb4b0c2 100644 --- a/system/Session/Handlers/ArrayHandler.php +++ b/system/Session/Handlers/ArrayHandler.php @@ -21,13 +21,16 @@ */ class ArrayHandler extends BaseHandler { + /** + * @var array + */ protected static $cache = []; /** * Re-initialize existing session, or creates a new one. * - * @param string $path The path where to store/retrieve the session - * @param string $name The session name + * @param string $path The path where to store/retrieve the session. + * @param string $name The session name. */ public function open($path, $name): bool { @@ -37,7 +40,7 @@ public function open($path, $name): bool /** * Reads the session data from the session storage, and returns the results. * - * @param string $id The session ID + * @param string $id The session ID. * * @return false|string Returns an encoded string of the read data. * If nothing was read, it must return false. @@ -51,8 +54,8 @@ public function read($id) /** * Writes the session data to the session storage. * - * @param string $id The session ID - * @param string $data The encoded session data + * @param string $id The session ID. + * @param string $data The encoded session data. */ public function write($id, $data): bool { @@ -68,9 +71,9 @@ public function close(): bool } /** - * Destroys a session + * Destroys a session. * - * @param string $id The session ID being destroyed + * @param string $id The session ID being destroyed. */ public function destroy($id): bool { diff --git a/system/Session/Handlers/BaseHandler.php b/system/Session/Handlers/BaseHandler.php index bc2cdc17af11..4c6a7ddb8211 100644 --- a/system/Session/Handlers/BaseHandler.php +++ b/system/Session/Handlers/BaseHandler.php @@ -19,7 +19,7 @@ use SessionHandlerInterface; /** - * Base class for session handling + * Base class for session handling. */ abstract class BaseHandler implements SessionHandlerInterface { @@ -40,7 +40,7 @@ abstract class BaseHandler implements SessionHandlerInterface protected $lock = false; /** - * Cookie prefix + * Cookie prefix. * * The Config\Cookie::$prefix setting is completely ignored. * See https://codeigniter.com/user_guide/libraries/sessions.html#session-preferences @@ -50,14 +50,14 @@ abstract class BaseHandler implements SessionHandlerInterface protected $cookiePrefix = ''; /** - * Cookie domain + * Cookie domain. * * @var string */ protected $cookieDomain = ''; /** - * Cookie path + * Cookie path. * * @var string */ @@ -71,7 +71,7 @@ abstract class BaseHandler implements SessionHandlerInterface protected $cookieSecure = false; /** - * Cookie name to use + * Cookie name to use. * * @var string */ @@ -85,7 +85,7 @@ abstract class BaseHandler implements SessionHandlerInterface protected $matchIP = false; /** - * Current session ID + * Current session ID. * * @var string|null */ @@ -93,9 +93,9 @@ abstract class BaseHandler implements SessionHandlerInterface /** * The 'save path' for the session - * varies between + * varies between. * - * @var array|string + * @var array|string */ protected $savePath; diff --git a/system/Session/Handlers/DatabaseHandler.php b/system/Session/Handlers/DatabaseHandler.php index 9fb5fcd89f95..e19986461384 100644 --- a/system/Session/Handlers/DatabaseHandler.php +++ b/system/Session/Handlers/DatabaseHandler.php @@ -21,7 +21,7 @@ use ReturnTypeWillChange; /** - * Base database session handler + * Base database session handler. * * Do not use this class. Use database specific handler class. */ @@ -49,21 +49,21 @@ class DatabaseHandler extends BaseHandler protected $db; /** - * The database type + * The database type. * * @var string */ protected $platform; /** - * Row exists flag + * Row exists flag. * * @var bool */ protected $rowExists = false; /** - * ID prefix for multiple session cookies + * ID prefix for multiple session cookies. */ protected string $idPrefix; @@ -74,16 +74,16 @@ public function __construct(SessionConfig $config, string $ipAddress) { parent::__construct($config, $ipAddress); - // Store Session configurations - $this->DBGroup = $config->DBGroup ?? config(Database::class)->defaultGroup; - // Add sessionCookieName for multiple session cookies. - $this->idPrefix = $config->cookieName . ':'; - $this->table = $this->savePath; - if (empty($this->table)) { + + if ($this->table === '') { throw SessionException::forMissingDatabaseTable(); } + // Store Session configurations + $this->DBGroup = $config->DBGroup ?? config(Database::class)->defaultGroup; + // Add session cookie name for multiple session cookies. + $this->idPrefix = $config->cookieName . ':'; $this->db = Database::connect($this->DBGroup); $this->platform = $this->db->getPlatform(); } @@ -96,7 +96,7 @@ public function __construct(SessionConfig $config, string $ipAddress) */ public function open($path, $name): bool { - if (empty($this->db->connID)) { + if ($this->db->connID === false) { $this->db->initialize(); } @@ -153,7 +153,7 @@ public function read($id) } /** - * Sets SELECT clause + * Sets SELECT clause. * * @return void */ @@ -163,7 +163,7 @@ protected function setSelect(BaseBuilder $builder) } /** - * Decodes column data + * Decodes column data. * * @param string $data * @@ -177,8 +177,8 @@ protected function decodeData($data) /** * Writes the session data to the session storage. * - * @param string $id The session ID - * @param string $data The encoded session data + * @param string $id The session ID. + * @param string $data The encoded session data. */ public function write($id, $data): bool { @@ -230,7 +230,7 @@ public function write($id, $data): bool } /** - * Prepare data to insert/update + * Prepare data to insert/update. */ protected function prepareData(string $data): string { @@ -246,9 +246,9 @@ public function close(): bool } /** - * Destroys a session + * Destroys a session. * - * @param string $id The session ID being destroyed + * @param string $id The session ID being destroyed. */ public function destroy($id): bool { diff --git a/system/Session/Handlers/FileHandler.php b/system/Session/Handlers/FileHandler.php index 6938bcd2bbf6..3e400fb9af45 100644 --- a/system/Session/Handlers/FileHandler.php +++ b/system/Session/Handlers/FileHandler.php @@ -19,7 +19,7 @@ use ReturnTypeWillChange; /** - * Session handler using file system for storage + * Session handler using file system for storage. */ class FileHandler extends BaseHandler { @@ -31,14 +31,14 @@ class FileHandler extends BaseHandler protected $savePath; /** - * The file handle + * The file handle. * * @var resource|null */ protected $fileHandle; /** - * File Name + * File Name. * * @var string */ @@ -59,7 +59,7 @@ class FileHandler extends BaseHandler protected $matchIP = false; /** - * Regex of session ID + * Regex of session ID. * * @var string */ @@ -69,7 +69,7 @@ public function __construct(SessionConfig $config, string $ipAddress) { parent::__construct($config, $ipAddress); - if (! empty($this->savePath)) { + if ($this->savePath !== '') { $this->savePath = rtrim($this->savePath, '/\\'); ini_set('session.save_path', $this->savePath); } else { @@ -88,8 +88,8 @@ public function __construct(SessionConfig $config, string $ipAddress) /** * Re-initialize existing session, or creates a new one. * - * @param string $path The path where to store/retrieve the session - * @param string $name The session name + * @param string $path The path where to store/retrieve the session. + * @param string $name The session name. * * @throws SessionException */ @@ -114,7 +114,7 @@ public function open($path, $name): bool /** * Reads the session data from the session storage, and returns the results. * - * @param string $id The session ID + * @param string $id The session ID. * * @return false|string Returns an encoded string of the read data. * If nothing was read, it must return false. @@ -175,8 +175,8 @@ public function read($id) /** * Writes the session data to the session storage. * - * @param string $id The session ID - * @param string $data The encoded session data + * @param string $id The session ID. + * @param string $data The encoded session data. */ public function write($id, $data): bool { @@ -239,9 +239,9 @@ public function close(): bool } /** - * Destroys a session + * Destroys a session. * - * @param string $id The session ID being destroyed + * @param string $id The session ID being destroyed. */ public function destroy($id): bool { @@ -310,7 +310,7 @@ public function gc($max_lifetime) } /** - * Configure Session ID regular expression + * Configure Session ID regular expression. * * To make life easier, we force the PHP defaults. Because PHP9 forces them. * diff --git a/system/Session/Handlers/MemcachedHandler.php b/system/Session/Handlers/MemcachedHandler.php index 744d9556ee02..90d02f6f394b 100644 --- a/system/Session/Handlers/MemcachedHandler.php +++ b/system/Session/Handlers/MemcachedHandler.php @@ -20,19 +20,19 @@ use ReturnTypeWillChange; /** - * Session handler using Memcache for persistence + * Session handler using Memcached for persistence. */ class MemcachedHandler extends BaseHandler { /** - * Memcached instance + * Memcached instance. * * @var Memcached|null */ protected $memcached; /** - * Key prefix + * Key prefix. * * @var string */ @@ -61,11 +61,11 @@ public function __construct(SessionConfig $config, string $ipAddress) $this->sessionExpiration = $config->expiration; - if (empty($this->savePath)) { + if ($this->savePath !== '') { throw SessionException::forEmptySavepath(); } - // Add sessionCookieName for multiple session cookies. + // Add session cookie name for multiple session cookies. $this->keyPrefix .= $config->cookieName . ':'; if ($this->matchIP === true) { @@ -78,8 +78,8 @@ public function __construct(SessionConfig $config, string $ipAddress) /** * Re-initialize existing session, or creates a new one. * - * @param string $path The path where to store/retrieve the session - * @param string $name The session name + * @param string $path The path where to store/retrieve the session. + * @param string $name The session name. */ public function open($path, $name): bool { @@ -137,7 +137,7 @@ public function open($path, $name): bool /** * Reads the session data from the session storage, and returns the results. * - * @param string $id The session ID + * @param string $id The session ID. * * @return false|string Returns an encoded string of the read data. * If nothing was read, it must return false. @@ -163,8 +163,8 @@ public function read($id) /** * Writes the session data to the session storage. * - * @param string $id The session ID - * @param string $data The encoded session data + * @param string $id The session ID. + * @param string $data The encoded session data. */ public function write($id, $data): bool { @@ -223,9 +223,9 @@ public function close(): bool } /** - * Destroys a session + * Destroys a session. * - * @param string $id The session ID being destroyed + * @param string $id The session ID being destroyed. */ public function destroy($id): bool { @@ -255,7 +255,7 @@ public function gc($max_lifetime) /** * Acquires an emulated lock. * - * @param string $sessionID Session ID + * @param string $sessionID Session ID. */ protected function lockSession(string $sessionID): bool { @@ -299,7 +299,7 @@ protected function lockSession(string $sessionID): bool } /** - * Releases a previously acquired lock + * Releases a previously acquired lock. */ protected function releaseLock(): bool { diff --git a/system/Session/Handlers/RedisHandler.php b/system/Session/Handlers/RedisHandler.php index eeb06043321b..27390174fb50 100644 --- a/system/Session/Handlers/RedisHandler.php +++ b/system/Session/Handlers/RedisHandler.php @@ -21,7 +21,7 @@ use ReturnTypeWillChange; /** - * Session handler using Redis for persistence + * Session handler using Redis for persistence. */ class RedisHandler extends BaseHandler { @@ -29,28 +29,28 @@ class RedisHandler extends BaseHandler private const DEFAULT_PROTOCOL = 'tcp'; /** - * phpRedis instance + * phpRedis instance. * * @var Redis|null */ protected $redis; /** - * Key prefix + * Key prefix. * * @var string */ protected $keyPrefix = 'ci_session:'; /** - * Lock key + * Lock key. * * @var string|null */ protected $lockKey; /** - * Key exists flag + * Key exists flag. * * @var bool */ @@ -74,7 +74,7 @@ class RedisHandler extends BaseHandler private int $lockMaxRetries = 300; /** - * @param string $ipAddress User's IP address + * @param string $ipAddress User's IP address. * * @throws SessionException */ @@ -82,12 +82,12 @@ public function __construct(SessionConfig $config, string $ipAddress) { parent::__construct($config, $ipAddress); - // Store Session configurations + // Store Session configurations. $this->sessionExpiration = ($config->expiration === 0) ? (int) ini_get('session.gc_maxlifetime') : $config->expiration; - // Add sessionCookieName for multiple session cookies. + // Add session cookie name for multiple session cookies. $this->keyPrefix .= $config->cookieName . ':'; $this->setSavePath(); @@ -102,7 +102,7 @@ public function __construct(SessionConfig $config, string $ipAddress) protected function setSavePath(): void { - if (empty($this->savePath)) { + if ($this->savePath === '') { throw SessionException::forEmptySavepath(); } @@ -163,8 +163,8 @@ protected function setSavePath(): void /** * Re-initialize existing session, or creates a new one. * - * @param string $path The path where to store/retrieve the session - * @param string $name The session name + * @param string $path The path where to store/retrieve the session. + * @param string $name The session name. * * @throws RedisException */ @@ -202,7 +202,7 @@ public function open($path, $name): bool /** * Reads the session data from the session storage, and returns the results. * - * @param string $id The session ID + * @param string $id The session ID. * * @return false|string Returns an encoded string of the read data. * If nothing was read, it must return false. @@ -236,8 +236,8 @@ public function read($id) /** * Writes the session data to the session storage. * - * @param string $id The session ID - * @param string $data The encoded session data + * @param string $id The session ID. + * @param string $data The encoded session data. * * @throws RedisException */ @@ -307,9 +307,9 @@ public function close(): bool } /** - * Destroys a session + * Destroys a session. * - * @param string $id The session ID being destroyed + * @param string $id The session ID being destroyed. * * @throws RedisException */ @@ -345,7 +345,7 @@ public function gc($max_lifetime) /** * Acquires an emulated lock. * - * @param string $sessionID Session ID + * @param string $sessionID Session ID. * * @throws RedisException */ @@ -397,7 +397,7 @@ protected function lockSession(string $sessionID): bool } /** - * Releases a previously acquired lock + * Releases a previously acquired lock. * * @throws RedisException */ diff --git a/system/Session/Session.php b/system/Session/Session.php index f3dd570556c6..e3b435b3b8ff 100644 --- a/system/Session/Session.php +++ b/system/Session/Session.php @@ -24,9 +24,10 @@ * Implementation of CodeIgniter session container. * * Session configuration is done through session variables and cookie related - * variables in app/config/App.php + * variables in `Сonfig\Session`. * * @property string $session_id + * * @see \CodeIgniter\Session\SessionTest */ class Session implements SessionInterface @@ -40,84 +41,6 @@ class Session implements SessionInterface */ protected $driver; - /** - * The storage driver to use: files, database, redis, memcached - * - * @var string - * - * @deprecated Use $this->config->driver. - */ - protected $sessionDriverName; - - /** - * The session cookie name, must contain only [0-9a-z_-] characters. - * - * @var string - * - * @deprecated Use $this->config->cookieName. - */ - protected $sessionCookieName = 'ci_session'; - - /** - * The number of SECONDS you want the session to last. - * Setting it to 0 (zero) means expire when the browser is closed. - * - * @var int - * - * @deprecated Use $this->config->expiration. - */ - protected $sessionExpiration = 7200; - - /** - * The location to save sessions to, driver dependent. - * - * For the 'files' driver, it's a path to a writable directory. - * WARNING: Only absolute paths are supported! - * - * For the 'database' driver, it's a table name. - * - * @todo address memcache & redis needs - * - * IMPORTANT: You are REQUIRED to set a valid save path! - * - * @var string - * - * @deprecated Use $this->config->savePath. - */ - protected $sessionSavePath; - - /** - * Whether to match the user's IP address when reading the session data. - * - * WARNING: If you're using the database driver, don't forget to update - * your session table's PRIMARY KEY when changing this setting. - * - * @var bool - * - * @deprecated Use $this->config->matchIP. - */ - protected $sessionMatchIP = false; - - /** - * How many seconds between CI regenerating the session ID. - * - * @var int - * - * @deprecated Use $this->config->timeToUpdate. - */ - protected $sessionTimeToUpdate = 300; - - /** - * Whether to destroy session data associated with the old session ID - * when auto-regenerating the session ID. When set to FALSE, the data - * will be later deleted by the garbage collector. - * - * @var bool - * - * @deprecated Use $this->config->regenerateDestroy. - */ - protected $sessionRegenerateDestroy = false; - /** * The session cookie instance. * @@ -126,68 +49,22 @@ class Session implements SessionInterface protected $cookie; /** - * The domain name to use for cookies. - * Set to .your-domain.com for site-wide cookies. - * - * @var string - * - * @deprecated No longer used. - */ - protected $cookieDomain = ''; - - /** - * Path used for storing cookies. - * Typically will be a forward slash. - * - * @var string - * - * @deprecated No longer used. - */ - protected $cookiePath = '/'; - - /** - * Cookie will only be set if a secure HTTPS connection exists. - * - * @var bool - * - * @deprecated No longer used. - */ - protected $cookieSecure = false; - - /** - * Cookie SameSite setting as described in RFC6265 - * Must be 'None', 'Lax' or 'Strict'. - * - * @var string - * - * @deprecated No longer used. - */ - protected $cookieSameSite = Cookie::SAMESITE_LAX; - - /** - * sid regex expression + * Session ID regex expression. * * @var string */ protected $sidRegexp; - /** - * Session Config - */ protected SessionConfig $config; /** - * Constructor. - * * Extract configuration settings and save them here. */ public function __construct(SessionHandlerInterface $driver, SessionConfig $config) { $this->driver = $driver; - $this->config = $config; - - $cookie = config(CookieConfig::class); + $cookie = config(CookieConfig::class); $this->cookie = (new Cookie($this->config->cookieName, '', [ 'expires' => $this->config->expiration === 0 ? 0 : Time::now()->getTimestamp() + $this->config->expiration, @@ -264,18 +141,6 @@ public function start() return $this; } - /** - * Destroys the current session. - * - * @deprecated Use destroy() instead. - * - * @return void - */ - public function stop() - { - $this->destroy(); - } - /** * Configuration. * @@ -287,7 +152,9 @@ protected function configure() { ini_set('session.name', $this->config->cookieName); - $sameSite = $this->cookie->getSameSite() ?: ucfirst(Cookie::SAMESITE_LAX); + $sameSite = $this->cookie->getSameSite() === '' + ? ucfirst(Cookie::SAMESITE_LAX) + : $this->cookie->getSameSite(); $params = [ 'lifetime' => $this->config->expiration, @@ -319,7 +186,7 @@ protected function configure() } /** - * Configure session ID length + * Configure session ID length. * * To make life easier, we force the PHP defaults. Because PHP9 forces them. * See https://wiki.php.net/rfc/deprecations_php_8_4#sessionsid_length_and_sessionsid_bits_per_character @@ -345,7 +212,7 @@ protected function configureSidLength() } /** - * Handle temporary variables + * Handle temporary variables. * * Clears old "flash" data, marks the new one for deletion and handles * "temp" data deletion. @@ -375,13 +242,6 @@ protected function initVars() } } - /** - * Regenerates the session ID. - * - * @param bool $destroy Should old session data be destroyed? - * - * @return void - */ public function regenerate(bool $destroy = false) { $_SESSION['__ci_last_regenerate'] = Time::now()->getTimestamp(); @@ -410,11 +270,6 @@ private function removeOldSessionCookie(): void } } - /** - * Destroys the current session. - * - * @return void - */ public function destroy() { if (ENVIRONMENT === 'testing') { @@ -438,20 +293,6 @@ public function close() session_write_close(); } - /** - * Sets user data into the session. - * - * If $data is a string, then it is interpreted as a session property - * key, and $value is expected to be non-null. - * - * If $data is an array, it is expected to be an array of key/value pairs - * to be set as session properties. - * - * @param array|list|string $data Property name or associative array of properties - * @param mixed $value Property value if single key provided - * - * @return void - */ public function set($data, $value = null) { $data = is_array($data) ? $data : [$data => $value]; @@ -465,19 +306,6 @@ public function set($data, $value = null) } } - /** - * Get user data that has been set in the session. - * - * If the property exists as "normal", returns it. - * Otherwise, returns an array of any temp or flash data values with the - * property key. - * - * Replaces the legacy method $session->userdata(); - * - * @param string|null $key Identifier of the session property to retrieve - * - * @return ($key is string ? mixed : array) - */ public function get(?string $key = null) { if (! isset($_SESSION) || $_SESSION === []) { @@ -502,11 +330,6 @@ public function get(?string $key = null) return $userdata; } - /** - * Returns whether an index exists in the session array. - * - * @param string $key Identifier of the session property we are interested in. - */ public function has(string $key): bool { return isset($_SESSION[$key]); @@ -527,17 +350,6 @@ public function push(string $key, array $data) } } - /** - * Remove one or more session properties. - * - * If $key is an array, it is interpreted as an array of string property - * identifiers to remove. Otherwise, it is interpreted as the identifier - * of a specific session property to remove. - * - * @param list|string $key Identifier of the session property or properties to remove. - * - * @return void - */ public function remove($key) { $key = is_array($key) ? $key : [$key]; @@ -549,10 +361,9 @@ public function remove($key) /** * Magic method to set variables in the session by simply calling - * $session->foo = bar; + * $session->foo = 'bar'; * - * @param string $key Identifier of the session property to set. - * @param mixed $value + * @param mixed $value * * @return void */ @@ -565,8 +376,6 @@ public function __set(string $key, $value) * Magic method to get session variables by simply calling * $foo = $session->foo; * - * @param string $key Identifier of the session property to remove. - * * @return mixed */ public function __get(string $key) @@ -589,43 +398,18 @@ public function __get(string $key) * * Different from `has()` in that it will validate 'session_id' as well. * Mostly used by internal PHP functions, users should stick to `has()`. - * - * @param string $key Identifier of the session property to remove. */ public function __isset(string $key): bool { return isset($_SESSION[$key]) || $key === 'session_id'; } - /** - * Sets data into the session that will only last for a single request. - * Perfect for use with single-use status update messages. - * - * If $data is an array, it is interpreted as an associative array of - * key/value pairs for flashdata properties. - * Otherwise, it is interpreted as the identifier of a specific - * flashdata property, with $value containing the property value. - * - * @param array|string $data Property identifier or associative array of properties - * @param mixed $value Property value if $data is a scalar - * - * @return void - */ public function setFlashdata($data, $value = null) { $this->set($data, $value); $this->markAsFlashdata(is_array($data) ? array_keys($data) : $data); } - /** - * Retrieve one or more items of flash data from the session. - * - * If the item key is null, return all flashdata. - * - * @param string|null $key Property identifier - * - * @return ($key is string ? mixed : array) - */ public function getFlashdata(?string $key = null) { $_SESSION['__ci_vars'] ??= []; @@ -649,24 +433,11 @@ public function getFlashdata(?string $key = null) return $flashdata; } - /** - * Keeps a single piece of flash data alive for one more request. - * - * @param list|string $key Property identifier or array of them - * - * @return void - */ public function keepFlashdata($key) { $this->markAsFlashdata($key); } - /** - * Mark a session property or properties as flashdata. This returns - * `false` if any of the properties were not already set. - * - * @param list|string $key Property identifier or array of them - */ public function markAsFlashdata($key): bool { $keys = is_array($key) ? $key : [$key]; @@ -683,13 +454,6 @@ public function markAsFlashdata($key): bool return true; } - /** - * Unmark data in the session as flashdata. - * - * @param list|string $key Property identifier or array of them - * - * @return void - */ public function unmarkFlashdata($key) { if (! isset($_SESSION['__ci_vars'])) { @@ -711,11 +475,6 @@ public function unmarkFlashdata($key) } } - /** - * Retrieve all of the keys for session data marked as flashdata. - * - * @return list - */ public function getFlashKeys(): array { if (! isset($_SESSION['__ci_vars'])) { @@ -733,30 +492,12 @@ public function getFlashKeys(): array return $keys; } - /** - * Sets new data into the session, and marks it as temporary data - * with a set lifespan. - * - * @param array|list|string $data Session data key or associative array of items - * @param mixed $value Value to store - * @param int $ttl Time-to-live in seconds - * - * @return void - */ public function setTempdata($data, $value = null, int $ttl = 300) { $this->set($data, $value); $this->markAsTempdata($data, $ttl); } - /** - * Returns either a single piece of tempdata, or all temp data currently - * in the session. - * - * @param string|null $key Session data key - * - * @return ($key is string ? mixed : array) - */ public function getTempdata(?string $key = null) { $_SESSION['__ci_vars'] ??= []; @@ -780,28 +521,12 @@ public function getTempdata(?string $key = null) return $tempdata; } - /** - * Removes a single piece of temporary data from the session. - * - * @param string $key Session data key - * - * @return void - */ public function removeTempdata(string $key) { $this->unmarkTempdata($key); unset($_SESSION[$key]); } - /** - * Mark one of more pieces of data as being temporary, meaning that - * it has a set lifespan within the session. - * - * Returns `false` if any of the properties were not set. - * - * @param array|list|string $key Property identifier or array of them - * @param int $ttl Time to live, in seconds - */ public function markAsTempdata($key, int $ttl = 300): bool { $time = Time::now()->getTimestamp(); @@ -833,14 +558,6 @@ public function markAsTempdata($key, int $ttl = 300): bool return true; } - /** - * Unmarks temporary data in the session, effectively removing its - * lifespan and allowing it to live as long as the session does. - * - * @param list|string $key Property identifier or array of them - * - * @return void - */ public function unmarkTempdata($key) { if (! isset($_SESSION['__ci_vars'])) { @@ -862,11 +579,6 @@ public function unmarkTempdata($key) } } - /** - * Retrieve the keys of all session data that have been marked as temporary data. - * - * @return list - */ public function getTempKeys(): array { if (! isset($_SESSION['__ci_vars'])) { diff --git a/system/Session/SessionInterface.php b/system/Session/SessionInterface.php index fc441c534494..bf4bc1a9fa7e 100644 --- a/system/Session/SessionInterface.php +++ b/system/Session/SessionInterface.php @@ -43,8 +43,8 @@ public function destroy(); * If $data is an array, it is expected to be an array of key/value pairs * to be set as session properties. * - * @param array|list|string $data Property name or associative array of properties - * @param mixed $value Property value if single key provided + * @param array|list|string $data Property name or associative array of properties. + * @param mixed $value Property value if single key provided. * * @return void */ @@ -59,7 +59,7 @@ public function set($data, $value = null); * * Replaces the legacy method $session->userdata(); * - * @param string|null $key Identifier of the session property to retrieve + * @param string|null $key Identifier of the session property to retrieve. * * @return ($key is string ? mixed : array) */ @@ -106,7 +106,7 @@ public function setFlashdata($data, $value = null); * * If the item key is null, return all flashdata. * - * @param string|null $key Property identifier + * @param string|null $key Property identifier. * * @return ($key is string ? mixed : array) */ @@ -115,7 +115,7 @@ public function getFlashdata(?string $key = null); /** * Keeps a single piece of flash data alive for one more request. * - * @param list|string $key Property identifier or array of them + * @param list|string $key Property identifier or array of them. * * @return void */ @@ -125,7 +125,7 @@ public function keepFlashdata($key); * Mark a session property or properties as flashdata. This returns * `false` if any of the properties were not already set. * - * @param list|string $key Property identifier or array of them + * @param list|string $key Property identifier or array of them. * * @return bool */ @@ -134,7 +134,7 @@ public function markAsFlashdata($key); /** * Unmark data in the session as flashdata. * - * @param list|string $key Property identifier or array of them + * @param list|string $key Property identifier or array of them. * * @return void */ @@ -151,9 +151,9 @@ public function getFlashKeys(): array; * Sets new data into the session, and marks it as temporary data * with a set lifespan. * - * @param array|list|string $data Session data key or associative array of items - * @param mixed $value Value to store - * @param int $ttl Time-to-live in seconds + * @param array|list|string $data Session data key or associative array of items. + * @param mixed $value Value to store. + * @param int $ttl Time-to-live in seconds. * * @return void */ @@ -163,7 +163,7 @@ public function setTempdata($data, $value = null, int $ttl = 300); * Returns either a single piece of tempdata, or all temp data currently * in the session. * - * @param string|null $key Session data key + * @param string|null $key Session data key. * * @return ($key is string ? mixed : array) */ @@ -172,7 +172,7 @@ public function getTempdata(?string $key = null); /** * Removes a single piece of temporary data from the session. * - * @param string $key Session data key + * @param string $key Session data key. * * @return void */ @@ -195,7 +195,7 @@ public function markAsTempdata($key, int $ttl = 300); * Unmarks temporary data in the session, effectively removing its * lifespan and allowing it to live as long as the session does. * - * @param list|string $key Property identifier or array of them + * @param list|string $key Property identifier or array of them. * * @return void */ diff --git a/tests/system/Config/ServicesTest.php b/tests/system/Config/ServicesTest.php index d7d55fc3d8b1..37b50890c400 100644 --- a/tests/system/Config/ServicesTest.php +++ b/tests/system/Config/ServicesTest.php @@ -313,10 +313,10 @@ public function testNewSessionWithInvalidDatabaseHandler(): void public function testCallStatic(): void { // __callStatic should kick in for this but fail - $actual = Services::SeSsIoNs(null, false); + $actual = Services::SeSsIoNs(null, false); // @phpstan-ignore staticMethod.notFound $this->assertNull($actual); // __callStatic should kick in for this - $actual = Services::SeSsIoN(null, false); + $actual = Services::SeSsIoN(null, false); // @phpstan-ignore staticMethod.notFound $this->assertInstanceOf(Session::class, $actual); } diff --git a/tests/system/Security/SecurityCSRFSessionRandomizeTokenTest.php b/tests/system/Security/SecurityCSRFSessionRandomizeTokenTest.php index 619f55829712..da9449c38ac2 100644 --- a/tests/system/Security/SecurityCSRFSessionRandomizeTokenTest.php +++ b/tests/system/Security/SecurityCSRFSessionRandomizeTokenTest.php @@ -297,6 +297,9 @@ public function testRegenerateWithFalseSecurityRegenerateProperty(): void $_SERVER['REQUEST_METHOD'] = 'POST'; $_POST['csrf_test_name'] = $this->randomizedToken; + /** + * @var SecurityConfig + */ $config = Factories::config('Security'); $config->tokenRandomize = true; $config->regenerate = false; @@ -317,6 +320,9 @@ public function testRegenerateWithTrueSecurityRegenerateProperty(): void $_SERVER['REQUEST_METHOD'] = 'POST'; $_POST['csrf_test_name'] = $this->randomizedToken; + /** + * @var SecurityConfig + */ $config = Factories::config('Security'); $config->tokenRandomize = true; $config->regenerate = true; diff --git a/tests/system/Security/SecurityCSRFSessionTest.php b/tests/system/Security/SecurityCSRFSessionTest.php index 7fb618bef936..71177cb85ad3 100644 --- a/tests/system/Security/SecurityCSRFSessionTest.php +++ b/tests/system/Security/SecurityCSRFSessionTest.php @@ -250,6 +250,9 @@ public function testRegenerateWithFalseSecurityRegenerateProperty(): void $_SERVER['REQUEST_METHOD'] = 'POST'; $_POST['csrf_test_name'] = '8b9218a55906f9dcc1dc263dce7f005a'; + /** + * @var SecurityConfig + */ $config = Factories::config('Security'); $config->regenerate = false; Factories::injectMock('config', 'Security', $config); @@ -269,6 +272,9 @@ public function testRegenerateWithTrueSecurityRegenerateProperty(): void $_SERVER['REQUEST_METHOD'] = 'POST'; $_POST['csrf_test_name'] = '8b9218a55906f9dcc1dc263dce7f005a'; + /** + * @var SecurityConfig + */ $config = Factories::config('Security'); $config->regenerate = true; Factories::injectMock('config', 'Security', $config); diff --git a/tests/system/Session/Handlers/Database/AbstractHandlerTestCase.php b/tests/system/Session/Handlers/Database/AbstractHandlerTestCase.php index 842824c4a76a..b5760d7f4f4e 100644 --- a/tests/system/Session/Handlers/Database/AbstractHandlerTestCase.php +++ b/tests/system/Session/Handlers/Database/AbstractHandlerTestCase.php @@ -44,6 +44,9 @@ protected function setUp(): void } } + /** + * @param array $options Replace values for `Config\Session`. + */ abstract protected function getInstance($options = []): DatabaseHandler; public function testOpen(): void diff --git a/tests/system/Session/Handlers/Database/RedisHandlerTest.php b/tests/system/Session/Handlers/Database/RedisHandlerTest.php index 19efb98cd50d..7e38a81e97de 100644 --- a/tests/system/Session/Handlers/Database/RedisHandlerTest.php +++ b/tests/system/Session/Handlers/Database/RedisHandlerTest.php @@ -32,6 +32,9 @@ final class RedisHandlerTest extends CIUnitTestCase private string $sessionSavePath = 'tcp://127.0.0.1:6379'; private string $userIpAddress = '127.0.0.1'; + /** + * @param array $options Replace values for `Config\Session`. + */ protected function getInstance($options = []): RedisHandler { $defaults = [ @@ -137,6 +140,9 @@ public function testSecondaryReadAfterClose(): void $handler->close(); } + /** + * @param array $expected + */ #[DataProvider('provideSetSavePath')] public function testSetSavePath(string $savePath, array $expected): void { @@ -148,6 +154,9 @@ public function testSetSavePath(string $savePath, array $expected): void $this->assertSame($expected, $savePath); } + /** + * @return iterable|float|int|string|null>|string>> $expected + */ public static function provideSetSavePath(): iterable { yield from [ diff --git a/tests/system/Session/SessionTest.php b/tests/system/Session/SessionTest.php index 78aec295b718..dd3272405d8a 100644 --- a/tests/system/Session/SessionTest.php +++ b/tests/system/Session/SessionTest.php @@ -44,6 +44,9 @@ protected function setUp(): void $_SESSION = []; } + /** + * @param array $options Replace values for `Config\Session`. + */ protected function getInstance($options = []): MockSession { $defaults = [ diff --git a/user_guide_src/source/changelogs/v4.7.0.rst b/user_guide_src/source/changelogs/v4.7.0.rst index 5a3d9a401b2c..0ddce2b938aa 100644 --- a/user_guide_src/source/changelogs/v4.7.0.rst +++ b/user_guide_src/source/changelogs/v4.7.0.rst @@ -72,10 +72,14 @@ Method Signature Changes Removed Deprecated Items ======================== -- **Text Helper:** The deprecated types in ``random_string()`` function: ``basic``, ``md5``, and ``sha1`` has been removed. - **BaseModel:** The deprecated method ``transformDataRowToArray()`` has been removed. -- **CodeIgniter:** The deprecated ``CodeIgniter\CodeIgniter::resolvePlatformExtensions()`` has been removed. - **Cache:** The deprecated return type ``false`` for ``CodeIgniter\Cache\CacheInterface::getMetaData()`` has been replaced with ``null`` type. +- **CodeIgniter:** The deprecated ``CodeIgniter\CodeIgniter::resolvePlatformExtensions()`` has been removed. +- **Session:** The deprecated properties ``$sessionDriverName``, ``$sessionCookieName``, + ``$sessionExpiration``, ``$sessionSavePath``, ``$sessionMatchIP``, + ``$sessionTimeToUpdate``, and ``$sessionRegenerateDestroy`` in ``CodeIgniter\Session`` has been removed. +- **Session:** The deprecated method ``CodeIgniter\Session::stop()`` has been removed. +- **Text Helper:** The deprecated types in ``random_string()`` function: ``basic``, ``md5``, and ``sha1`` has been removed. ************ Enhancements @@ -141,7 +145,8 @@ Message Changes *************** - Added ``Email.invalidSMTPAuthMethod``, ``Email.failureSMTPAuthMethod``, ``CLI.signals.noPcntlExtension``, ``CLI.signals.noPosixExtension`` and ``CLI.signals.failedSignal``. -- Deprecated ``Email.failedSMTPLogin`` and ``Image.libPathInvalid`` +- Deprecated ``Email.failedSMTPLogin`` and ``Image.libPathInvalid``. +- Changed ``Session.missingDatabaseTable``. ******* Changes diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index a89e12df32c0..4edb3ac97ce5 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -29,9 +29,7 @@ The ``$config`` parameter is optional - your application configuration. If not provided, the services register will instantiate your default one. -Once loaded, the Sessions library object will be available using:: - - $session +Once loaded, the Sessions library object will be available using ``$session``. Alternatively, you can use the helper function that will use the default configuration options. This version is a little friendlier to read, @@ -118,7 +116,8 @@ Retrieving Session Data ======================= Any piece of information from the session array is available through the -``$_SESSION`` superglobal: +``$_SESSION`` superglobal. For example, to assign a previously stored ``name`` item to the ``$name`` +variable, you will do this: .. literalinclude:: sessions/004.php @@ -134,12 +133,6 @@ Or even through the session helper method: .. literalinclude:: sessions/007.php -Where ``item`` is the array key corresponding to the item you wish to fetch. -For example, to assign a previously stored ``name`` item to the ``$name`` -variable, you will do this: - -.. literalinclude:: sessions/008.php - .. note:: The ``get()`` method returns null if the item you are trying to access does not exist. @@ -191,7 +184,7 @@ Pushing New Value to Session Data ================================= The ``push()`` method is used to push a new value onto a session value that is an array. -For instance, if the ``hobbies`` key contains an array of hobbies, you can add a new value onto the array like so: +For instance, if the ``hobbies`` key contains an array of hobbies, you can add a new value or replace the previous value onto the array like so: .. literalinclude:: sessions/015.php @@ -453,7 +446,7 @@ Preference Default Opti **cookieName** ci_session [A-Za-z\_-] characters only The name used for the session cookie. **expiration** 7200 (2 hours) Time in seconds (integer) The number of seconds you would like the session to last. If you would like a non-expiring session (until browser is closed) set the value to zero: 0 -**savePath** null None Specifies the storage location, depends on the driver being used. +**savePath** WRITEPATH . 'session' None Specifies the storage location, depends on the driver being used. **matchIP** false true/false (boolean) Whether to validate the user's IP address when reading the session cookie. Note that some ISPs dynamically changes the IP, so if you want a non-expiring session you will likely set this to false. @@ -552,6 +545,10 @@ Instead, you should do something like this, depending on your environment: chmod 0700 //writable/sessions/ chown www-data //writable/sessions/ +Since the built-in mechanism does not have automatic cleaning of expired sessions, +you will notice that the *saveDir* directory may overflow with files. +To solve this problem, you will need to configure the **cron** or **Task Scheduler** to delete outdated files. + Bonus Tip --------- @@ -608,10 +605,10 @@ And then of course, create the database table. For MySQL:: CREATE TABLE IF NOT EXISTS `ci_sessions` ( - `id` varchar(128) NOT null, - `ip_address` varchar(45) NOT null, - `timestamp` timestamp DEFAULT CURRENT_TIMESTAMP NOT null, - `data` blob NOT null, + `id` varchar(128) NOT NULL, + `ip_address` varchar(45) NOT NULL, + `timestamp` timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + `data` blob NOT NULL, KEY `ci_sessions_timestamp` (`timestamp`) ); diff --git a/user_guide_src/source/libraries/sessions/004.php b/user_guide_src/source/libraries/sessions/004.php index ec1e40879798..791a57f21ecf 100644 --- a/user_guide_src/source/libraries/sessions/004.php +++ b/user_guide_src/source/libraries/sessions/004.php @@ -1,3 +1,3 @@ get('item'); +$name = $session->get('name'); diff --git a/user_guide_src/source/libraries/sessions/006.php b/user_guide_src/source/libraries/sessions/006.php index 180d52833615..2e6c05c8e217 100644 --- a/user_guide_src/source/libraries/sessions/006.php +++ b/user_guide_src/source/libraries/sessions/006.php @@ -1,3 +1,3 @@ item; +$name = $session->name; diff --git a/user_guide_src/source/libraries/sessions/007.php b/user_guide_src/source/libraries/sessions/007.php index 2825b97d5c4b..852220f692a0 100644 --- a/user_guide_src/source/libraries/sessions/007.php +++ b/user_guide_src/source/libraries/sessions/007.php @@ -1,3 +1,3 @@ name; - -// or: - -$name = $session->get('name'); diff --git a/user_guide_src/source/libraries/sessions/015.php b/user_guide_src/source/libraries/sessions/015.php index e80a0177905a..c2ac72da85f8 100644 --- a/user_guide_src/source/libraries/sessions/015.php +++ b/user_guide_src/source/libraries/sessions/015.php @@ -1,3 +1,26 @@ push('hobbies', ['sport' => 'tennis']); +/** + * [hobbies] => Array + * ( + * [music] => rock + * [sport] => running + * ) + */ +$session->set('hobbies', [ + 'music' => 'rock', + 'sport' => 'running', +]); + +/** + * [hobbies] => Array + * ( + * [food] => cooking + * [music] => rock + * [sport] => tennis + * ) + */ +$session->push('hobbies', [ + 'food' => 'cooking', + 'sport' => 'tennis', +]); diff --git a/user_guide_src/source/libraries/sessions/039.php b/user_guide_src/source/libraries/sessions/039.php index a561e4a49cb6..45f2c4ce4272 100644 --- a/user_guide_src/source/libraries/sessions/039.php +++ b/user_guide_src/source/libraries/sessions/039.php @@ -3,12 +3,12 @@ namespace Config; use CodeIgniter\Config\BaseConfig; -use CodeIgniter\Session\Handlers\FileHandler; +use CodeIgniter\Session\Handlers\DatabaseHandler; class Session extends BaseConfig { // ... - public string $driver = 'CodeIgniter\Session\Handlers\DatabaseHandler'; + public string $driver = DatabaseHandler::class; // ... public string $savePath = 'ci_sessions'; diff --git a/user_guide_src/source/libraries/sessions/040.php b/user_guide_src/source/libraries/sessions/040.php index 386c83a0293b..86beb909fa20 100644 --- a/user_guide_src/source/libraries/sessions/040.php +++ b/user_guide_src/source/libraries/sessions/040.php @@ -3,7 +3,7 @@ namespace Config; use CodeIgniter\Config\BaseConfig; -use CodeIgniter\Session\Handlers\FileHandler; +use CodeIgniter\Session\Handlers\DatabaseHandler; class Session extends BaseConfig { diff --git a/user_guide_src/source/libraries/sessions/041.php b/user_guide_src/source/libraries/sessions/041.php index 091ec22ce651..765c79b83286 100644 --- a/user_guide_src/source/libraries/sessions/041.php +++ b/user_guide_src/source/libraries/sessions/041.php @@ -3,12 +3,12 @@ namespace Config; use CodeIgniter\Config\BaseConfig; -use CodeIgniter\Session\Handlers\FileHandler; +use CodeIgniter\Session\Handlers\RedisHandler; class Session extends BaseConfig { // ... - public string $driver = 'CodeIgniter\Session\Handlers\RedisHandler'; + public string $driver = RedisHandler::class; // ... public string $savePath = 'tcp://localhost:6379'; diff --git a/user_guide_src/source/libraries/sessions/042.php b/user_guide_src/source/libraries/sessions/042.php index 92ba42b9af3d..407b83e40fff 100644 --- a/user_guide_src/source/libraries/sessions/042.php +++ b/user_guide_src/source/libraries/sessions/042.php @@ -3,12 +3,12 @@ namespace Config; use CodeIgniter\Config\BaseConfig; -use CodeIgniter\Session\Handlers\FileHandler; +use CodeIgniter\Session\Handlers\MemcachedHandler; class Session extends BaseConfig { // ... - public string $driver = 'CodeIgniter\Session\Handlers\MemcachedHandler'; + public string $driver = MemcachedHandler::class; // ... public string $savePath = 'localhost:11211'; diff --git a/user_guide_src/source/libraries/sessions/043.php b/user_guide_src/source/libraries/sessions/043.php index f75e31430f93..83708fd4e0cd 100644 --- a/user_guide_src/source/libraries/sessions/043.php +++ b/user_guide_src/source/libraries/sessions/043.php @@ -3,7 +3,7 @@ namespace Config; use CodeIgniter\Config\BaseConfig; -use CodeIgniter\Session\Handlers\FileHandler; +use CodeIgniter\Session\Handlers\MemcachedHandler; class Session extends BaseConfig { diff --git a/utils/phpstan-baseline/argument.type.neon b/utils/phpstan-baseline/argument.type.neon index 0c99d09b54e3..3cbd200d3bc0 100644 --- a/utils/phpstan-baseline/argument.type.neon +++ b/utils/phpstan-baseline/argument.type.neon @@ -1,4 +1,4 @@ -# total 85 errors +# total 84 errors parameters: ignoreErrors: @@ -28,12 +28,12 @@ parameters: path: ../../system/Database/SQLite3/Builder.php - - message: '#^Parameter \#2 \$to of method CodeIgniter\\Router\\RouteCollection\:\:add\(\) expects array\|\(Closure\(mixed \.\.\.\)\: \(CodeIgniter\\HTTP\\ResponseInterface\|string\|void\)\)\|string, Closure\(mixed\)\: \(CodeIgniter\\HTTP\\DownloadResponse\|null\) given\.$#' + message: '#^Parameter \#2 \$to of method CodeIgniter\\Router\\RouteCollection\:\:add\(\) expects array\|\(Closure\(mixed \.\.\.\)\: \(CodeIgniter\\HTTP\\ResponseInterface\|string\|void\)\)\|string, Closure\(mixed\)\: CodeIgniter\\HTTP\\ResponseInterface given\.$#' count: 1 path: ../../tests/system/CodeIgniterTest.php - - message: '#^Parameter \#2 \$to of method CodeIgniter\\Router\\RouteCollection\:\:add\(\) expects array\|\(Closure\(mixed \.\.\.\)\: \(CodeIgniter\\HTTP\\ResponseInterface\|string\|void\)\)\|string, Closure\(mixed\)\: CodeIgniter\\HTTP\\ResponseInterface given\.$#' + message: '#^Parameter \#2 \$to of method CodeIgniter\\Router\\RouteCollection\:\:add\(\) expects array\|\(Closure\(mixed \.\.\.\)\: \(CodeIgniter\\HTTP\\ResponseInterface\|string\|void\)\)\|string, Closure\(mixed\)\: \(CodeIgniter\\HTTP\\DownloadResponse\|null\) given\.$#' count: 1 path: ../../tests/system/CodeIgniterTest.php @@ -207,11 +207,6 @@ parameters: count: 1 path: ../../tests/system/RESTful/ResourceControllerTest.php - - - message: '#^Parameter \#1 \$config of class CodeIgniter\\Test\\Mock\\MockSecurity constructor expects Config\\Security, CodeIgniter\\Config\\BaseConfig\|null given\.$#' - count: 1 - path: ../../tests/system/Security/SecurityCSRFSessionRandomizeTokenTest.php - - message: '#^Parameter \#1 \$request of method CodeIgniter\\CodeIgniter\:\:setRequest\(\) expects CodeIgniter\\HTTP\\CLIRequest\|CodeIgniter\\HTTP\\IncomingRequest, CodeIgniter\\HTTP\\Request given\.$#' count: 1 diff --git a/utils/phpstan-baseline/codeigniter.superglobalAccessAssign.neon b/utils/phpstan-baseline/codeigniter.superglobalAccessAssign.neon index 6a5f6dccbf23..71e76f0cfe41 100644 --- a/utils/phpstan-baseline/codeigniter.superglobalAccessAssign.neon +++ b/utils/phpstan-baseline/codeigniter.superglobalAccessAssign.neon @@ -338,12 +338,12 @@ parameters: path: ../../tests/system/HTTP/IncomingRequestTest.php - - message: '#^Assigning ''fr\-FR; q\=1\.0, en; q\=0\.5'' directly on offset ''HTTP_ACCEPT_LANGUAGE'' of \$_SERVER is discouraged\.$#' + message: '#^Assigning ''fr; q\=1\.0, en; q\=0\.5'' directly on offset ''HTTP_ACCEPT_LANGUAGE'' of \$_SERVER is discouraged\.$#' count: 1 path: ../../tests/system/HTTP/IncomingRequestTest.php - - message: '#^Assigning ''fr; q\=1\.0, en; q\=0\.5'' directly on offset ''HTTP_ACCEPT_LANGUAGE'' of \$_SERVER is discouraged\.$#' + message: '#^Assigning ''fr\-FR; q\=1\.0, en; q\=0\.5'' directly on offset ''HTTP_ACCEPT_LANGUAGE'' of \$_SERVER is discouraged\.$#' count: 1 path: ../../tests/system/HTTP/IncomingRequestTest.php diff --git a/utils/phpstan-baseline/empty.notAllowed.neon b/utils/phpstan-baseline/empty.notAllowed.neon index 65bd911eca30..b278eddd203a 100644 --- a/utils/phpstan-baseline/empty.notAllowed.neon +++ b/utils/phpstan-baseline/empty.notAllowed.neon @@ -1,4 +1,4 @@ -# total 228 errors +# total 223 errors parameters: ignoreErrors: @@ -292,24 +292,9 @@ parameters: count: 2 path: ../../system/Router/Router.php - - - message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#' - count: 2 - path: ../../system/Session/Handlers/DatabaseHandler.php - - - - message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#' - count: 1 - path: ../../system/Session/Handlers/FileHandler.php - - message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#' count: 1 - path: ../../system/Session/Handlers/MemcachedHandler.php - - - - message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#' - count: 2 path: ../../system/Session/Handlers/RedisHandler.php - diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 5d96dc562b91..6ef559364df8 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 2760 errors +# total 2736 errors includes: - argument.type.neon diff --git a/utils/phpstan-baseline/method.childReturnType.neon b/utils/phpstan-baseline/method.childReturnType.neon index adf2f2999aaf..aa9a7229d277 100644 --- a/utils/phpstan-baseline/method.childReturnType.neon +++ b/utils/phpstan-baseline/method.childReturnType.neon @@ -93,22 +93,22 @@ parameters: path: ../../system/Database/SQLite3/PreparedQuery.php - - message: '#^Return type \(CodeIgniter\\HTTP\\DownloadResponse\) of method CodeIgniter\\HTTP\\DownloadResponse\:\:sendBody\(\) should be covariant with return type \(\$this\(CodeIgniter\\HTTP\\Response\)\) of method CodeIgniter\\HTTP\\Response\:\:sendBody\(\)$#' + message: '#^Return type \(CodeIgniter\\HTTP\\DownloadResponse\) of method CodeIgniter\\HTTP\\DownloadResponse\:\:sendBody\(\) should be covariant with return type \(\$this\(CodeIgniter\\HTTP\\ResponseInterface\)\) of method CodeIgniter\\HTTP\\ResponseInterface\:\:sendBody\(\)$#' count: 1 path: ../../system/HTTP/DownloadResponse.php - - message: '#^Return type \(CodeIgniter\\HTTP\\DownloadResponse\) of method CodeIgniter\\HTTP\\DownloadResponse\:\:sendBody\(\) should be covariant with return type \(\$this\(CodeIgniter\\HTTP\\ResponseInterface\)\) of method CodeIgniter\\HTTP\\ResponseInterface\:\:sendBody\(\)$#' + message: '#^Return type \(CodeIgniter\\HTTP\\DownloadResponse\) of method CodeIgniter\\HTTP\\DownloadResponse\:\:sendBody\(\) should be covariant with return type \(\$this\(CodeIgniter\\HTTP\\Response\)\) of method CodeIgniter\\HTTP\\Response\:\:sendBody\(\)$#' count: 1 path: ../../system/HTTP/DownloadResponse.php - - message: '#^Return type \(CodeIgniter\\HTTP\\ResponseInterface\) of method CodeIgniter\\HTTP\\DownloadResponse\:\:setContentType\(\) should be covariant with return type \(\$this\(CodeIgniter\\HTTP\\Response\)\) of method CodeIgniter\\HTTP\\Response\:\:setContentType\(\)$#' + message: '#^Return type \(CodeIgniter\\HTTP\\ResponseInterface\) of method CodeIgniter\\HTTP\\DownloadResponse\:\:setContentType\(\) should be covariant with return type \(\$this\(CodeIgniter\\HTTP\\ResponseInterface\)\) of method CodeIgniter\\HTTP\\ResponseInterface\:\:setContentType\(\)$#' count: 1 path: ../../system/HTTP/DownloadResponse.php - - message: '#^Return type \(CodeIgniter\\HTTP\\ResponseInterface\) of method CodeIgniter\\HTTP\\DownloadResponse\:\:setContentType\(\) should be covariant with return type \(\$this\(CodeIgniter\\HTTP\\ResponseInterface\)\) of method CodeIgniter\\HTTP\\ResponseInterface\:\:setContentType\(\)$#' + message: '#^Return type \(CodeIgniter\\HTTP\\ResponseInterface\) of method CodeIgniter\\HTTP\\DownloadResponse\:\:setContentType\(\) should be covariant with return type \(\$this\(CodeIgniter\\HTTP\\Response\)\) of method CodeIgniter\\HTTP\\Response\:\:setContentType\(\)$#' count: 1 path: ../../system/HTTP/DownloadResponse.php diff --git a/utils/phpstan-baseline/method.notFound.neon b/utils/phpstan-baseline/method.notFound.neon index 8bc0b8ae54c0..1018f0fc8119 100644 --- a/utils/phpstan-baseline/method.notFound.neon +++ b/utils/phpstan-baseline/method.notFound.neon @@ -58,12 +58,12 @@ parameters: path: ../../tests/system/HTTP/IncomingRequestTest.php - - message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getFile\(\)\.$#' + message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getFileMultiple\(\)\.$#' count: 1 path: ../../tests/system/HTTP/IncomingRequestTest.php - - message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getFileMultiple\(\)\.$#' + message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getFile\(\)\.$#' count: 1 path: ../../tests/system/HTTP/IncomingRequestTest.php @@ -73,13 +73,13 @@ parameters: path: ../../tests/system/HTTP/IncomingRequestTest.php - - message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getGet\(\)\.$#' - count: 2 + message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getGetPost\(\)\.$#' + count: 5 path: ../../tests/system/HTTP/IncomingRequestTest.php - - message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getGetPost\(\)\.$#' - count: 5 + message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getGet\(\)\.$#' + count: 2 path: ../../tests/system/HTTP/IncomingRequestTest.php - @@ -92,24 +92,19 @@ parameters: count: 9 path: ../../tests/system/HTTP/IncomingRequestTest.php - - - message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getPost\(\)\.$#' - count: 2 - path: ../../tests/system/HTTP/IncomingRequestTest.php - - message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getPostGet\(\)\.$#' count: 5 path: ../../tests/system/HTTP/IncomingRequestTest.php - - message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getVar\(\)\.$#' + message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getPost\(\)\.$#' count: 2 path: ../../tests/system/HTTP/IncomingRequestTest.php - - message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:is\(\)\.$#' - count: 5 + message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getVar\(\)\.$#' + count: 2 path: ../../tests/system/HTTP/IncomingRequestTest.php - @@ -127,6 +122,11 @@ parameters: count: 3 path: ../../tests/system/HTTP/IncomingRequestTest.php + - + message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:is\(\)\.$#' + count: 5 + path: ../../tests/system/HTTP/IncomingRequestTest.php + - message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:negotiate\(\)\.$#' count: 5 diff --git a/utils/phpstan-baseline/missingType.callable.neon b/utils/phpstan-baseline/missingType.callable.neon index 9429a25441eb..5d0d90d58d56 100644 --- a/utils/phpstan-baseline/missingType.callable.neon +++ b/utils/phpstan-baseline/missingType.callable.neon @@ -3,22 +3,22 @@ parameters: ignoreErrors: - - message: '#^Class CodeIgniter\\Model has PHPDoc tag @method for method when\(\) parameter \#2 \$callback with no signature specified for callable\.$#' + message: '#^Class CodeIgniter\\Model has PHPDoc tag @method for method whenNot\(\) parameter \#2 \$callback with no signature specified for callable\.$#' count: 1 path: ../../system/Model.php - - message: '#^Class CodeIgniter\\Model has PHPDoc tag @method for method when\(\) parameter \#3 \$defaultCallback with no signature specified for callable\.$#' + message: '#^Class CodeIgniter\\Model has PHPDoc tag @method for method whenNot\(\) parameter \#3 \$defaultCallback with no signature specified for callable\.$#' count: 1 path: ../../system/Model.php - - message: '#^Class CodeIgniter\\Model has PHPDoc tag @method for method whenNot\(\) parameter \#2 \$callback with no signature specified for callable\.$#' + message: '#^Class CodeIgniter\\Model has PHPDoc tag @method for method when\(\) parameter \#2 \$callback with no signature specified for callable\.$#' count: 1 path: ../../system/Model.php - - message: '#^Class CodeIgniter\\Model has PHPDoc tag @method for method whenNot\(\) parameter \#3 \$defaultCallback with no signature specified for callable\.$#' + message: '#^Class CodeIgniter\\Model has PHPDoc tag @method for method when\(\) parameter \#3 \$defaultCallback with no signature specified for callable\.$#' count: 1 path: ../../system/Model.php diff --git a/utils/phpstan-baseline/missingType.iterableValue.neon b/utils/phpstan-baseline/missingType.iterableValue.neon index 5f36d7f3b445..d5ddd5db6cf8 100644 --- a/utils/phpstan-baseline/missingType.iterableValue.neon +++ b/utils/phpstan-baseline/missingType.iterableValue.neon @@ -1,4 +1,4 @@ -# total 1370 errors +# total 1367 errors parameters: ignoreErrors: @@ -33,22 +33,22 @@ parameters: path: ../../system/BaseModel.php - - message: '#^Method CodeIgniter\\BaseModel\:\:doFind\(\) has parameter \$id with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\BaseModel\:\:doFindAll\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/BaseModel.php - - message: '#^Method CodeIgniter\\BaseModel\:\:doFind\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\BaseModel\:\:doFindColumn\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/BaseModel.php - - message: '#^Method CodeIgniter\\BaseModel\:\:doFindAll\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\BaseModel\:\:doFind\(\) has parameter \$id with no value type specified in iterable type array\.$#' count: 1 path: ../../system/BaseModel.php - - message: '#^Method CodeIgniter\\BaseModel\:\:doFindColumn\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\BaseModel\:\:doFind\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/BaseModel.php @@ -62,18 +62,13 @@ parameters: count: 1 path: ../../system/BaseModel.php - - - message: '#^Method CodeIgniter\\BaseModel\:\:doProtectFields\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/BaseModel.php - - message: '#^Method CodeIgniter\\BaseModel\:\:doProtectFieldsForInsert\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/BaseModel.php - - message: '#^Method CodeIgniter\\BaseModel\:\:doUpdate\(\) has parameter \$id with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\BaseModel\:\:doProtectFields\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/BaseModel.php @@ -83,7 +78,7 @@ parameters: path: ../../system/BaseModel.php - - message: '#^Method CodeIgniter\\BaseModel\:\:find\(\) has parameter \$id with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\BaseModel\:\:doUpdate\(\) has parameter \$id with no value type specified in iterable type array\.$#' count: 1 path: ../../system/BaseModel.php @@ -97,6 +92,11 @@ parameters: count: 1 path: ../../system/BaseModel.php + - + message: '#^Method CodeIgniter\\BaseModel\:\:find\(\) has parameter \$id with no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/BaseModel.php + - message: '#^Method CodeIgniter\\BaseModel\:\:first\(\) return type has no value type specified in iterable type array\.$#' count: 1 @@ -187,11 +187,6 @@ parameters: count: 1 path: ../../system/CLI/CLI.php - - - message: '#^Method CodeIgniter\\CLI\\CLI\:\:prompt\(\) has parameter \$validation with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/CLI/CLI.php - - message: '#^Method CodeIgniter\\CLI\\CLI\:\:promptByKey\(\) has parameter \$options with no value type specified in iterable type array\.$#' count: 1 @@ -217,6 +212,11 @@ parameters: count: 1 path: ../../system/CLI/CLI.php + - + message: '#^Method CodeIgniter\\CLI\\CLI\:\:prompt\(\) has parameter \$validation with no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/CLI/CLI.php + - message: '#^Method CodeIgniter\\CLI\\CLI\:\:table\(\) has parameter \$tbody with no value type specified in iterable type array\.$#' count: 1 @@ -518,27 +518,27 @@ parameters: path: ../../system/Controller.php - - message: '#^Method CodeIgniter\\Controller\:\:validate\(\) has parameter \$messages with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Controller\:\:validateData\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Controller.php - - message: '#^Method CodeIgniter\\Controller\:\:validate\(\) has parameter \$rules with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Controller\:\:validateData\(\) has parameter \$messages with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Controller.php - - message: '#^Method CodeIgniter\\Controller\:\:validateData\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Controller\:\:validateData\(\) has parameter \$rules with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Controller.php - - message: '#^Method CodeIgniter\\Controller\:\:validateData\(\) has parameter \$messages with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Controller\:\:validate\(\) has parameter \$messages with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Controller.php - - message: '#^Method CodeIgniter\\Controller\:\:validateData\(\) has parameter \$rules with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Controller\:\:validate\(\) has parameter \$rules with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Controller.php @@ -598,17 +598,17 @@ parameters: path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:delete\(\) has parameter \$where with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:deleteBatch\(\) has parameter \$constraints with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:deleteBatch\(\) has parameter \$constraints with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:deleteBatch\(\) has parameter \$set with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:deleteBatch\(\) has parameter \$set with no value type specified in iterable type array\.$#' + 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 @@ -662,11 +662,6 @@ parameters: count: 1 path: ../../system/Database/BaseBuilder.php - - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:having\(\) has parameter \$key with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:havingIn\(\) has parameter \$values with no value type specified in iterable type array\.$#' count: 1 @@ -683,7 +678,7 @@ parameters: path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:insert\(\) has parameter \$set with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:having\(\) has parameter \$key with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php @@ -692,6 +687,11 @@ parameters: count: 1 path: ../../system/Database/BaseBuilder.php + - + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:insert\(\) has parameter \$set with no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Database/BaseBuilder.php + - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:like\(\) has parameter \$field with no value type specified in iterable type array\.$#' count: 1 @@ -722,11 +722,6 @@ parameters: count: 1 path: ../../system/Database/BaseBuilder.php - - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:orHaving\(\) has parameter \$key with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:orHavingIn\(\) has parameter \$values with no value type specified in iterable type array\.$#' count: 1 @@ -743,22 +738,22 @@ parameters: path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:orLike\(\) has parameter \$field with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:orHaving\(\) has parameter \$key with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:orNotHavingLike\(\) has parameter \$field with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:orLike\(\) has parameter \$field with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:orNotLike\(\) has parameter \$field with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:orNotHavingLike\(\) has parameter \$field with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:orWhere\(\) has parameter \$key with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:orNotLike\(\) has parameter \$field with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php @@ -773,17 +768,17 @@ parameters: path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:replace\(\) has parameter \$set with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:orWhere\(\) has parameter \$key with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:resetRun\(\) has parameter \$qbResetItems with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:replace\(\) has parameter \$set with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:set\(\) has parameter \$key with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:resetRun\(\) has parameter \$qbResetItems with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php @@ -803,37 +798,37 @@ parameters: path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:trackAliases\(\) has parameter \$table with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:set\(\) has parameter \$key with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:update\(\) has parameter \$set with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:trackAliases\(\) has parameter \$table with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:update\(\) has parameter \$where with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:updateBatch\(\) has parameter \$constraints with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:updateBatch\(\) has parameter \$constraints with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:updateBatch\(\) has parameter \$set with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:updateBatch\(\) has parameter \$set with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:updateFields\(\) has parameter \$ignore with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:updateFields\(\) has parameter \$ignore with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:update\(\) has parameter \$set with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:upsert\(\) has parameter \$set with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:update\(\) has parameter \$where with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php @@ -843,7 +838,7 @@ parameters: path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:where\(\) has parameter \$key with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:upsert\(\) has parameter \$set with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseBuilder.php @@ -862,6 +857,11 @@ parameters: count: 1 path: ../../system/Database/BaseBuilder.php + - + message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:where\(\) has parameter \$key with no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/Database/BaseBuilder.php + - message: '#^Property CodeIgniter\\Database\\BaseBuilder\:\:\$QBFrom type has no value type specified in iterable type array\.$#' count: 1 @@ -958,22 +958,22 @@ parameters: path: ../../system/Database/BaseConnection.php - - message: '#^Method CodeIgniter\\Database\\BaseConnection\:\:escape\(\) has parameter \$str with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseConnection\:\:escapeIdentifiers\(\) has parameter \$item 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\.$#' + message: '#^Method CodeIgniter\\Database\\BaseConnection\:\:escapeIdentifiers\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseConnection.php - - message: '#^Method CodeIgniter\\Database\\BaseConnection\:\:escapeIdentifiers\(\) has parameter \$item with no value type specified in iterable type array\.$#' + 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\:\:escapeIdentifiers\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseConnection\:\:escape\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseConnection.php @@ -1098,22 +1098,22 @@ parameters: path: ../../system/Database/BaseResult.php - - message: '#^Method CodeIgniter\\Database\\BaseResult\:\:getResult\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseResult\:\:getResultArray\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseResult.php - - message: '#^Method CodeIgniter\\Database\\BaseResult\:\:getResultArray\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseResult\:\:getResult\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseResult.php - - message: '#^Method CodeIgniter\\Database\\BaseResult\:\:getRow\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseResult\:\:getRowArray\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseResult.php - - message: '#^Method CodeIgniter\\Database\\BaseResult\:\:getRowArray\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\BaseResult\:\:getRow\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/BaseResult.php @@ -1293,12 +1293,12 @@ parameters: path: ../../system/Database/Forge.php - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_createTable\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\Forge\:\:_createTableAttributes\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/Forge.php - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_createTableAttributes\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\Forge\:\:_createTable\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/Forge.php @@ -1713,27 +1713,27 @@ parameters: path: ../../system/Database/ResultInterface.php - - message: '#^Method CodeIgniter\\Database\\ResultInterface\:\:getResult\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\ResultInterface\:\:getResultArray\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/ResultInterface.php - - message: '#^Method CodeIgniter\\Database\\ResultInterface\:\:getResultArray\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\ResultInterface\:\:getResultObject\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/ResultInterface.php - - message: '#^Method CodeIgniter\\Database\\ResultInterface\:\:getResultObject\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\ResultInterface\:\:getResult\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/ResultInterface.php - - message: '#^Method CodeIgniter\\Database\\ResultInterface\:\:getRow\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\ResultInterface\:\:getRowArray\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/ResultInterface.php - - message: '#^Method CodeIgniter\\Database\\ResultInterface\:\:getRowArray\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Database\\ResultInterface\:\:getRow\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Database/ResultInterface.php @@ -2068,22 +2068,22 @@ parameters: path: ../../system/Debug/Toolbar.php - - message: '#^Method CodeIgniter\\Debug\\Toolbar\:\:renderTimeline\(\) has parameter \$collectors with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Debug\\Toolbar\:\:renderTimelineRecursive\(\) has parameter \$rows with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Debug/Toolbar.php - - message: '#^Method CodeIgniter\\Debug\\Toolbar\:\:renderTimeline\(\) has parameter \$styles with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Debug\\Toolbar\:\:renderTimelineRecursive\(\) has parameter \$styles with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Debug/Toolbar.php - - message: '#^Method CodeIgniter\\Debug\\Toolbar\:\:renderTimelineRecursive\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Debug\\Toolbar\:\:renderTimeline\(\) has parameter \$collectors with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Debug/Toolbar.php - - message: '#^Method CodeIgniter\\Debug\\Toolbar\:\:renderTimelineRecursive\(\) has parameter \$styles with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Debug\\Toolbar\:\:renderTimeline\(\) has parameter \$styles with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Debug/Toolbar.php @@ -2613,32 +2613,32 @@ parameters: path: ../../system/HTTP/CLIRequest.php - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGet\(\) has parameter \$flags with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGetPost\(\) has parameter \$flags with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/CLIRequest.php - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGet\(\) has parameter \$index with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGetPost\(\) has parameter \$index with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/CLIRequest.php - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGet\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGetPost\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/CLIRequest.php - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGetPost\(\) has parameter \$flags with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGet\(\) has parameter \$flags with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/CLIRequest.php - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGetPost\(\) has parameter \$index with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGet\(\) has parameter \$index with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/CLIRequest.php - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGetPost\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getGet\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/CLIRequest.php @@ -2648,32 +2648,32 @@ parameters: path: ../../system/HTTP/CLIRequest.php - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPost\(\) has parameter \$flags with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPostGet\(\) has parameter \$flags with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/CLIRequest.php - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPost\(\) has parameter \$index with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPostGet\(\) has parameter \$index with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/CLIRequest.php - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPost\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPostGet\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/CLIRequest.php - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPostGet\(\) has parameter \$flags with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPost\(\) has parameter \$flags with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/CLIRequest.php - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPostGet\(\) has parameter \$index with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPost\(\) has parameter \$index with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/CLIRequest.php - - message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPostGet\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\CLIRequest\:\:getPost\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/CLIRequest.php @@ -3073,32 +3073,32 @@ parameters: path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGet\(\) has parameter \$flags with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGetPost\(\) has parameter \$flags with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGet\(\) has parameter \$index with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGetPost\(\) has parameter \$index with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGet\(\) return type has no value type specified in iterable type array\.$#' + 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\:\:getGetPost\(\) has parameter \$flags with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGet\(\) has parameter \$flags with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGetPost\(\) has parameter \$index with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGet\(\) has parameter \$index with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGetPost\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getGet\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/IncomingRequest.php @@ -3128,52 +3128,52 @@ parameters: path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPost\(\) has parameter \$flags with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPostGet\(\) has parameter \$flags with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPost\(\) has parameter \$index with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPostGet\(\) has parameter \$index with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPost\(\) return type has no value type specified in iterable type array\.$#' + 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\:\:getPostGet\(\) has parameter \$flags with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPost\(\) has parameter \$flags with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPostGet\(\) has parameter \$index with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPost\(\) has parameter \$index with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getPostGet\(\) return type has no value type specified in iterable type array\.$#' + 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\:\:getRawInput\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getRawInputVar\(\) has parameter \$flags with 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\.$#' + message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getRawInputVar\(\) has parameter \$index with no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/IncomingRequest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getRawInputVar\(\) has parameter \$index with no value type specified in iterable type array\.$#' + 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\:\:getRawInputVar\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\HTTP\\IncomingRequest\:\:getRawInput\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/HTTP/IncomingRequest.php @@ -3257,11 +3257,6 @@ parameters: count: 1 path: ../../system/HTTP/Negotiate.php - - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:match\(\) has parameter \$acceptable with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/HTTP/Negotiate.php - - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:matchLocales\(\) has parameter \$acceptable with no value type specified in iterable type array\.$#' count: 1 @@ -3292,6 +3287,11 @@ parameters: count: 1 path: ../../system/HTTP/Negotiate.php + - + message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:match\(\) has parameter \$acceptable with no value type specified in iterable type array\.$#' + count: 1 + path: ../../system/HTTP/Negotiate.php + - message: '#^Method CodeIgniter\\HTTP\\Negotiate\:\:media\(\) has parameter \$supported with no value type specified in iterable type array\.$#' count: 1 @@ -4038,12 +4038,12 @@ parameters: path: ../../system/Model.php - - message: '#^Method CodeIgniter\\Model\:\:doUpdate\(\) has parameter \$id with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Model\:\:doUpdateBatch\(\) has parameter \$set with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Model.php - - message: '#^Method CodeIgniter\\Model\:\:doUpdateBatch\(\) has parameter \$set with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Model\:\:doUpdate\(\) has parameter \$id with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Model.php @@ -4183,17 +4183,17 @@ parameters: path: ../../system/Router/AutoRouterInterface.php - - message: '#^Method CodeIgniter\\Router\\RouteCollection\:\:add\(\) has parameter \$options with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Router\\RouteCollection\:\:addPlaceholder\(\) has parameter \$placeholder with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Router/RouteCollection.php - - message: '#^Method CodeIgniter\\Router\\RouteCollection\:\:add\(\) has parameter \$to with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Router\\RouteCollection\:\:add\(\) has parameter \$options with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Router/RouteCollection.php - - message: '#^Method CodeIgniter\\Router\\RouteCollection\:\:addPlaceholder\(\) has parameter \$placeholder with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Router\\RouteCollection\:\:add\(\) has parameter \$to with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Router/RouteCollection.php @@ -4238,17 +4238,17 @@ parameters: path: ../../system/Router/RouteCollection.php - - message: '#^Method CodeIgniter\\Router\\RouteCollection\:\:get\(\) has parameter \$options with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Router\\RouteCollection\:\:getRoutes\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Router/RouteCollection.php - - message: '#^Method CodeIgniter\\Router\\RouteCollection\:\:get\(\) has parameter \$to with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Router\\RouteCollection\:\:get\(\) has parameter \$options with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Router/RouteCollection.php - - message: '#^Method CodeIgniter\\Router\\RouteCollection\:\:getRoutes\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Router\\RouteCollection\:\:get\(\) has parameter \$to with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Router/RouteCollection.php @@ -4378,17 +4378,17 @@ parameters: path: ../../system/Router/RouteCollection.php - - message: '#^Method CodeIgniter\\Router\\RouteCollectionInterface\:\:add\(\) has parameter \$options with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Router\\RouteCollectionInterface\:\:addPlaceholder\(\) has parameter \$placeholder with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Router/RouteCollectionInterface.php - - message: '#^Method CodeIgniter\\Router\\RouteCollectionInterface\:\:add\(\) has parameter \$to with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Router\\RouteCollectionInterface\:\:add\(\) has parameter \$options with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Router/RouteCollectionInterface.php - - message: '#^Method CodeIgniter\\Router\\RouteCollectionInterface\:\:addPlaceholder\(\) has parameter \$placeholder with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Router\\RouteCollectionInterface\:\:add\(\) has parameter \$to with no value type specified in iterable type array\.$#' count: 1 path: ../../system/Router/RouteCollectionInterface.php @@ -4398,12 +4398,12 @@ parameters: path: ../../system/Router/RouteCollectionInterface.php - - message: '#^Method CodeIgniter\\Router\\Router\:\:getMatchedRoute\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Router\\Router\:\:getMatchedRouteOptions\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Router/Router.php - - message: '#^Method CodeIgniter\\Router\\Router\:\:getMatchedRouteOptions\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Router\\Router\:\:getMatchedRoute\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Router/Router.php @@ -4462,11 +4462,6 @@ parameters: count: 1 path: ../../system/Router/RouterInterface.php - - - message: '#^Property CodeIgniter\\Session\\Handlers\\BaseHandler\:\:\$savePath type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Session/Handlers/BaseHandler.php - - message: '#^Method CodeIgniter\\Superglobals\:\:__construct\(\) has parameter \$get with no value type specified in iterable type array\.$#' count: 1 @@ -4518,12 +4513,12 @@ parameters: path: ../../system/Test/Fabricator.php - - message: '#^Method CodeIgniter\\Test\\Fabricator\:\:create\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Test\\Fabricator\:\:createMock\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Test/Fabricator.php - - message: '#^Method CodeIgniter\\Test\\Fabricator\:\:createMock\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Test\\Fabricator\:\:create\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Test/Fabricator.php @@ -4538,12 +4533,12 @@ parameters: path: ../../system/Test/Fabricator.php - - message: '#^Method CodeIgniter\\Test\\Fabricator\:\:make\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Test\\Fabricator\:\:makeArray\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Test/Fabricator.php - - message: '#^Method CodeIgniter\\Test\\Fabricator\:\:makeArray\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Test\\Fabricator\:\:make\(\) return type has no value type specified in iterable type array\.$#' count: 1 path: ../../system/Test/Fabricator.php @@ -5668,12 +5663,12 @@ parameters: path: ../../tests/system/HTTP/ResponseCookieTest.php - - message: '#^Method CodeIgniter\\HTTP\\ResponseTest\:\:provideRedirect\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\HTTP\\ResponseTest\:\:provideRedirectWithIIS\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/HTTP/ResponseTest.php - - message: '#^Method CodeIgniter\\HTTP\\ResponseTest\:\:provideRedirectWithIIS\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\HTTP\\ResponseTest\:\:provideRedirect\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/HTTP/ResponseTest.php @@ -5912,11 +5907,6 @@ parameters: count: 1 path: ../../tests/system/Helpers/URLHelper/CurrentUrlTest.php - - - message: '#^Method CodeIgniter\\Helpers\\URLHelper\\MiscUrlTest\:\:provideAnchor\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/Helpers/URLHelper/MiscUrlTest.php - - message: '#^Method CodeIgniter\\Helpers\\URLHelper\\MiscUrlTest\:\:provideAnchorExamples\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 @@ -5937,6 +5927,11 @@ parameters: count: 1 path: ../../tests/system/Helpers/URLHelper/MiscUrlTest.php + - + message: '#^Method CodeIgniter\\Helpers\\URLHelper\\MiscUrlTest\:\:provideAnchor\(\) return type has no value type specified in iterable type iterable\.$#' + count: 1 + path: ../../tests/system/Helpers/URLHelper/MiscUrlTest.php + - message: '#^Method CodeIgniter\\Helpers\\URLHelper\\MiscUrlTest\:\:provideAutoLinkEmail\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 @@ -5973,12 +5968,12 @@ parameters: path: ../../tests/system/Helpers/URLHelper/MiscUrlTest.php - - message: '#^Method CodeIgniter\\Helpers\\URLHelper\\MiscUrlTest\:\:provideUrlTo\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Helpers\\URLHelper\\MiscUrlTest\:\:provideUrlToThrowsOnEmptyOrMissingRoute\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Helpers/URLHelper/MiscUrlTest.php - - message: '#^Method CodeIgniter\\Helpers\\URLHelper\\MiscUrlTest\:\:provideUrlToThrowsOnEmptyOrMissingRoute\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Helpers\\URLHelper\\MiscUrlTest\:\:provideUrlTo\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Helpers/URLHelper/MiscUrlTest.php @@ -6167,16 +6162,6 @@ parameters: count: 1 path: ../../tests/system/Router/RouterTest.php - - - message: '#^Method CodeIgniter\\Session\\Handlers\\Database\\RedisHandlerTest\:\:provideSetSavePath\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/Session/Handlers/Database/RedisHandlerTest.php - - - - message: '#^Method CodeIgniter\\Session\\Handlers\\Database\\RedisHandlerTest\:\:testSetSavePath\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - count: 1 - path: ../../tests/system/Session/Handlers/Database/RedisHandlerTest.php - - message: '#^Method CodeIgniter\\Test\\ControllerTestTraitTest\:\:execute\(\) has parameter \$params with no value type specified in iterable type array\.$#' count: 1 @@ -6333,22 +6318,22 @@ parameters: path: ../../tests/system/Validation/FormatRulesTest.php - - message: '#^Method CodeIgniter\\Validation\\FormatRulesTest\:\:provideAlpha\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\FormatRulesTest\:\:provideAlphaDash\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/FormatRulesTest.php - - message: '#^Method CodeIgniter\\Validation\\FormatRulesTest\:\:provideAlphaDash\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\FormatRulesTest\:\:provideAlphaNumericPunct\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/FormatRulesTest.php - - message: '#^Method CodeIgniter\\Validation\\FormatRulesTest\:\:provideAlphaNumericPunct\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\FormatRulesTest\:\:provideAlphaSpace\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/FormatRulesTest.php - - message: '#^Method CodeIgniter\\Validation\\FormatRulesTest\:\:provideAlphaSpace\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\FormatRulesTest\:\:provideAlpha\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/FormatRulesTest.php @@ -6383,12 +6368,12 @@ parameters: path: ../../tests/system/Validation/FormatRulesTest.php - - message: '#^Method CodeIgniter\\Validation\\FormatRulesTest\:\:provideNatural\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\FormatRulesTest\:\:provideNaturalNoZero\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/FormatRulesTest.php - - message: '#^Method CodeIgniter\\Validation\\FormatRulesTest\:\:provideNaturalNoZero\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\FormatRulesTest\:\:provideNatural\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/FormatRulesTest.php @@ -6453,12 +6438,12 @@ parameters: path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideGreaterThan\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideGreaterThanEqual\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideGreaterThanEqual\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideGreaterThan\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php @@ -6473,22 +6458,22 @@ parameters: path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideLessThan\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideLessThanEqual\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideLessThanEqual\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideLessThan\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideMatches\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideMatchesNestedCases\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideMatchesNestedCases\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideMatches\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php @@ -6503,47 +6488,47 @@ parameters: path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideRequired\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideRequiredWithAndOtherRuleWithValueZero\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideRequiredWith\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideRequiredWithAndOtherRules\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideRequiredWithAndOtherRuleWithValueZero\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideRequiredWith\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideRequiredWithAndOtherRules\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideRequiredWithoutMultipleWithoutFields\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideRequiredWithout\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideRequiredWithoutMultiple\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideRequiredWithoutMultiple\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideRequiredWithout\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideRequiredWithoutMultipleWithoutFields\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:provideRequired\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testDiffers\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testDiffersNested\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testDiffersNested\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testDiffers\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php @@ -6573,12 +6558,12 @@ parameters: path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testMatches\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testMatchesNested\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testMatchesNested\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testMatches\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php @@ -6593,22 +6578,22 @@ parameters: path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testRequired\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testRequiredWithAndOtherRuleWithValueZero\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testRequiredWithAndOtherRuleWithValueZero\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testRequiredWithAndOtherRules\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testRequiredWithAndOtherRules\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testRequiredWithoutMultipleWithoutFields\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php - - message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testRequiredWithoutMultipleWithoutFields\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method CodeIgniter\\Validation\\RulesTest\:\:testRequired\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 path: ../../tests/system/Validation/RulesTest.php diff --git a/utils/phpstan-baseline/missingType.parameter.neon b/utils/phpstan-baseline/missingType.parameter.neon index ec340a803f7c..3512e2769b9f 100644 --- a/utils/phpstan-baseline/missingType.parameter.neon +++ b/utils/phpstan-baseline/missingType.parameter.neon @@ -1,4 +1,4 @@ -# total 36 errors +# total 31 errors parameters: ignoreErrors: @@ -156,28 +156,3 @@ parameters: message: '#^Method CodeIgniter\\Security\\SecurityCSRFSessionTest\:\:createSession\(\) has parameter \$options with no type specified\.$#' count: 1 path: ../../tests/system/Security/SecurityCSRFSessionTest.php - - - - message: '#^Method CodeIgniter\\Session\\Handlers\\Database\\AbstractHandlerTestCase\:\:getInstance\(\) has parameter \$options with no type specified\.$#' - count: 1 - path: ../../tests/system/Session/Handlers/Database/AbstractHandlerTestCase.php - - - - message: '#^Method CodeIgniter\\Session\\Handlers\\Database\\MySQLiHandlerTest\:\:getInstance\(\) has parameter \$options with no type specified\.$#' - count: 1 - path: ../../tests/system/Session/Handlers/Database/MySQLiHandlerTest.php - - - - message: '#^Method CodeIgniter\\Session\\Handlers\\Database\\PostgreHandlerTest\:\:getInstance\(\) has parameter \$options with no type specified\.$#' - count: 1 - path: ../../tests/system/Session/Handlers/Database/PostgreHandlerTest.php - - - - message: '#^Method CodeIgniter\\Session\\Handlers\\Database\\RedisHandlerTest\:\:getInstance\(\) has parameter \$options with no type specified\.$#' - count: 1 - path: ../../tests/system/Session/Handlers/Database/RedisHandlerTest.php - - - - message: '#^Method CodeIgniter\\Session\\SessionTest\:\:getInstance\(\) has parameter \$options with no type specified\.$#' - count: 1 - path: ../../tests/system/Session/SessionTest.php diff --git a/utils/phpstan-baseline/missingType.property.neon b/utils/phpstan-baseline/missingType.property.neon index 48a8f1e1f48d..81238e492ae6 100644 --- a/utils/phpstan-baseline/missingType.property.neon +++ b/utils/phpstan-baseline/missingType.property.neon @@ -1,4 +1,4 @@ -# total 103 errors +# total 102 errors parameters: ignoreErrors: @@ -32,11 +32,6 @@ parameters: count: 1 path: ../../system/Database/Postgre/Connection.php - - - message: '#^Property CodeIgniter\\Session\\Handlers\\ArrayHandler\:\:\$cache has no type specified\.$#' - count: 1 - path: ../../system/Session/Handlers/ArrayHandler.php - - message: '#^Property CodeIgniter\\Config\\Factory@anonymous/tests/system/Config/FactoriesTest\.php\:89\:\:\$widgets has no type specified\.$#' count: 1 diff --git a/utils/phpstan-baseline/property.notFound.neon b/utils/phpstan-baseline/property.notFound.neon index 3d66f73b98bc..c522781b4f09 100644 --- a/utils/phpstan-baseline/property.notFound.neon +++ b/utils/phpstan-baseline/property.notFound.neon @@ -1,4 +1,4 @@ -# total 51 errors +# total 45 errors parameters: ignoreErrors: @@ -121,18 +121,3 @@ parameters: message: '#^Access to an undefined property CodeIgniter\\I18n\\Time\:\:\$weekOfWeek\.$#' count: 1 path: ../../tests/system/I18n/TimeTest.php - - - - message: '#^Access to an undefined property CodeIgniter\\Config\\BaseConfig\:\:\$regenerate\.$#' - count: 2 - path: ../../tests/system/Security/SecurityCSRFSessionRandomizeTokenTest.php - - - - message: '#^Access to an undefined property CodeIgniter\\Config\\BaseConfig\:\:\$tokenRandomize\.$#' - count: 2 - path: ../../tests/system/Security/SecurityCSRFSessionRandomizeTokenTest.php - - - - message: '#^Access to an undefined property CodeIgniter\\Config\\BaseConfig\:\:\$regenerate\.$#' - count: 2 - path: ../../tests/system/Security/SecurityCSRFSessionTest.php diff --git a/utils/phpstan-baseline/property.phpDocType.neon b/utils/phpstan-baseline/property.phpDocType.neon index 0a59dde8db0a..0ba558aded06 100644 --- a/utils/phpstan-baseline/property.phpDocType.neon +++ b/utils/phpstan-baseline/property.phpDocType.neon @@ -168,7 +168,7 @@ parameters: path: ../../system/Images/Handlers/ImageMagickHandler.php - - message: '#^PHPDoc type string of property CodeIgniter\\Session\\Handlers\\FileHandler\:\:\$savePath is not the same as PHPDoc type array\|string of overridden property CodeIgniter\\Session\\Handlers\\BaseHandler\:\:\$savePath\.$#' + message: '#^PHPDoc type string of property CodeIgniter\\Session\\Handlers\\FileHandler\:\:\$savePath is not the same as PHPDoc type array\\|string of overridden property CodeIgniter\\Session\\Handlers\\BaseHandler\:\:\$savePath\.$#' count: 1 path: ../../system/Session/Handlers/FileHandler.php diff --git a/utils/phpstan-baseline/staticMethod.notFound.neon b/utils/phpstan-baseline/staticMethod.notFound.neon index cec945e226cf..ad04f6d249a3 100644 --- a/utils/phpstan-baseline/staticMethod.notFound.neon +++ b/utils/phpstan-baseline/staticMethod.notFound.neon @@ -1,4 +1,4 @@ -# total 23 errors +# total 21 errors parameters: ignoreErrors: @@ -32,16 +32,6 @@ parameters: count: 13 path: ../../tests/system/Config/FactoriesTest.php - - - message: '#^Call to an undefined static method Tests\\Support\\Config\\Services\:\:SeSsIoN\(\)\.$#' - count: 1 - path: ../../tests/system/Config/ServicesTest.php - - - - message: '#^Call to an undefined static method Tests\\Support\\Config\\Services\:\:SeSsIoNs\(\)\.$#' - count: 1 - path: ../../tests/system/Config/ServicesTest.php - - message: '#^Call to an undefined static method Tests\\Support\\Config\\Services\:\:redirectResponse\(\)\.$#' count: 1 diff --git a/utils/phpstan-baseline/ternary.shortNotAllowed.neon b/utils/phpstan-baseline/ternary.shortNotAllowed.neon index d0ed19c4567e..0f831fde0a46 100644 --- a/utils/phpstan-baseline/ternary.shortNotAllowed.neon +++ b/utils/phpstan-baseline/ternary.shortNotAllowed.neon @@ -1,4 +1,4 @@ -# total 34 errors +# total 33 errors parameters: ignoreErrors: @@ -67,11 +67,6 @@ parameters: count: 1 path: ../../system/Router/AutoRouter.php - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 1 - path: ../../system/Session/Session.php - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' count: 2