From fb130367a03c5ab1aa9719fdff5cdba685927096 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Tue, 17 Dec 2024 21:56:46 +0000 Subject: [PATCH] Fix type hints Signed-off-by: Kamil Tekiela --- phpstan-baseline.neon | 14 ++++---------- psalm-baseline.xml | 25 ++++++------------------- src/Table/Table.php | 10 +++++----- 3 files changed, 15 insertions(+), 34 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 3e0e1d43ff..bc2c4acc87 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -4678,7 +4678,7 @@ parameters: path: src/Controllers/Table/RelationController.php - - message: '#^Parameter \#1 \$multiEditColumnsName of method PhpMyAdmin\\Table\\Table\:\:updateInternalRelations\(\) expects array\, mixed given\.$#' + message: '#^Parameter \#1 \$multiEditColumnsName of method PhpMyAdmin\\Table\\Table\:\:updateInternalRelations\(\) expects array\, mixed given\.$#' identifier: argument.type count: 1 path: src/Controllers/Table/RelationController.php @@ -4690,7 +4690,7 @@ parameters: path: src/Controllers/Table/RelationController.php - - message: '#^Parameter \#2 \$destinationDb of method PhpMyAdmin\\Table\\Table\:\:updateInternalRelations\(\) expects array\, mixed given\.$#' + message: '#^Parameter \#2 \$destinationDb of method PhpMyAdmin\\Table\\Table\:\:updateInternalRelations\(\) expects array\, mixed given\.$#' identifier: argument.type count: 1 path: src/Controllers/Table/RelationController.php @@ -4720,7 +4720,7 @@ parameters: path: src/Controllers/Table/RelationController.php - - message: '#^Parameter \#3 \$destinationTable of method PhpMyAdmin\\Table\\Table\:\:updateInternalRelations\(\) expects array\, mixed given\.$#' + message: '#^Parameter \#3 \$destinationTable of method PhpMyAdmin\\Table\\Table\:\:updateInternalRelations\(\) expects array\, mixed given\.$#' identifier: argument.type count: 1 path: src/Controllers/Table/RelationController.php @@ -4732,7 +4732,7 @@ parameters: path: src/Controllers/Table/RelationController.php - - message: '#^Parameter \#4 \$destinationColumn of method PhpMyAdmin\\Table\\Table\:\:updateInternalRelations\(\) expects array\, mixed given\.$#' + message: '#^Parameter \#4 \$destinationColumn of method PhpMyAdmin\\Table\\Table\:\:updateInternalRelations\(\) expects array\, mixed given\.$#' identifier: argument.type count: 1 path: src/Controllers/Table/RelationController.php @@ -17337,12 +17337,6 @@ parameters: count: 3 path: src/Table/Table.php - - - message: '#^Parameter \#1 \$str of method PhpMyAdmin\\DatabaseInterface\:\:quoteString\(\) expects string, mixed given\.$#' - identifier: argument.type - count: 9 - path: src/Table/Table.php - - message: '#^Parameter \#1 \$string of function substr expects string, mixed given\.$#' identifier: argument.type diff --git a/psalm-baseline.xml b/psalm-baseline.xml index e01098506a..dc7b1863d6 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -2982,16 +2982,17 @@ + + + + - - - @@ -2999,7 +3000,6 @@ - @@ -9929,17 +9929,8 @@ - - - - - - - - - uiprefs[$property->value]]]> @@ -9970,8 +9961,6 @@ - - @@ -9979,11 +9968,7 @@ - - - - @@ -10033,9 +10018,11 @@ onDelete)]]> onUpdate)]]> + + uiprefs =& $_SESSION['tmpval']['table_uiprefs'][$serverId][$this->dbName][$this->name]]]> diff --git a/src/Table/Table.php b/src/Table/Table.php index b25d46d23f..28b49ba638 100644 --- a/src/Table/Table.php +++ b/src/Table/Table.php @@ -1355,11 +1355,11 @@ class Table implements Stringable /** * Function to get update query for updating internal relations * - * @param mixed[] $multiEditColumnsName multi edit column names - * @param mixed[] $destinationDb destination tables - * @param mixed[] $destinationTable destination tables - * @param mixed[] $destinationColumn destination columns - * @param mixed[]|null $existrel db, table, column + * @param string[] $multiEditColumnsName multi edit column names + * @param string[] $destinationDb destination tables + * @param (string|null)[] $destinationTable destination tables + * @param (string|null)[] $destinationColumn destination columns + * @param mixed[]|null $existrel db, table, column */ public function updateInternalRelations( array $multiEditColumnsName,