diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 5b087ee5d7..95e74d60c1 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -2537,7 +2537,7 @@ parameters: - message: "#^Cannot access offset 'db' on mixed\\.$#" - count: 2 + count: 1 path: src/Controllers/Database/Structure/FavoriteTableController.php - @@ -2547,7 +2547,7 @@ parameters: - message: "#^Cannot access offset 'table' on mixed\\.$#" - count: 2 + count: 1 path: src/Controllers/Database/Structure/FavoriteTableController.php - @@ -2735,16 +2735,6 @@ parameters: count: 1 path: src/Controllers/Database/StructureController.php - - - message: "#^Cannot access offset 'db' on mixed\\.$#" - count: 1 - path: src/Controllers/Database/StructureController.php - - - - message: "#^Cannot access offset 'table' on mixed\\.$#" - count: 1 - path: src/Controllers/Database/StructureController.php - - message: "#^Only booleans are allowed in &&, int\\|false given on the right side\\.$#" count: 1 @@ -10280,11 +10270,6 @@ parameters: count: 1 path: src/Export/Template.php - - - message: "#^Cannot access offset 'db' on mixed\\.$#" - count: 6 - path: src/Favorites/RecentFavoriteTable.php - - message: "#^Cannot access offset 'favoriteTables'\\|'recentTables' on mixed\\.$#" count: 3 @@ -10295,11 +10280,6 @@ parameters: count: 1 path: src/Favorites/RecentFavoriteTable.php - - - message: "#^Cannot access offset 'table' on mixed\\.$#" - count: 6 - path: src/Favorites/RecentFavoriteTable.php - - message: "#^Cannot access offset mixed on mixed\\.$#" count: 3 @@ -10330,33 +10310,13 @@ parameters: count: 2 path: src/Favorites/RecentFavoriteTable.php - - - message: "#^Parameter \\#1 \\$database of method PhpMyAdmin\\\\DatabaseInterface\\:\\:getColumns\\(\\) expects string, mixed given\\.$#" - count: 1 - path: src/Favorites/RecentFavoriteTable.php - - - - message: "#^Parameter \\#1 \\$db of method PhpMyAdmin\\\\Favorites\\\\RecentFavoriteTable\\:\\:remove\\(\\) expects string, mixed given\\.$#" - count: 1 - path: src/Favorites/RecentFavoriteTable.php - - message: "#^Parameter \\#1 \\$str of method PhpMyAdmin\\\\DatabaseInterface\\:\\:quoteString\\(\\) expects string, string\\|false given\\.$#" count: 1 path: src/Favorites/RecentFavoriteTable.php - - message: "#^Parameter \\#2 \\$table of method PhpMyAdmin\\\\DatabaseInterface\\:\\:getColumns\\(\\) expects string, mixed given\\.$#" - count: 1 - path: src/Favorites/RecentFavoriteTable.php - - - - message: "#^Parameter \\#2 \\$table of method PhpMyAdmin\\\\Favorites\\\\RecentFavoriteTable\\:\\:remove\\(\\) expects string, mixed given\\.$#" - count: 1 - path: src/Favorites/RecentFavoriteTable.php - - - - message: "#^Property PhpMyAdmin\\\\Favorites\\\\RecentFavoriteTable\\:\\:\\$tables \\(array\\) does not accept mixed\\.$#" + message: "#^Property PhpMyAdmin\\\\Favorites\\\\RecentFavoriteTable\\:\\:\\$tables \\(array\\\\) does not accept mixed\\.$#" count: 1 path: src/Favorites/RecentFavoriteTable.php diff --git a/psalm-baseline.xml b/psalm-baseline.xml index bd904a3290..beee069242 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1501,8 +1501,6 @@ - - @@ -1516,7 +1514,6 @@ $favoriteTables $favoriteTables $value - $value @@ -1647,8 +1644,6 @@ - - @@ -1671,7 +1666,6 @@ $truename $updateTime $updateTimeAll - $value getCharset @@ -5936,50 +5930,20 @@ DatabaseInterface::getInstance() DatabaseInterface::getInstance() - - - - - - tableType->value . 'Tables']]]> tableType->value . 'Tables'][$serverId]]]> - - - - - - - - - - - - - - - - tableType->value . 'Tables']]]> tableType->value . 'Tables'][$serverId]]]> - $table - $table - $tbl tables]]> - $value mixed[] - - - - json_decode($value, true) @@ -5990,9 +5954,6 @@ bool|Message - - tables =& $_SESSION['tmpval'][$this->tableType->value . 'Tables'][$serverId]]]> - diff --git a/src/Favorites/RecentFavoriteTable.php b/src/Favorites/RecentFavoriteTable.php index 9e5886cdc7..88af6b7342 100644 --- a/src/Favorites/RecentFavoriteTable.php +++ b/src/Favorites/RecentFavoriteTable.php @@ -43,7 +43,7 @@ class RecentFavoriteTable /** * Reference to session variable containing recently used or favorite tables. * - * @var mixed[] + * @var array{db:string, table:string}[] */ private array $tables = []; @@ -90,7 +90,7 @@ class RecentFavoriteTable /** * Returns the recent/favorite tables array * - * @return mixed[] + * @return array{db:string, table:string}[] */ public function getTables(): array {