diff --git a/system/Database/Forge.php b/system/Database/Forge.php index a5d950d9620c..7eefba484bc1 100644 --- a/system/Database/Forge.php +++ b/system/Database/Forge.php @@ -50,7 +50,7 @@ class Forge /** * List of unique keys. * - * @var array + * @var list */ protected $uniqueKeys = []; @@ -64,7 +64,7 @@ class Forge /** * List of foreign keys. * - * @var array + * @var list, referenceTable: string, referenceField: list, onDelete: string, onUpdate: string, fkName: string}> */ protected $foreignKeys = []; @@ -146,7 +146,7 @@ class Forge /** * UNSIGNED support * - * @var array|bool + * @var array|bool */ protected $unsigned = true; @@ -183,7 +183,7 @@ class Forge /** * Foreign Key Allowed Actions * - * @var array + * @var list */ protected $fkAllowActions = ['CASCADE', 'SET NULL', 'NO ACTION', 'RESTRICT', 'SET DEFAULT']; @@ -324,7 +324,7 @@ public function dropDatabase(string $dbName): bool /** * Add Key * - * @param array|string $key + * @param list|string $key * * @return Forge */ @@ -346,7 +346,7 @@ public function addKey($key, bool $primary = false, bool $unique = false, string /** * Add Primary Key * - * @param array|string $key + * @param list|string $key * * @return Forge */ @@ -358,7 +358,7 @@ public function addPrimaryKey($key, string $keyName = '') /** * Add Unique Key * - * @param array|string $key + * @param list|string $key * * @return Forge */ @@ -370,7 +370,7 @@ public function addUniqueKey($key, string $keyName = '') /** * Add Field * - * @param array|string $fields Field array or Field string + * @param array|string>|string $fields Field array or Field string * * @return Forge */ @@ -544,7 +544,7 @@ public function dropForeignKey(string $table, string $foreignName) } /** - * @param array $attributes Table attributes + * @param array $attributes Table attributes * * @return bool * @@ -590,7 +590,7 @@ public function createTable(string $table, bool $ifNotExists = false, array $att } /** - * @param array $attributes Table attributes + * @param array $attributes Table attributes * * @return string SQL string * @@ -626,6 +626,9 @@ protected function _createTable(string $table, bool $ifNotExists, array $attribu ); } + /** + * @param array $attributes + */ protected function _createTableAttributes(array $attributes): string { $sql = ''; @@ -746,7 +749,7 @@ public function renameTable(string $tableName, string $newTableName) } /** - * @param array|string $fields Field array or Field string + * @param array|string>|string $fields Field array or Field string * * @throws DatabaseException */ @@ -804,7 +807,7 @@ public function dropColumn(string $table, $columnNames) } /** - * @param array|string $fields Field array or Field string + * @param array|string>|string $fields Field array or Field string * * @throws DatabaseException */ @@ -846,9 +849,9 @@ public function modifyColumn(string $table, $fields): bool } /** - * @param 'ADD'|'CHANGE'|'DROP' $alterType - * @param array|string $processedFields Processed column definitions - * or column names to DROP + * @param 'ADD'|'CHANGE'|'DROP' $alterType + * @param list>|list|string $processedFields Processed column definitions + * or column names to DROP * * @return ($alterType is 'DROP' ? string : false|list|null) */ @@ -884,6 +887,8 @@ protected function _alterTable(string $alterType, string $table, $processedField /** * Returns $processedFields array from $this->fields data. + * + * @return list> */ protected function _processFields(bool $createTable = false): array { @@ -973,6 +978,8 @@ protected function _processFields(bool $createTable = false): array /** * Converts $processedField array to field definition string. + * + * @param array $processedField */ protected function _processColumn(array $processedField): string { @@ -988,6 +995,8 @@ protected function _processColumn(array $processedField): string /** * Performs a data type mapping between different databases. * + * @param array $attributes + * * @return void */ protected function _attributeType(array &$attributes) @@ -1005,6 +1014,9 @@ protected function _attributeType(array &$attributes) * - array(TYPE => UTYPE) will change $field['type'], * from TYPE to UTYPE in case of a match * + * @param array $attributes + * @param array $field + * * @return void */ protected function _attributeUnsigned(array &$attributes, array &$field) @@ -1038,6 +1050,9 @@ protected function _attributeUnsigned(array &$attributes, array &$field) } /** + * @param array $attributes + * @param array $field + * * @return void */ protected function _attributeDefault(array &$attributes, array &$field) @@ -1062,6 +1077,9 @@ protected function _attributeDefault(array &$attributes, array &$field) } /** + * @param array $attributes + * @param array $field + * * @return void */ protected function _attributeUnique(array &$attributes, array &$field) @@ -1072,6 +1090,9 @@ protected function _attributeUnique(array &$attributes, array &$field) } /** + * @param array $attributes + * @param array $field + * * @return void */ protected function _attributeAutoIncrement(array &$attributes, array &$field) @@ -1164,6 +1185,8 @@ public function processIndexes(string $table): bool * Generates SQL to add indexes * * @param bool $asQuery When true returns stand alone SQL, else partial SQL used with CREATE TABLE + * + * @return list */ protected function _processIndexes(string $table, bool $asQuery = false): array { @@ -1210,6 +1233,8 @@ protected function _processIndexes(string $table, bool $asQuery = false): array * Generates SQL to add foreign keys * * @param bool $asQuery When true returns stand alone SQL, else partial SQL used with CREATE TABLE + * + * @return list */ protected function _processForeignKeys(string $table, bool $asQuery = false): array { diff --git a/system/Database/MySQLi/Forge.php b/system/Database/MySQLi/Forge.php index d433efd335db..0cbe85a3d470 100644 --- a/system/Database/MySQLi/Forge.php +++ b/system/Database/MySQLi/Forge.php @@ -24,8 +24,6 @@ class Forge extends BaseForge { /** * CREATE DATABASE statement - * - * @var string */ protected $createDatabaseStr = 'CREATE DATABASE %s CHARACTER SET %s COLLATE %s'; @@ -38,8 +36,6 @@ class Forge extends BaseForge /** * DROP CONSTRAINT statement - * - * @var string */ protected $dropConstraintStr = 'ALTER TABLE %s DROP FOREIGN KEY %s'; @@ -56,7 +52,7 @@ class Forge extends BaseForge /** * UNSIGNED support * - * @var array + * @var list */ protected $_unsigned = [ 'TINYINT', @@ -76,7 +72,7 @@ class Forge extends BaseForge /** * Table Options list which required to be quoted * - * @var array + * @var list */ protected $_quoted_table_options = [ 'COMMENT', @@ -100,7 +96,7 @@ class Forge extends BaseForge /** * CREATE TABLE attributes * - * @param array $attributes Associative array of table attributes + * @param array $attributes Associative array of table attributes */ protected function _createTableAttributes(array $attributes): string { @@ -129,16 +125,6 @@ protected function _createTableAttributes(array $attributes): string return $sql; } - /** - * ALTER TABLE - * - * @param string $alterType ALTER type - * @param string $table Table name - * @param array|string $processedFields Processed column definitions - * or column names to DROP - * - * @return ($alterType is 'DROP' ? string : list) - */ protected function _alterTable(string $alterType, string $table, $processedFields) { if ($alterType === 'DROP') { @@ -187,11 +173,6 @@ protected function _processColumn(array $processedField): string . $extraClause; } - /** - * Generates SQL to add indexes - * - * @param bool $asQuery When true returns stand alone SQL, else partial SQL used with CREATE TABLE - */ protected function _processIndexes(string $table, bool $asQuery = false): array { $sqls = ['']; diff --git a/system/Database/OCI8/Forge.php b/system/Database/OCI8/Forge.php index 0cf8274e78ef..8b7b7ddfa3ce 100644 --- a/system/Database/OCI8/Forge.php +++ b/system/Database/OCI8/Forge.php @@ -31,38 +31,28 @@ class Forge extends BaseForge /** * CREATE DATABASE statement - * - * @var false */ protected $createDatabaseStr = false; /** * CREATE TABLE IF statement * - * @var false - * * @deprecated This is no longer used. */ protected $createTableIfStr = false; /** * DROP TABLE IF EXISTS statement - * - * @var false */ protected $dropTableIfStr = false; /** * DROP DATABASE statement - * - * @var false */ protected $dropDatabaseStr = false; /** * UNSIGNED support - * - * @var array|bool */ protected $unsigned = false; @@ -75,35 +65,19 @@ class Forge extends BaseForge /** * RENAME TABLE statement - * - * @var string */ protected $renameTableStr = 'ALTER TABLE %s RENAME TO %s'; /** * DROP CONSTRAINT statement - * - * @var string */ protected $dropConstraintStr = 'ALTER TABLE %s DROP CONSTRAINT %s'; /** * Foreign Key Allowed Actions - * - * @var array */ protected $fkAllowActions = ['CASCADE', 'SET NULL', 'NO ACTION']; - /** - * ALTER TABLE - * - * @param string $alterType ALTER type - * @param string $table Table name - * @param array|string $processedFields Processed column definitions - * or column names to DROP - * - * @return ($alterType is 'DROP' ? string : list) - */ protected function _alterTable(string $alterType, string $table, $processedFields) { $sql = 'ALTER TABLE ' . $this->db->escapeIdentifiers($table); diff --git a/system/Database/Postgre/Forge.php b/system/Database/Postgre/Forge.php index 0423d6d54cd1..3f2c2321d352 100644 --- a/system/Database/Postgre/Forge.php +++ b/system/Database/Postgre/Forge.php @@ -31,8 +31,6 @@ class Forge extends BaseForge /** * DROP CONSTRAINT statement - * - * @var string */ protected $dropConstraintStr = 'ALTER TABLE %s DROP CONSTRAINT %s'; @@ -46,7 +44,7 @@ class Forge extends BaseForge /** * UNSIGNED support * - * @var array + * @var array */ protected $_unsigned = [ 'INT2' => 'INTEGER', @@ -72,19 +70,13 @@ class Forge extends BaseForge /** * CREATE TABLE attributes * - * @param array $attributes Associative array of table attributes + * @param array $attributes Associative array of table attributes */ protected function _createTableAttributes(array $attributes): string { return ''; } - /** - * @param array|string $processedFields Processed column definitions - * or column names to DROP - * - * @return ($alterType is 'DROP' ? string : false|list) - */ protected function _alterTable(string $alterType, string $table, $processedFields) { if (in_array($alterType, ['DROP', 'ADD'], true)) { diff --git a/system/Database/SQLSRV/Forge.php b/system/Database/SQLSRV/Forge.php index c9ae7557cc65..fa29fe5dbd75 100644 --- a/system/Database/SQLSRV/Forge.php +++ b/system/Database/SQLSRV/Forge.php @@ -27,8 +27,6 @@ class Forge extends BaseForge { /** * DROP CONSTRAINT statement - * - * @var string */ protected $dropConstraintStr; @@ -52,8 +50,6 @@ class Forge extends BaseForge * CREATE DATABASE IF statement * * @todo missing charset & collat - * - * @var string */ protected $createDatabaseStr = 'CREATE DATABASE %s '; @@ -72,15 +68,11 @@ class Forge extends BaseForge * * @see https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-rename-transact-sql?view=sql-server-2017 * 'EXEC sp_rename %s , %s ;' - * - * @var string */ protected $renameTableStr; /** * UNSIGNED support - * - * @var array */ protected $unsigned = [ 'TINYINT' => 'SMALLINT', @@ -91,24 +83,18 @@ class Forge extends BaseForge /** * Foreign Key Allowed Actions - * - * @var array */ protected $fkAllowActions = ['CASCADE', 'SET NULL', 'NO ACTION', 'RESTRICT', 'SET DEFAULT']; /** * CREATE TABLE IF statement * - * @var string - * * @deprecated This is no longer used. */ protected $createTableIfStr; /** * CREATE TABLE statement - * - * @var string */ protected $createTableStr; @@ -123,13 +109,6 @@ public function __construct(BaseConnection $db) $this->dropIndexStr = 'DROP INDEX %s ON ' . $this->db->escapeIdentifiers($this->db->schema) . '.%s'; } - /** - * Create database - * - * @param bool $ifNotExists Whether to add IF NOT EXISTS condition - * - * @throws DatabaseException - */ public function createDatabase(string $dbName, bool $ifNotExists = false): bool { if ($ifNotExists) { @@ -189,20 +168,11 @@ public function dropDatabase(string $dbName): bool return parent::dropDatabase($dbName); } - /** - * CREATE TABLE attributes - */ protected function _createTableAttributes(array $attributes): string { return ''; } - /** - * @param array|string $processedFields Processed column definitions - * or column names to DROP - * - * @return ($alterType is 'DROP' ? string : false|list) - */ protected function _alterTable(string $alterType, string $table, $processedFields) { // Handle DROP here @@ -336,11 +306,6 @@ protected function _dropIndex(string $table, object $indexData) return $this->db->simpleQuery($sql); } - /** - * Generates SQL to add indexes - * - * @param bool $asQuery When true returns stand alone SQL, else partial SQL used with CREATE TABLE - */ protected function _processIndexes(string $table, bool $asQuery = false): array { $sqls = []; diff --git a/system/Database/SQLite3/Forge.php b/system/Database/SQLite3/Forge.php index 688e0af559fb..2ca26bba105e 100644 --- a/system/Database/SQLite3/Forge.php +++ b/system/Database/SQLite3/Forge.php @@ -34,7 +34,7 @@ class Forge extends BaseForge /** * UNSIGNED support * - * @var array|bool + * @var array|bool */ protected $_unsigned = false; @@ -59,11 +59,6 @@ public function __construct(BaseConnection $db) } } - /** - * Create database - * - * @param bool $ifNotExists Whether to add IF NOT EXISTS condition - */ public function createDatabase(string $dbName, bool $ifNotExists = false): bool { // In SQLite, a database is created when you connect to the database. @@ -132,12 +127,6 @@ public function dropColumn(string $table, $columnNames): bool return $result; } - /** - * @param array|string $processedFields Processed column definitions - * or column names to DROP - * - * @return ($alterType is 'DROP' ? string : list|null) - */ protected function _alterTable(string $alterType, string $table, $processedFields) { switch ($alterType) { diff --git a/utils/phpstan-baseline/argument.type.neon b/utils/phpstan-baseline/argument.type.neon index 4d117cc62429..5e3cd39db63c 100644 --- a/utils/phpstan-baseline/argument.type.neon +++ b/utils/phpstan-baseline/argument.type.neon @@ -1,4 +1,4 @@ -# total 33 errors +# total 31 errors parameters: ignoreErrors: @@ -32,11 +32,6 @@ parameters: count: 2 path: ../../tests/system/Config/FactoriesTest.php - - - message: '#^Parameter \#1 \$fields of method CodeIgniter\\Database\\Forge\\:\:addField\(\) expects array\\|string, array\ given\.$#' - count: 2 - path: ../../tests/system/Database/Live/ForgeTest.php - - message: '#^Parameter \#1 \$db of class CodeIgniter\\Database\\SQLite3\\Table constructor expects CodeIgniter\\Database\\SQLite3\\Connection, CodeIgniter\\Database\\BaseConnection given\.$#' count: 1 diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 5c9064dc52fe..a5cf84a90e35 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 789 errors +# total 703 errors includes: - argument.type.neon diff --git a/utils/phpstan-baseline/missingType.iterableValue.neon b/utils/phpstan-baseline/missingType.iterableValue.neon index aabd40269d62..1078edd6ed71 100644 --- a/utils/phpstan-baseline/missingType.iterableValue.neon +++ b/utils/phpstan-baseline/missingType.iterableValue.neon @@ -1,4 +1,4 @@ -# total 581 errors +# total 518 errors parameters: ignoreErrors: @@ -612,141 +612,6 @@ parameters: count: 1 path: ../../system/Database/Database.php - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_alterTable\(\) has parameter \$processedFields with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_attributeAutoIncrement\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_attributeAutoIncrement\(\) has parameter \$field with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_attributeDefault\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_attributeDefault\(\) has parameter \$field with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_attributeType\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_attributeUnique\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_attributeUnique\(\) has parameter \$field with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_attributeUnsigned\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_attributeUnsigned\(\) has parameter \$field 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\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - 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 - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_processColumn\(\) has parameter \$processedField with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_processFields\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_processForeignKeys\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_processIndexes\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:addColumn\(\) has parameter \$fields with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:addField\(\) has parameter \$fields with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:addKey\(\) has parameter \$key with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:addPrimaryKey\(\) has parameter \$key with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:addUniqueKey\(\) has parameter \$key with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - 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 - - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:modifyColumn\(\) has parameter \$fields with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Property CodeIgniter\\Database\\Forge\:\:\$fkAllowActions type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Property CodeIgniter\\Database\\Forge\:\:\$foreignKeys type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Property CodeIgniter\\Database\\Forge\:\:\$uniqueKeys type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - - - message: '#^Property CodeIgniter\\Database\\Forge\:\:\$unsigned type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - message: '#^Method CodeIgniter\\Database\\MigrationRunner\:\:__construct\(\) has parameter \$db with no value type specified in iterable type array\.$#' count: 1 @@ -787,36 +652,6 @@ parameters: count: 1 path: ../../system/Database/MigrationRunner.php - - - message: '#^Method CodeIgniter\\Database\\MySQLi\\Forge\:\:_alterTable\(\) has parameter \$processedFields with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/MySQLi/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\MySQLi\\Forge\:\:_createTableAttributes\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/MySQLi/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\MySQLi\\Forge\:\:_processColumn\(\) has parameter \$processedField with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/MySQLi/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\MySQLi\\Forge\:\:_processIndexes\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/MySQLi/Forge.php - - - - message: '#^Property CodeIgniter\\Database\\MySQLi\\Forge\:\:\$_quoted_table_options type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/MySQLi/Forge.php - - - - message: '#^Property CodeIgniter\\Database\\MySQLi\\Forge\:\:\$_unsigned type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/MySQLi/Forge.php - - message: '#^Method CodeIgniter\\Database\\MySQLi\\PreparedQuery\:\:_execute\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 @@ -862,41 +697,6 @@ parameters: count: 1 path: ../../system/Database/OCI8/Connection.php - - - message: '#^Method CodeIgniter\\Database\\OCI8\\Forge\:\:_alterTable\(\) has parameter \$processedFields with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/OCI8/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\OCI8\\Forge\:\:_attributeAutoIncrement\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/OCI8/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\OCI8\\Forge\:\:_attributeAutoIncrement\(\) has parameter \$field with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/OCI8/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\OCI8\\Forge\:\:_attributeType\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/OCI8/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\OCI8\\Forge\:\:_processColumn\(\) has parameter \$processedField with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/OCI8/Forge.php - - - - message: '#^Property CodeIgniter\\Database\\OCI8\\Forge\:\:\$fkAllowActions type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/OCI8/Forge.php - - - - message: '#^Property CodeIgniter\\Database\\OCI8\\Forge\:\:\$unsigned type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/OCI8/Forge.php - - message: '#^Method CodeIgniter\\Database\\OCI8\\PreparedQuery\:\:_execute\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 @@ -932,41 +732,6 @@ parameters: count: 1 path: ../../system/Database/Postgre/Connection.php - - - message: '#^Method CodeIgniter\\Database\\Postgre\\Forge\:\:_alterTable\(\) has parameter \$processedFields with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Postgre/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Postgre\\Forge\:\:_attributeAutoIncrement\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Postgre/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Postgre\\Forge\:\:_attributeAutoIncrement\(\) has parameter \$field with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Postgre/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Postgre\\Forge\:\:_attributeType\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Postgre/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Postgre\\Forge\:\:_createTableAttributes\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Postgre/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\Postgre\\Forge\:\:_processColumn\(\) has parameter \$processedField with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Postgre/Forge.php - - - - message: '#^Property CodeIgniter\\Database\\Postgre\\Forge\:\:\$_unsigned type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Postgre/Forge.php - - message: '#^Method CodeIgniter\\Database\\Postgre\\PreparedQuery\:\:_execute\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 @@ -1102,51 +867,6 @@ parameters: count: 1 path: ../../system/Database/SQLSRV/Connection.php - - - message: '#^Method CodeIgniter\\Database\\SQLSRV\\Forge\:\:_alterTable\(\) has parameter \$processedFields with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLSRV/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\SQLSRV\\Forge\:\:_attributeAutoIncrement\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLSRV/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\SQLSRV\\Forge\:\:_attributeAutoIncrement\(\) has parameter \$field with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLSRV/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\SQLSRV\\Forge\:\:_attributeType\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLSRV/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\SQLSRV\\Forge\:\:_createTableAttributes\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLSRV/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\SQLSRV\\Forge\:\:_processColumn\(\) has parameter \$processedField with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLSRV/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\SQLSRV\\Forge\:\:_processIndexes\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLSRV/Forge.php - - - - message: '#^Property CodeIgniter\\Database\\SQLSRV\\Forge\:\:\$fkAllowActions type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLSRV/Forge.php - - - - message: '#^Property CodeIgniter\\Database\\SQLSRV\\Forge\:\:\$unsigned type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLSRV/Forge.php - - message: '#^Method CodeIgniter\\Database\\SQLSRV\\PreparedQuery\:\:_execute\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 @@ -1187,41 +907,6 @@ parameters: count: 1 path: ../../system/Database/SQLSRV/Utils.php - - - message: '#^Method CodeIgniter\\Database\\SQLite3\\Forge\:\:_alterTable\(\) has parameter \$processedFields with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLite3/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\SQLite3\\Forge\:\:_attributeAutoIncrement\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLite3/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\SQLite3\\Forge\:\:_attributeAutoIncrement\(\) has parameter \$field with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLite3/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\SQLite3\\Forge\:\:_attributeType\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLite3/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\SQLite3\\Forge\:\:_processColumn\(\) has parameter \$processedField with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLite3/Forge.php - - - - message: '#^Method CodeIgniter\\Database\\SQLite3\\Forge\:\:_processForeignKeys\(\) return type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLite3/Forge.php - - - - message: '#^Property CodeIgniter\\Database\\SQLite3\\Forge\:\:\$_unsigned type has no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/SQLite3/Forge.php - - message: '#^Method CodeIgniter\\Database\\SQLite3\\PreparedQuery\:\:_execute\(\) has parameter \$data with no value type specified in iterable type array\.$#' count: 1 diff --git a/utils/phpstan-baseline/property.phpDocType.neon b/utils/phpstan-baseline/property.phpDocType.neon index 31a1387605af..5b7e09269507 100644 --- a/utils/phpstan-baseline/property.phpDocType.neon +++ b/utils/phpstan-baseline/property.phpDocType.neon @@ -1,4 +1,4 @@ -# total 32 errors +# total 22 errors parameters: ignoreErrors: @@ -7,11 +7,6 @@ parameters: count: 1 path: ../../system/Database/MySQLi/Connection.php - - - message: '#^PHPDoc type string of property CodeIgniter\\Database\\MySQLi\\Forge\:\:\$createDatabaseStr is not the same as PHPDoc type string\|false of overridden property CodeIgniter\\Database\\Forge\\:\:\$createDatabaseStr\.$#' - count: 1 - path: ../../system/Database/MySQLi/Forge.php - - message: '#^PHPDoc type string of property CodeIgniter\\Database\\MySQLi\\Utils\:\:\$listDatabases is not the same as PHPDoc type bool\|string of overridden property CodeIgniter\\Database\\BaseUtils\:\:\$listDatabases\.$#' count: 1 @@ -27,31 +22,6 @@ parameters: count: 1 path: ../../system/Database/OCI8/Connection.php - - - message: '#^PHPDoc type false of property CodeIgniter\\Database\\OCI8\\Forge\:\:\$createDatabaseStr is not the same as PHPDoc type string\|false of overridden property CodeIgniter\\Database\\Forge\\:\:\$createDatabaseStr\.$#' - count: 1 - path: ../../system/Database/OCI8/Forge.php - - - - message: '#^PHPDoc type false of property CodeIgniter\\Database\\OCI8\\Forge\:\:\$createTableIfStr is not the same as PHPDoc type bool\|string of overridden property CodeIgniter\\Database\\Forge\\:\:\$createTableIfStr\.$#' - count: 1 - path: ../../system/Database/OCI8/Forge.php - - - - message: '#^PHPDoc type false of property CodeIgniter\\Database\\OCI8\\Forge\:\:\$dropDatabaseStr is not the same as PHPDoc type string\|false of overridden property CodeIgniter\\Database\\Forge\\:\:\$dropDatabaseStr\.$#' - count: 1 - path: ../../system/Database/OCI8/Forge.php - - - - message: '#^PHPDoc type false of property CodeIgniter\\Database\\OCI8\\Forge\:\:\$dropTableIfStr is not the same as PHPDoc type bool\|string of overridden property CodeIgniter\\Database\\Forge\\:\:\$dropTableIfStr\.$#' - count: 1 - path: ../../system/Database/OCI8/Forge.php - - - - message: '#^PHPDoc type string of property CodeIgniter\\Database\\OCI8\\Forge\:\:\$renameTableStr is not the same as PHPDoc type string\|false of overridden property CodeIgniter\\Database\\Forge\\:\:\$renameTableStr\.$#' - count: 1 - path: ../../system/Database/OCI8/Forge.php - - message: '#^PHPDoc type string of property CodeIgniter\\Database\\OCI8\\Utils\:\:\$listDatabases is not the same as PHPDoc type bool\|string of overridden property CodeIgniter\\Database\\BaseUtils\:\:\$listDatabases\.$#' count: 1 @@ -77,26 +47,6 @@ parameters: count: 1 path: ../../system/Database/SQLSRV/Connection.php - - - message: '#^PHPDoc type array of property CodeIgniter\\Database\\SQLSRV\\Forge\:\:\$unsigned is not the same as PHPDoc type array\|bool of overridden property CodeIgniter\\Database\\Forge\\:\:\$unsigned\.$#' - count: 1 - path: ../../system/Database/SQLSRV/Forge.php - - - - message: '#^PHPDoc type string of property CodeIgniter\\Database\\SQLSRV\\Forge\:\:\$createDatabaseStr is not the same as PHPDoc type string\|false of overridden property CodeIgniter\\Database\\Forge\\:\:\$createDatabaseStr\.$#' - count: 1 - path: ../../system/Database/SQLSRV/Forge.php - - - - message: '#^PHPDoc type string of property CodeIgniter\\Database\\SQLSRV\\Forge\:\:\$createTableIfStr is not the same as PHPDoc type bool\|string of overridden property CodeIgniter\\Database\\Forge\\:\:\$createTableIfStr\.$#' - count: 1 - path: ../../system/Database/SQLSRV/Forge.php - - - - message: '#^PHPDoc type string of property CodeIgniter\\Database\\SQLSRV\\Forge\:\:\$renameTableStr is not the same as PHPDoc type string\|false of overridden property CodeIgniter\\Database\\Forge\\:\:\$renameTableStr\.$#' - count: 1 - path: ../../system/Database/SQLSRV/Forge.php - - message: '#^PHPDoc type string of property CodeIgniter\\Database\\SQLSRV\\Utils\:\:\$listDatabases is not the same as PHPDoc type bool\|string of overridden property CodeIgniter\\Database\\BaseUtils\:\:\$listDatabases\.$#' count: 1