diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index ddaebefa16..fcd3faa093 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -13120,11 +13120,41 @@ parameters: count: 2 path: src/Operations.php + - + message: "#^Cannot access offset 0 on mixed\\.$#" + count: 4 + path: src/ParseAnalyze.php + + - + message: "#^Cannot access offset 1 on mixed\\.$#" + count: 2 + path: src/ParseAnalyze.php + - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" count: 2 path: src/ParseAnalyze.php + - + message: "#^Offset 'select_tables' on array\\{distinct\\?\\: bool, drop_database\\?\\: bool, group\\?\\: bool, having\\?\\: bool, is_affected\\?\\: bool, is_analyse\\?\\: bool, is_count\\?\\: bool, is_delete\\?\\: bool, \\.\\.\\.\\}&array\\{select_expr\\?\\: array\\, select_tables\\?\\: array\\, statement\\?\\: PhpMyAdmin\\\\SqlParser\\\\Statement\\|null, parser\\?\\: PhpMyAdmin\\\\SqlParser\\\\Parser\\} in empty\\(\\) does not exist\\.$#" + count: 1 + path: src/ParseAnalyze.php + + - + message: "#^Parameter \\#1 \\$info of static method PhpMyAdmin\\\\StatementInfo\\:\\:fromArray\\(\\) expects array\\{distinct\\: bool, drop_database\\: bool, group\\: bool, having\\: bool, is_affected\\: bool, is_analyse\\: bool, is_count\\: bool, is_delete\\: bool, \\.\\.\\.\\}, array\\{distinct\\?\\: bool, drop_database\\?\\: bool, group\\?\\: bool, having\\?\\: bool, is_affected\\?\\: bool, is_analyse\\?\\: bool, is_count\\?\\: bool, is_delete\\?\\: bool, \\.\\.\\.\\}&array\\{select_expr\\?\\: array\\, select_tables\\?\\: array\\, statement\\?\\: PhpMyAdmin\\\\SqlParser\\\\Statement\\|null, parser\\?\\: PhpMyAdmin\\\\SqlParser\\\\Parser\\} given\\.$#" + count: 1 + path: src/ParseAnalyze.php + + - + message: "#^Parameter \\#1 \\$string1 of function strcasecmp expects string, mixed given\\.$#" + count: 1 + path: src/ParseAnalyze.php + + - + message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#" + count: 1 + path: src/ParseAnalyze.php + - message: "#^Cannot access offset 'Table' on mixed\\.$#" count: 4 @@ -17955,6 +17985,11 @@ parameters: count: 1 path: src/Sql.php + - + message: "#^Parameter \\#1 \\$info of static method PhpMyAdmin\\\\StatementInfo\\:\\:fromArray\\(\\) expects array\\{distinct\\: bool, drop_database\\: bool, group\\: bool, having\\: bool, is_affected\\: bool, is_analyse\\: bool, is_count\\: bool, is_delete\\: bool, \\.\\.\\.\\}, array\\{distinct\\?\\: bool, drop_database\\?\\: bool, group\\?\\: bool, having\\?\\: bool, is_affected\\?\\: bool, is_analyse\\?\\: bool, is_count\\?\\: bool, is_delete\\?\\: bool, \\.\\.\\.\\}&array\\{select_expr\\?\\: array\\, select_tables\\?\\: array\\, statement\\?\\: PhpMyAdmin\\\\SqlParser\\\\Statement\\|null, parser\\?\\: PhpMyAdmin\\\\SqlParser\\\\Parser\\} given\\.$#" + count: 1 + path: src/Sql.php + - message: "#^Parameter \\#1 \\$rows of static method PhpMyAdmin\\\\Message\\:\\:getMessageForAffectedRows\\(\\) expects int, int\\|string given\\.$#" count: 2 @@ -20525,6 +20560,11 @@ parameters: count: 2 path: test/classes/Display/ResultsTest.php + - + message: "#^Parameter \\#1 \\$info of static method PhpMyAdmin\\\\StatementInfo\\:\\:fromArray\\(\\) expects array\\{distinct\\: bool, drop_database\\: bool, group\\: bool, having\\: bool, is_affected\\: bool, is_analyse\\: bool, is_count\\: bool, is_delete\\: bool, \\.\\.\\.\\}, array\\{distinct\\?\\: bool, drop_database\\?\\: bool, group\\?\\: bool, having\\?\\: bool, is_affected\\?\\: bool, is_analyse\\?\\: bool, is_count\\?\\: bool, is_delete\\?\\: bool, \\.\\.\\.\\}&array\\{select_expr\\?\\: array\\, select_tables\\?\\: array\\, statement\\?\\: PhpMyAdmin\\\\SqlParser\\\\Statement\\|null, parser\\?\\: PhpMyAdmin\\\\SqlParser\\\\Parser\\} given\\.$#" + count: 3 + path: test/classes/Display/ResultsTest.php + - message: "#^Parameter \\#1 \\$string of function htmlspecialchars_decode expects string, mixed given\\.$#" count: 1 diff --git a/phpstan.neon.dist b/phpstan.neon.dist index f52f62eed7..f8dacbca2c 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -13,7 +13,6 @@ parameters: bootstrapFiles: - test/phpstan-constants.php stubFiles: - - test/stubs/Query.stub - test/stubs/uploadprogress.stub excludePaths: - libraries/cache/* diff --git a/psalm-baseline.xml b/psalm-baseline.xml index f34e75ebbf..6e2c714d94 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -7959,6 +7959,11 @@ + + + $info + + @@ -9628,13 +9633,6 @@ - - Config::getInstance() - DatabaseInterface::getInstance() - - - $sqlStatements - @@ -9645,16 +9643,22 @@ + $dbfFileName $dbfFilePath $dbfFilePath - $gisType + $extracted + $result + getDBFHeader()]]> $c[0] + $dbfHeader[$n] $dbfHeader[$n][0] + $analyses[$tableNo][Import::FORMATTEDSQL] $analyses[$tableNo][Import::FORMATTEDSQL][$spatialCol] + $analyses[$tableNo][Import::TYPES] $analyses[$tableNo][Import::TYPES][$spatialCol] @@ -9665,29 +9669,38 @@ + + + + $analyses[] $c $colNames[] + $config + $dbfFileName + $dbfFileName + $dbfHeader + $extracted + $result + $temp - getShape($record->shpData)]]> + $dbfFileName + $temp - - $analyses[$tableNo][Import::FORMATTEDSQL] - $analyses[$tableNo][Import::TYPES] - + + settings]]> + + + $sqlStatements + string[] + - - - getDBFHeader()]]> - - getDBFHeader()]]> - string[] @@ -11749,6 +11762,9 @@ + + Query::getAll($fullSqlQuery) + Config::getInstance() Config::getInstance() @@ -14472,6 +14488,11 @@ + + Query::getAll($query) + Query::getAll($query) + + Config::getInstance() Config::getInstance() @@ -15527,7 +15548,6 @@ - assertFalse diff --git a/psalm.xml b/psalm.xml index 83216d72f7..49aead2859 100644 --- a/psalm.xml +++ b/psalm.xml @@ -30,7 +30,6 @@ - diff --git a/test/stubs/Query.stub b/test/stubs/Query.stub deleted file mode 100644 index 9a09dacd5c..0000000000 --- a/test/stubs/Query.stub +++ /dev/null @@ -1,53 +0,0 @@ -, - * select_expr?: list - * } - */ - public static function getAll($query); -}