diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 1070902349..a45bcaef22 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -30,6 +30,11 @@ parameters: count: 1 path: libraries/classes/Advisory/Advisor.php + - + message: "#^Parameter \\#3 \\$subject of function preg_replace_callback expects array\\|string, array\\\\|string\\|null given\\.$#" + count: 1 + path: libraries/classes/Advisory/Advisor.php + - message: "#^Property PhpMyAdmin\\\\Advisory\\\\Advisor\\:\\:\\$globals type has no value type specified in iterable type array\\.$#" count: 1 @@ -837,7 +842,7 @@ parameters: - message: "#^Casting to string something that's already string\\.$#" - count: 3 + count: 4 path: libraries/classes/ConfigStorage/Relation.php - @@ -1025,6 +1030,11 @@ parameters: count: 1 path: libraries/classes/Controllers/Database/CentralColumnsController.php + - + message: "#^Parameter \\#2 \\$field_select of method PhpMyAdmin\\\\Database\\\\CentralColumns\\:\\:deleteColumnsFromList\\(\\) expects array, array\\\\|string given\\.$#" + count: 1 + path: libraries/classes/Controllers/Database/CentralColumnsController.php + - message: "#^Cannot cast mixed to string\\.$#" count: 1 @@ -1360,6 +1370,11 @@ parameters: count: 1 path: libraries/classes/Controllers/HomeController.php + - + message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, array\\\\|string\\|null given\\.$#" + count: 1 + path: libraries/classes/Controllers/Import/ImportController.php + - message: "#^Cannot access offset 'eventEditor' on mixed\\.$#" count: 1 @@ -1625,6 +1640,11 @@ parameters: count: 1 path: libraries/classes/Controllers/Table/RelationController.php + - + message: "#^Argument of an invalid type array\\\\|string supplied for foreach, only iterables are supported\\.$#" + count: 1 + path: libraries/classes/Controllers/Table/ReplaceController.php + - message: "#^Call to function method_exists\\(\\) with PhpMyAdmin\\\\Plugins\\\\IOTransformationsPlugin and 'isSuccess' will always evaluate to true\\.$#" count: 1 @@ -1645,6 +1665,21 @@ parameters: count: 1 path: libraries/classes/Controllers/Table/SearchController.php + - + message: "#^Parameter \\#1 \\$str of function strtoupper expects string, array\\\\|string\\|null given\\.$#" + count: 1 + path: libraries/classes/Controllers/Table/SearchController.php + + - + message: "#^Parameter \\#1 \\$type of method PhpMyAdmin\\\\Types\\:\\:getIntegerRange\\(\\) expects string, array\\\\|string\\|null given\\.$#" + count: 1 + path: libraries/classes/Controllers/Table/SearchController.php + + - + message: "#^Parameter \\#1 \\$type of method PhpMyAdmin\\\\Types\\:\\:getTypeOperatorsHtml\\(\\) expects string, array\\\\|string\\|null given\\.$#" + count: 1 + path: libraries/classes/Controllers/Table/SearchController.php + - message: "#^Parameter \\#2 \\$foreign_field of method PhpMyAdmin\\\\ConfigStorage\\\\Relation\\:\\:foreignDropdown\\(\\) expects string, mixed given\\.$#" count: 1 @@ -1905,6 +1940,21 @@ parameters: count: 1 path: libraries/classes/Controllers/Table/ZoomSearchController.php + - + message: "#^Parameter \\#1 \\$str of function strtoupper expects string, array\\\\|string\\|null given\\.$#" + count: 1 + path: libraries/classes/Controllers/Table/ZoomSearchController.php + + - + message: "#^Parameter \\#1 \\$type of method PhpMyAdmin\\\\Types\\:\\:getIntegerRange\\(\\) expects string, array\\\\|string\\|null given\\.$#" + count: 1 + path: libraries/classes/Controllers/Table/ZoomSearchController.php + + - + message: "#^Parameter \\#1 \\$type of method PhpMyAdmin\\\\Types\\:\\:getTypeOperatorsHtml\\(\\) expects string, array\\\\|string\\|null given\\.$#" + count: 1 + path: libraries/classes/Controllers/Table/ZoomSearchController.php + - message: "#^Parameter \\#2 \\$column_index of method PhpMyAdmin\\\\Controllers\\\\Table\\\\ZoomSearchController\\:\\:getColumnProperties\\(\\) expects int, int\\|string\\|false given\\.$#" count: 1 @@ -1970,6 +2020,11 @@ parameters: count: 1 path: libraries/classes/Controllers/View/CreateController.php + - + message: "#^Binary operation \"\\*\" between string and 1024\\|1048576\\|1073741824\\|1099511627776 results in an error\\.$#" + count: 1 + path: libraries/classes/Core.php + - message: "#^Casting to string something that's already string\\.$#" count: 3 @@ -3125,11 +3180,6 @@ parameters: count: 1 path: libraries/classes/Display/Results.php - - - message: "#^Method PhpMyAdmin\\\\Display\\\\Results\\:\\:getOffsets\\(\\) should return array\\ but returns array\\\\.$#" - count: 1 - path: libraries/classes/Display/Results.php - - message: "#^Method PhpMyAdmin\\\\Display\\\\Results\\:\\:getOptionsBlock\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -4400,6 +4450,11 @@ parameters: count: 1 path: libraries/classes/Header.php + - + message: "#^Cannot cast array\\\\|string\\|null to string\\.$#" + count: 1 + path: libraries/classes/Html/Generator.php + - message: "#^Casting to string something that's already string\\.$#" count: 1 @@ -4595,6 +4650,11 @@ parameters: count: 2 path: libraries/classes/Import.php + - + message: "#^Parameter \\#1 \\$sql of method PhpMyAdmin\\\\Import\\:\\:runQuery\\(\\) expects string, array\\\\|string\\|null given\\.$#" + count: 1 + path: libraries/classes/Import.php + - message: "#^Method PhpMyAdmin\\\\Import\\\\Ajax\\:\\:uploadProgressSetup\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -4905,6 +4965,11 @@ parameters: count: 1 path: libraries/classes/InsertEdit.php + - + message: "#^Method PhpMyAdmin\\\\InsertEdit\\:\\:loadFirstRow\\(\\) should return array\\{PhpMyAdmin\\\\Dbal\\\\ResultInterface, array\\\\} but returns array\\{PhpMyAdmin\\\\Dbal\\\\ResultInterface, array\\\\|false\\}\\.$#" + count: 1 + path: libraries/classes/InsertEdit.php + - message: "#^Method PhpMyAdmin\\\\InsertEdit\\:\\:showEmptyResultMessageOrSetUniqueCondition\\(\\) has parameter \\$rows with no value type specified in iterable type array\\.$#" count: 1 @@ -5015,6 +5080,11 @@ parameters: count: 1 path: libraries/classes/InternalRelations.php + - + message: "#^Binary operation \"\\-\" between string and 1 results in an error\\.$#" + count: 1 + path: libraries/classes/IpAllowDeny.php + - message: "#^Parameter \\#2 \\$ipToTest of method PhpMyAdmin\\\\IpAllowDeny\\:\\:ipMaskTest\\(\\) expects string, string\\|true given\\.$#" count: 1 @@ -5670,6 +5740,11 @@ parameters: count: 1 path: libraries/classes/Plugins/Auth/AuthenticationCookie.php + - + message: "#^Binary operation \"\\.\" between 'WWW\\-Authenticate\\:…' and array\\\\|string\\|null results in an error\\.$#" + count: 1 + path: libraries/classes/Plugins/Auth/AuthenticationHttp.php + - message: "#^Property PhpMyAdmin\\\\Plugins\\\\AuthenticationPlugin\\:\\:\\$user \\(string\\) in isset\\(\\) is not nullable\\.$#" count: 1 @@ -5820,11 +5895,21 @@ parameters: count: 1 path: libraries/classes/Plugins/Export/ExportPdf.php + - + message: "#^Binary operation \"\\.\" between '_' and array\\\\|string\\|null results in an error\\.$#" + count: 1 + path: libraries/classes/Plugins/Export/ExportPhparray.php + - message: "#^Method PhpMyAdmin\\\\Plugins\\\\Export\\\\ExportPhparray\\:\\:exportData\\(\\) has parameter \\$aliases with no value type specified in iterable type array\\.$#" count: 1 path: libraries/classes/Plugins/Export/ExportPhparray.php + - + message: "#^Parameter \\#2 \\$subject of function preg_match expects string, array\\\\|string\\|null given\\.$#" + count: 1 + path: libraries/classes/Plugins/Export/ExportPhparray.php + - message: "#^Binary operation \"\\.\" between 'FOREIGN KEY ' and array\\|string results in an error\\.$#" count: 1 @@ -5910,6 +5995,11 @@ parameters: count: 5 path: libraries/classes/Plugins/Export/ExportSql.php + - + message: "#^Parameter \\#1 \\$list of class PhpMyAdmin\\\\SqlParser\\\\Parser constructor expects PhpMyAdmin\\\\SqlParser\\\\TokensList\\|PhpMyAdmin\\\\SqlParser\\\\UtfString\\|string\\|null, array\\\\|string\\|null given\\.$#" + count: 1 + path: libraries/classes/Plugins/Export/ExportSql.php + - message: "#^Parameter \\#1 \\$sqlQuery of method PhpMyAdmin\\\\Plugins\\\\Export\\\\ExportSql\\:\\:replaceWithAliases\\(\\) expects string, string\\|null given\\.$#" count: 1 @@ -7200,6 +7290,11 @@ parameters: count: 1 path: libraries/classes/Server/Plugins.php + - + message: "#^Binary operation \"\\.\" between 'PASSWORD\\(\\\\'' and array\\\\|string\\|null results in an error\\.$#" + count: 2 + path: libraries/classes/Server/Privileges.php + - message: "#^Casting to string something that's already string\\.$#" count: 1 @@ -7855,6 +7950,11 @@ parameters: count: 1 path: libraries/classes/Sql.php + - + message: "#^Method PhpMyAdmin\\\\Sql\\:\\:getDetailedProfilingStats\\(\\) should return array\\ but returns array\\\\|float\\|int\\>\\.$#" + count: 1 + path: libraries/classes/Sql.php + - message: "#^Method PhpMyAdmin\\\\Sql\\:\\:getHtmlForPreviousUpdateQuery\\(\\) has parameter \\$sqlData with no value type specified in iterable type array\\.$#" count: 1 @@ -8270,6 +8370,11 @@ parameters: count: 1 path: libraries/classes/Table/ColumnsDefinition.php + - + message: "#^Parameter \\#1 \\$str of function rtrim expects string, array\\\\|string\\|null given\\.$#" + count: 1 + path: libraries/classes/Table/ColumnsDefinition.php + - message: "#^Parameter \\#2 \\$str of function explode expects string, mixed given\\.$#" count: 1 @@ -8360,6 +8465,11 @@ parameters: count: 2 path: libraries/classes/ThemeManager.php + - + message: "#^Binary operation \"\\.\" between non\\-falsy\\-string and array\\\\|string\\|null results in an error\\.$#" + count: 1 + path: libraries/classes/Tracker.php + - message: "#^Cannot access property \\$table on PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|string\\.$#" count: 1 @@ -9151,7 +9261,7 @@ parameters: path: test/classes/Command/SetVersionCommandTest.php - - message: "#^Parameter \\#1 \\$array_arg of function sort expects array, mixed given\\.$#" + message: "#^Parameter \\#1 \\$array_arg of function sort expects TArray of array\\, mixed given\\.$#" count: 2 path: test/classes/Command/TwigLintCommandTest.php @@ -9355,6 +9465,11 @@ parameters: count: 1 path: test/classes/ConfigTest.php + - + message: "#^Parameter \\#1 \\$haystack of function mb_strstr expects string, array\\ given\\.$#" + count: 1 + path: test/classes/ConfigTest.php + - message: "#^Cannot access offset 'favoriteTables' on mixed\\.$#" count: 1 @@ -9905,6 +10020,11 @@ parameters: count: 4 path: test/classes/Display/ResultsTest.php + - + message: "#^Strict comparison using \\=\\=\\= between 4 and 4 will always evaluate to true\\.$#" + count: 1 + path: test/classes/EncodingTest.php + - message: "#^Method PhpMyAdmin\\\\Tests\\\\Engines\\\\PbxtTest\\:\\:providerFortTestResolveTypeSize\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1