diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 106de3723ef0..2f9d1e447344 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -21,6 +21,16 @@ 'count' => 13, 'path' => __DIR__ . '/system/Autoloader/FileLocator.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\|string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Autoloader/FileLocator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Autoloader/FileLocator.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 6, @@ -36,6 +46,41 @@ 'count' => 1, 'path' => __DIR__ . '/system/BaseModel.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, array\\ given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/BaseModel.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, array\\|int\\|string\\|null given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/BaseModel.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, array\\|null given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/BaseModel.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, string given on the right side\\.$#', + 'count' => 7, + 'path' => __DIR__ . '/system/BaseModel.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, array\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/BaseModel.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, array\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/BaseModel.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, int given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/BaseModel.php', +]; $ignoreErrors[] = [ 'message' => '#^Strict comparison using \\!\\=\\= between mixed and null will always evaluate to true\\.$#', 'count' => 1, @@ -66,16 +111,81 @@ 'count' => 6, 'path' => __DIR__ . '/system/CLI/CLI.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, array given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/CLI/CLI.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, array\\ given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/CLI/CLI.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, array\\|string\\|null given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/CLI/CLI.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, array given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/CLI/CLI.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/CLI/CLI.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, string\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/CLI/CLI.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, array given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/CLI/CLI.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, int given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/CLI/CLI.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in \\|\\|, string given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/CLI/CLI.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in \\|\\|, string\\|null given on the left side\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/CLI/CLI.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in \\|\\|, string\\|null given on the right side\\.$#', + 'count' => 3, + 'path' => __DIR__ . '/system/CLI/CLI.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 5, 'path' => __DIR__ . '/system/CLI/CLI.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, array given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/CLI/Commands.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 2, 'path' => __DIR__ . '/system/Cache/CacheFactory.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, string given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Cache/Handlers/BaseHandler.php', +]; $ignoreErrors[] = [ 'message' => '#^Call to function property_exists\\(\\) with Config\\\\Cache and \'file\' will always evaluate to true\\.$#', 'count' => 1, @@ -96,6 +206,21 @@ 'count' => 1, 'path' => __DIR__ . '/system/Cache/Handlers/FileHandler.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Cache/Handlers/PredisHandler.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, int given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Cache/Handlers/PredisHandler.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, int given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Cache/Handlers/RedisHandler.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 6, @@ -166,6 +291,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/CodeIgniter.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, CodeIgniter\\\\HTTP\\\\ResponseInterface\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/CodeIgniter.php', +]; $ignoreErrors[] = [ 'message' => '#^Property CodeIgniter\\\\CodeIgniter\\:\\:\\$controller type has no signature specified for Closure\\.$#', 'count' => 1, @@ -191,6 +321,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/Database/MigrateStatus.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, array\\, array\\\\> given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Database/MigrateStatus.php', +]; $ignoreErrors[] = [ 'message' => '#^PHPDoc type array\\ of property CodeIgniter\\\\Commands\\\\Database\\\\MigrateStatus\\:\\:\\$options is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$options\\.$#', 'count' => 1, @@ -251,6 +386,21 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/Generators/CellGenerator.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/CellGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/CellGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/CellGenerator.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 2, @@ -271,6 +421,21 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/Generators/CommandGenerator.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/CommandGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/CommandGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/CommandGenerator.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 2, @@ -291,6 +456,21 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/Generators/ConfigGenerator.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ConfigGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ConfigGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ConfigGenerator.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 2, @@ -311,6 +491,41 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/Generators/ControllerGenerator.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ControllerGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ControllerGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ControllerGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an elseif condition, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ControllerGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ControllerGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in \\|\\|, mixed given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ControllerGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in \\|\\|, mixed given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ControllerGenerator.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 2, @@ -331,6 +546,21 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/Generators/EntityGenerator.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/EntityGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/EntityGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/EntityGenerator.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 2, @@ -351,6 +581,21 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/Generators/FilterGenerator.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/FilterGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/FilterGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/FilterGenerator.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 2, @@ -371,6 +616,26 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/Generators/MigrationGenerator.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/MigrationGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/MigrationGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/MigrationGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/MigrationGenerator.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 2, @@ -391,6 +656,26 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/Generators/ModelGenerator.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ModelGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ModelGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ModelGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ModelGenerator.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 2, @@ -411,6 +696,31 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/Generators/ScaffoldGenerator.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ScaffoldGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ScaffoldGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ScaffoldGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an elseif condition, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ScaffoldGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, mixed given\\.$#', + 'count' => 4, + 'path' => __DIR__ . '/system/Commands/Generators/ScaffoldGenerator.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 2, @@ -431,6 +741,21 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/Generators/SeederGenerator.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/SeederGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/SeederGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/SeederGenerator.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 2, @@ -451,6 +776,21 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/Generators/SessionMigrationGenerator.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/SessionMigrationGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/SessionMigrationGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/SessionMigrationGenerator.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 2, @@ -471,6 +811,21 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/Generators/ValidationGenerator.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ValidationGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, mixed given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ValidationGenerator.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Generators/ValidationGenerator.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 2, @@ -486,6 +841,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/ListCommands.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, int given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Server/Serve.php', +]; $ignoreErrors[] = [ 'message' => '#^Accessing offset \'DOCUMENT_ROOT\' directly on \\$_SERVER is discouraged\\.$#', 'count' => 2, @@ -536,6 +896,16 @@ 'count' => 1, 'path' => __DIR__ . '/system/Commands/Utilities/Routes.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, Config\\\\Routing given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Commands/Utilities/Routes.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string\\|null given\\.$#', + 'count' => 3, + 'path' => __DIR__ . '/system/Commands/Utilities/Routes.php', +]; $ignoreErrors[] = [ 'message' => '#^PHPDoc type array\\ of property CodeIgniter\\\\Commands\\\\Utilities\\\\Routes\\:\\:\\$options is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$options\\.$#', 'count' => 1, @@ -586,6 +956,11 @@ 'count' => 8, 'path' => __DIR__ . '/system/Common.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, string\\|null given on the left side\\.$#', + 'count' => 3, + 'path' => __DIR__ . '/system/Common.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 2, @@ -621,6 +996,11 @@ 'count' => 3, 'path' => __DIR__ . '/system/Config/BaseService.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, array given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Config/BaseService.php', +]; $ignoreErrors[] = [ 'message' => '#^Accessing offset string directly on \\$_SERVER is discouraged\\.$#', 'count' => 2, @@ -636,6 +1016,31 @@ 'count' => 2, 'path' => __DIR__ . '/system/Config/DotEnv.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Config/DotEnv.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, string given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Config/Factories.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, array given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Config/Factories.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, string\\|null given\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/Config/Factories.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string\\|null given\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/Config/Factories.php', +]; $ignoreErrors[] = [ 'message' => '#^Accessing offset \'SERVER_PROTOCOL\' directly on \\$_SERVER is discouraged\\.$#', 'count' => 1, @@ -661,6 +1066,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Controller.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, array given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Controller.php', +]; $ignoreErrors[] = [ 'message' => '#^Parameter \\#1 \\$offset \\(string\\) of method CodeIgniter\\\\Cookie\\\\Cookie\\:\\:offsetSet\\(\\) should be contravariant with parameter \\$offset \\(string\\|null\\) of method ArrayAccess\\\\:\\:offsetSet\\(\\)$#', 'count' => 1, @@ -761,6 +1171,21 @@ 'count' => 1, 'path' => __DIR__ . '/system/Database/BaseBuilder.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, TWhenNot given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/BaseBuilder.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an elseif condition, \\(callable\\)\\|null given\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/Database/BaseBuilder.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, TWhen given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/BaseBuilder.php', +]; $ignoreErrors[] = [ 'message' => '#^Property CodeIgniter\\\\Database\\\\BaseBuilder\\:\\:\\$db \\(CodeIgniter\\\\Database\\\\BaseConnection\\) in empty\\(\\) is not falsy\\.$#', 'count' => 1, @@ -816,6 +1241,16 @@ 'count' => 10, 'path' => __DIR__ . '/system/Database/BaseResult.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, array\\ given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/BaseResult.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, array\\ given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/BaseResult.php', +]; $ignoreErrors[] = [ 'message' => '#^Parameter \\#1 \\$className \\(class\\-string\\) of method CodeIgniter\\\\Database\\\\BaseResult\\:\\:getCustomResultObject\\(\\) should be contravariant with parameter \\$className \\(string\\) of method CodeIgniter\\\\Database\\\\ResultInterface\\\\:\\:getCustomResultObject\\(\\)$#', 'count' => 1, @@ -901,6 +1336,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Database/Forge.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, string given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/Forge.php', +]; $ignoreErrors[] = [ 'message' => '#^Method CodeIgniter\\\\Database\\\\Migration\\:\\:down\\(\\) has no return type specified\\.$#', 'count' => 1, @@ -946,6 +1386,26 @@ 'count' => 1, 'path' => __DIR__ . '/system/Database/MigrationRunner.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, int\\<0, max\\> given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/MigrationRunner.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\<0, max\\> given\\.$#', + 'count' => 4, + 'path' => __DIR__ . '/system/Database/MigrationRunner.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, string\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/MigrationRunner.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/MigrationRunner.php', +]; $ignoreErrors[] = [ 'message' => '#^Method CodeIgniter\\\\Database\\\\ModelFactory\\:\\:injectMock\\(\\) has no return type specified\\.$#', 'count' => 1, @@ -971,6 +1431,16 @@ 'count' => 1, 'path' => __DIR__ . '/system/Database/MySQLi/Connection.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, int given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/MySQLi/Connection.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, array given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/MySQLi/Connection.php', +]; $ignoreErrors[] = [ 'message' => '#^PHPDoc type string of property CodeIgniter\\\\Database\\\\MySQLi\\\\Connection\\:\\:\\$escapeChar is not the same as PHPDoc type array\\|string of overridden property CodeIgniter\\\\Database\\\\BaseConnection\\\\:\\:\\$escapeChar\\.$#', 'count' => 1, @@ -1031,6 +1501,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Database/OCI8/Builder.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/OCI8/Builder.php', +]; $ignoreErrors[] = [ 'message' => '#^PHPDoc type CodeIgniter\\\\Database\\\\OCI8\\\\Connection of property CodeIgniter\\\\Database\\\\OCI8\\\\Builder\\:\\:\\$db is not the same as PHPDoc type CodeIgniter\\\\Database\\\\BaseConnection of overridden property CodeIgniter\\\\Database\\\\BaseBuilder\\:\\:\\$db\\.$#', 'count' => 1, @@ -1046,6 +1521,21 @@ 'count' => 5, 'path' => __DIR__ . '/system/Database/OCI8/Connection.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, array given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/OCI8/Connection.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, array\\ given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/OCI8/Connection.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, array\\|string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/OCI8/Connection.php', +]; $ignoreErrors[] = [ 'message' => '#^PHPDoc type string of property CodeIgniter\\\\Database\\\\OCI8\\\\Connection\\:\\:\\$escapeChar is not the same as PHPDoc type array\\|string of overridden property CodeIgniter\\\\Database\\\\BaseConnection\\\\:\\:\\$escapeChar\\.$#', 'count' => 1, @@ -1116,6 +1606,11 @@ 'count' => 8, 'path' => __DIR__ . '/system/Database/Postgre/Builder.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, array\\\\|string\\> given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/Postgre/Builder.php', +]; $ignoreErrors[] = [ 'message' => '#^Return type \\(CodeIgniter\\\\Database\\\\BaseBuilder\\) of method CodeIgniter\\\\Database\\\\Postgre\\\\Builder\\:\\:join\\(\\) should be covariant with return type \\(\\$this\\(CodeIgniter\\\\Database\\\\BaseBuilder\\)\\) of method CodeIgniter\\\\Database\\\\BaseBuilder\\:\\:join\\(\\)$#', 'count' => 1, @@ -1401,6 +1896,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Database/SQLite3/Connection.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Database/SQLite3/Connection.php', +]; $ignoreErrors[] = [ 'message' => '#^PHPDoc type string of property CodeIgniter\\\\Database\\\\SQLite3\\\\Connection\\:\\:\\$escapeChar is not the same as PHPDoc type array\\|string of overridden property CodeIgniter\\\\Database\\\\BaseConnection\\\\:\\:\\$escapeChar\\.$#', 'count' => 1, @@ -1496,11 +1996,31 @@ 'count' => 2, 'path' => __DIR__ . '/system/Debug/ExceptionHandler.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Debug/ExceptionHandler.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 3, 'path' => __DIR__ . '/system/Debug/Exceptions.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, Throwable\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Debug/Exceptions.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, int given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Debug/Exceptions.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Debug/Exceptions.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 1, @@ -1552,18 +2072,33 @@ 'path' => __DIR__ . '/system/Debug/Toolbar/Collectors/Views.php', ]; $ignoreErrors[] = [ - 'message' => '#^Accessing offset \'SERVER_ADDR\' directly on \\$_SERVER is discouraged\\.$#', - 'count' => 2, + 'message' => '#^Accessing offset \'SERVER_ADDR\' directly on \\$_SERVER is discouraged\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/Email/Email.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Accessing offset \'SERVER_NAME\' directly on \\$_SERVER is discouraged\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/Email/Email.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', + 'count' => 14, + 'path' => __DIR__ . '/system/Email/Email.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, int given on the left side\\.$#', + 'count' => 1, 'path' => __DIR__ . '/system/Email/Email.php', ]; $ignoreErrors[] = [ - 'message' => '#^Accessing offset \'SERVER_NAME\' directly on \\$_SERVER is discouraged\\.$#', - 'count' => 2, + 'message' => '#^Only booleans are allowed in &&, string given on the right side\\.$#', + 'count' => 1, 'path' => __DIR__ . '/system/Email/Email.php', ]; $ignoreErrors[] = [ - 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', - 'count' => 14, + 'message' => '#^Only booleans are allowed in an if condition, string\\|null given\\.$#', + 'count' => 1, 'path' => __DIR__ . '/system/Email/Email.php', ]; $ignoreErrors[] = [ @@ -1576,11 +2111,21 @@ 'count' => 2, 'path' => __DIR__ . '/system/Encryption/Encryption.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, Config\\\\Encryption\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Encryption/Encryption.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 2, 'path' => __DIR__ . '/system/Encryption/Handlers/OpenSSLHandler.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, array\\|string\\|null given\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/Encryption/Handlers/OpenSSLHandler.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 2, @@ -1671,6 +2216,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Filters/Filters.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, array given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Filters/Filters.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 2, @@ -1686,6 +2236,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/HTTP/CURLRequest.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/HTTP/CURLRequest.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 1, @@ -1701,6 +2256,11 @@ 'count' => 2, 'path' => __DIR__ . '/system/HTTP/DownloadResponse.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/HTTP/DownloadResponse.php', +]; $ignoreErrors[] = [ 'message' => '#^Return type \\(CodeIgniter\\\\HTTP\\\\DownloadResponse\\) of method CodeIgniter\\\\HTTP\\\\DownloadResponse\\:\\:noCache\\(\\) should be covariant with return type \\(\\$this\\(CodeIgniter\\\\HTTP\\\\Response\\)\\) of method CodeIgniter\\\\HTTP\\\\Response\\:\\:noCache\\(\\)$#', 'count' => 1, @@ -1756,6 +2316,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/HTTP/Files/FileCollection.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, array given on the right side\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/HTTP/Files/FileCollection.php', +]; $ignoreErrors[] = [ 'message' => '#^Expression on left side of \\?\\? is not nullable\\.$#', 'count' => 1, @@ -1851,11 +2416,21 @@ 'count' => 3, 'path' => __DIR__ . '/system/HTTP/Negotiate.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/HTTP/OutgoingRequest.php', +]; $ignoreErrors[] = [ 'message' => '#^Return type \\(CodeIgniter\\\\HTTP\\\\URI\\|null\\) of method CodeIgniter\\\\HTTP\\\\OutgoingRequest\\:\\:getUri\\(\\) should be covariant with return type \\(CodeIgniter\\\\HTTP\\\\URI\\) of method CodeIgniter\\\\HTTP\\\\OutgoingRequestInterface\\:\\:getUri\\(\\)$#', 'count' => 1, 'path' => __DIR__ . '/system/HTTP/OutgoingRequest.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, array\\ given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/HTTP/RedirectResponse.php', +]; $ignoreErrors[] = [ 'message' => '#^Variable \\$_GET on left side of \\?\\? always exists and is not nullable\\.$#', 'count' => 1, @@ -1871,6 +2446,11 @@ 'count' => 3, 'path' => __DIR__ . '/system/HTTP/Request.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/HTTP/Request.php', +]; $ignoreErrors[] = [ 'message' => '#^Accessing offset \'REQUEST_METHOD\' directly on \\$_SERVER is discouraged\\.$#', 'count' => 3, @@ -1891,6 +2471,21 @@ 'count' => 6, 'path' => __DIR__ . '/system/HTTP/Response.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, string\\|null given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/HTTP/Response.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, string\\|null given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/HTTP/Response.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string\\|null given\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/HTTP/Response.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 5, @@ -1901,6 +2496,11 @@ 'count' => 4, 'path' => __DIR__ . '/system/HTTP/SiteURI.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/HTTP/SiteURI.php', +]; $ignoreErrors[] = [ 'message' => '#^Strict comparison using \\!\\=\\= between mixed and null will always evaluate to true\\.$#', 'count' => 1, @@ -1911,6 +2511,16 @@ 'count' => 15, 'path' => __DIR__ . '/system/HTTP/URI.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/HTTP/URI.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string\\|null given\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/HTTP/URI.php', +]; $ignoreErrors[] = [ 'message' => '#^Property CodeIgniter\\\\HTTP\\\\URI\\:\\:\\$fragment \\(string\\) on left side of \\?\\? is not nullable\\.$#', 'count' => 1, @@ -1946,6 +2556,11 @@ 'count' => 3, 'path' => __DIR__ . '/system/HTTP/UserAgent.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, array\\ given on the right side\\.$#', + 'count' => 4, + 'path' => __DIR__ . '/system/HTTP/UserAgent.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 3, @@ -1956,6 +2571,66 @@ 'count' => 1, 'path' => __DIR__ . '/system/Helpers/date_helper.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\<0, 1024\\> given\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/Helpers/filesystem_helper.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\<0, 128\\> given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/filesystem_helper.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\<0, 16\\> given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/filesystem_helper.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\<0, 1\\> given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/filesystem_helper.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\<0, 2048\\> given\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/Helpers/filesystem_helper.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\<0, 256\\> given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/filesystem_helper.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\<0, 2\\> given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/filesystem_helper.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\<0, 32\\> given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/filesystem_helper.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\<0, 4\\> given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/filesystem_helper.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\<0, 512\\> given\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/Helpers/filesystem_helper.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\<0, 64\\> given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/filesystem_helper.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, int\\<0, 8\\> given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/filesystem_helper.php', +]; $ignoreErrors[] = [ 'message' => '#^Right side of && is always true\\.$#', 'count' => 1, @@ -1981,11 +2656,31 @@ 'count' => 4, 'path' => __DIR__ . '/system/Helpers/form_helper.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, array given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/form_helper.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, int\\<0, max\\> given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/form_helper.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/form_helper.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 6, 'path' => __DIR__ . '/system/Helpers/html_helper.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/html_helper.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 2, @@ -1996,11 +2691,21 @@ 'count' => 2, 'path' => __DIR__ . '/system/Helpers/test_helper.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, array\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/test_helper.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 3, 'path' => __DIR__ . '/system/Helpers/text_helper.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, string\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/text_helper.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 2, @@ -2011,6 +2716,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Helpers/url_helper.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Helpers/url_helper.php', +]; $ignoreErrors[] = [ 'message' => '#^Variable \\$atts might not be defined\\.$#', 'count' => 1, @@ -2021,6 +2731,11 @@ 'count' => 2, 'path' => __DIR__ . '/system/Honeypot/Honeypot.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in \\|\\|, int given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/HotReloader/HotReloader.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 3, @@ -2141,6 +2856,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Log/Logger.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, array given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Log/Logger.php', +]; $ignoreErrors[] = [ 'message' => '#^Parameter \\#1 \\$level \\(string\\) of method CodeIgniter\\\\Log\\\\Logger\\:\\:log\\(\\) should be contravariant with parameter \\$level \\(mixed\\) of method Psr\\\\Log\\\\LoggerInterface\\:\\:log\\(\\)$#', 'count' => 1, @@ -2156,6 +2876,26 @@ 'count' => 1, 'path' => __DIR__ . '/system/Model.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, array given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Model.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, string given on the right side\\.$#', + 'count' => 3, + 'path' => __DIR__ . '/system/Model.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, string\\|null given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Model.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, array\\|int\\|string\\|null given\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/Model.php', +]; $ignoreErrors[] = [ 'message' => '#^Return type \\(array\\|bool\\|float\\|int\\|object\\|string\\|null\\) of method CodeIgniter\\\\Model\\:\\:__call\\(\\) should be covariant with return type \\(\\$this\\(CodeIgniter\\\\BaseModel\\)\\|null\\) of method CodeIgniter\\\\BaseModel\\:\\:__call\\(\\)$#', 'count' => 1, @@ -2176,6 +2916,16 @@ 'count' => 4, 'path' => __DIR__ . '/system/Pager/Pager.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, array given\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/Pager/Pager.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, int given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Pager/Pager.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 1, @@ -2196,6 +2946,11 @@ 'count' => 4, 'path' => __DIR__ . '/system/RESTful/BaseResource.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, object\\|string\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/RESTful/BaseResource.php', +]; $ignoreErrors[] = [ 'message' => '#^PHPDoc type CodeIgniter\\\\HTTP\\\\CLIRequest\\|CodeIgniter\\\\HTTP\\\\IncomingRequest of property CodeIgniter\\\\RESTful\\\\BaseResource\\:\\:\\$request is not the same as PHPDoc type CodeIgniter\\\\HTTP\\\\RequestInterface of overridden property CodeIgniter\\\\Controller\\:\\:\\$request\\.$#', 'count' => 1, @@ -2211,6 +2966,11 @@ 'count' => 6, 'path' => __DIR__ . '/system/Router/AutoRouter.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, string\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Router/AutoRouter.php', +]; $ignoreErrors[] = [ 'message' => '#^Property CodeIgniter\\\\Router\\\\AutoRouter\\:\\:\\$cliRoutes type has no signature specified for Closure\\.$#', 'count' => 1, @@ -2221,6 +2981,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Router/AutoRouter.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, Config\\\\Routing given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Router/AutoRouterImproved.php', +]; $ignoreErrors[] = [ 'message' => '#^PHPDoc type int of property CodeIgniter\\\\Router\\\\Exceptions\\\\RedirectException\\:\\:\\$code is not the same as PHPDoc type mixed of overridden property Exception\\:\\:\\$code\\.$#', 'count' => 1, @@ -2311,6 +3076,21 @@ 'count' => 1, 'path' => __DIR__ . '/system/Router/RouteCollection.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, array\\ given on the left side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Router/RouteCollection.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Router/RouteCollection.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, string\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Router/RouteCollection.php', +]; $ignoreErrors[] = [ 'message' => '#^Property CodeIgniter\\\\Router\\\\RouteCollection\\:\\:\\$override404 type has no signature specified for Closure\\.$#', 'count' => 1, @@ -2466,6 +3246,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Session/Handlers/Database/PostgreHandler.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, mixed given\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/Session/Handlers/Database/PostgreHandler.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 2, @@ -2486,6 +3271,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Session/Handlers/FileHandler.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, string given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Session/Handlers/FileHandler.php', +]; $ignoreErrors[] = [ '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, @@ -2501,11 +3291,26 @@ 'count' => 3, 'path' => __DIR__ . '/system/Session/Handlers/MemcachedHandler.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, mixed given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Session/Handlers/MemcachedHandler.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 5, 'path' => __DIR__ . '/system/Session/Handlers/RedisHandler.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in &&, string given on the right side\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Session/Handlers/RedisHandler.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, int given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Session/Handlers/RedisHandler.php', +]; $ignoreErrors[] = [ 'message' => '#^Accessing offset \'HTTP_X_REQUESTED_WITH\' directly on \\$_SERVER is discouraged\\.$#', 'count' => 2, @@ -2781,6 +3586,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Test/CIUnitTestCase.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, CodeIgniter\\\\CodeIgniter given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Test/CIUnitTestCase.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 1, @@ -2911,6 +3721,16 @@ 'count' => 1, 'path' => __DIR__ . '/system/Test/FeatureTestCase.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, CodeIgniter\\\\Router\\\\RouteCollection\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Test/FeatureTestCase.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, array\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Test/FeatureTestCase.php', +]; $ignoreErrors[] = [ 'message' => '#^Property CodeIgniter\\\\Test\\\\CIUnitTestCase\\:\\:\\$bodyFormat \\(string\\) in isset\\(\\) is not nullable\\.$#', 'count' => 1, @@ -3391,6 +4211,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Validation/DotArrayFilter.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a negated boolean, array\\|null given\\.$#', + 'count' => 6, + 'path' => __DIR__ . '/system/Validation/FileRules.php', +]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 4, @@ -3416,6 +4241,11 @@ 'count' => 1, 'path' => __DIR__ . '/system/Validation/Validation.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, array given\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/Validation/Validation.php', +]; $ignoreErrors[] = [ 'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#', 'count' => 2, @@ -3466,6 +4296,16 @@ 'count' => 9, 'path' => __DIR__ . '/system/View/Table.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in a ternary operator condition, float given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/View/Table.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string\\|null given\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/View/Table.php', +]; $ignoreErrors[] = [ 'message' => '#^Property CodeIgniter\\\\View\\\\Table\\:\\:\\$function type has no signature specified for callable\\.$#', 'count' => 1, @@ -3476,6 +4316,11 @@ 'count' => 3, 'path' => __DIR__ . '/system/View/View.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Only booleans are allowed in an if condition, string\\|null given\\.$#', + 'count' => 2, + 'path' => __DIR__ . '/system/View/View.php', +]; $ignoreErrors[] = [ 'message' => '#^Parameter \\#2 \\$context \\(\'attr\'\\|\'css\'\\|\'html\'\\|\'js\'\\|\'raw\'\\|\'url\'\\|null\\) of method CodeIgniter\\\\View\\\\View\\:\\:setData\\(\\) should be contravariant with parameter \\$context \\(string\\|null\\) of method CodeIgniter\\\\View\\\\RendererInterface\\:\\:setData\\(\\)$#', 'count' => 1,