Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 9 additions & 45 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1620,16 +1620,10 @@ parameters:
count: 1
path: src/Controllers/Database/StructureController.php

-
message: '#^Binary operation "\." between bool\|float\|int\|string and array\<string\>\|string\|false results in an error\.$#'
identifier: binaryOp.invalid
count: 1
path: src/Controllers/Database/StructureController.php

-
message: '#^Binary operation "\." between non\-empty\-string and array\<string\>\|string\|false results in an error\.$#'
identifier: binaryOp.invalid
count: 1
count: 2
path: src/Controllers/Database/StructureController.php

-
Expand Down Expand Up @@ -1752,12 +1746,6 @@ parameters:
count: 1
path: src/Controllers/Database/StructureController.php

-
message: '#^Parameter \#2 \$table of method PhpMyAdmin\\Dbal\\DatabaseInterface\:\:getTablesFull\(\) expects array\<mixed\>\|string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Controllers/Database/StructureController.php

-
message: '#^Parameter \#2 \$tableName of method PhpMyAdmin\\Dbal\\DatabaseInterface\:\:getTable\(\) expects string, int\|string\|null given\.$#'
identifier: argument.type
Expand All @@ -1776,6 +1764,12 @@ parameters:
count: 1
path: src/Controllers/Database/StructureController.php

-
message: '#^Parameter \#3 \$tableGroup of method PhpMyAdmin\\Dbal\\DatabaseInterface\:\:getTablesFull\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Controllers/Database/StructureController.php

-
message: '#^Parameter \#2 \$selected of method PhpMyAdmin\\Tracking\\Tracking\:\:createTrackingForMultipleTables\(\) expects array\<mixed\>, mixed given\.$#'
identifier: argument.type
Expand Down Expand Up @@ -4695,7 +4689,7 @@ parameters:
-
message: '#^Binary operation "\+" between int\|string\|null and int\|string\|null results in an error\.$#'
identifier: binaryOp.invalid
count: 3
count: 2
path: src/Dbal/DatabaseInterface.php

-
Expand Down Expand Up @@ -4731,12 +4725,6 @@ parameters:
count: 1
path: src/Dbal/DatabaseInterface.php

-
message: '#^Cannot cast mixed to string\.$#'
identifier: cast.string
count: 1
path: src/Dbal/DatabaseInterface.php

-
message: '#^Cannot use \+\+ on mixed\.$#'
identifier: postInc.type
Expand Down Expand Up @@ -4785,12 +4773,6 @@ parameters:
count: 1
path: src/Dbal/DatabaseInterface.php

-
message: '#^Only booleans are allowed in &&, int\|false given on the left side\.$#'
identifier: booleanAnd.leftNotBoolean
count: 3
path: src/Dbal/DatabaseInterface.php

-
message: '#^Only booleans are allowed in a negated boolean, PhpMyAdmin\\Dbal\\ResultInterface\|false given\.$#'
identifier: booleanNot.exprNotBoolean
Expand Down Expand Up @@ -4821,18 +4803,6 @@ parameters:
count: 1
path: src/Dbal/DatabaseInterface.php

-
message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(mixed\)\: mixed\)\|null, Closure\(string\)\: non\-empty\-string given\.$#'
identifier: argument.type
count: 1
path: src/Dbal/DatabaseInterface.php

-
message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(mixed\)\: mixed\)\|null, Closure\(string, PhpMyAdmin\\Dbal\\ConnectionType\=\)\: non\-empty\-string given\.$#'
identifier: argument.type
count: 1
path: src/Dbal/DatabaseInterface.php

-
message: '#^Parameter \#1 \$mode of static method PhpMyAdmin\\SqlParser\\Context\:\:setMode\(\) expects int\|string, string\|null given\.$#'
identifier: argument.type
Expand All @@ -4845,12 +4815,6 @@ parameters:
count: 1
path: src/Dbal/DatabaseInterface.php

-
message: '#^Parameter \#1 \$string of function strtolower expects string, int\|string given\.$#'
identifier: argument.type
count: 1
path: src/Dbal/DatabaseInterface.php

-
message: '#^Parameter \#2 \$arrays of function array_diff expects an array of values castable to string, array given\.$#'
identifier: argument.type
Expand Down Expand Up @@ -16170,7 +16134,7 @@ parameters:
Use dependency injection instead\.$#
'''
identifier: staticMethod.deprecated
count: 1
count: 3
path: tests/unit/Plugins/Export/ExportSqlTest.php

-
Expand Down
31 changes: 6 additions & 25 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,7 @@
<code><![CDATA[$replicaInfo['Wild_Do_Table']]]></code>
<code><![CDATA[$replicaInfo['Wild_Ignore_Table']]]></code>
<code><![CDATA[$request->getParam('pos')]]></code>
<code><![CDATA[Current::$database]]></code>
</MixedArgument>
<MixedArgumentTypeCoercion>
<code><![CDATA[uksort($tables, strnatcasecmp(...))]]></code>
Expand Down Expand Up @@ -1133,10 +1134,6 @@
<code><![CDATA[$currentTable['TABLE_NAME']]]></code>
<code><![CDATA[$currentTable['TABLE_ROWS']]]></code>
</PossiblyNullOperand>
<RedundantCast>
<code><![CDATA[(string) $_REQUEST['tbl_group']]]></code>
<code><![CDATA[(string) $_REQUEST['tbl_group']]]></code>
</RedundantCast>
<RiskyTruthyFalsyComparison>
<code><![CDATA[! $currentTable['COUNTED']]]></code>
</RiskyTruthyFalsyComparison>
Expand Down Expand Up @@ -3459,10 +3456,6 @@
<code><![CDATA[$this->versionComment]]></code>
<code><![CDATA[$this->versionString]]></code>
</MixedArgument>
<MixedArgumentTypeCoercion>
<code><![CDATA[uksort($eachTables, strnatcasecmp(...))]]></code>
<code><![CDATA[uksort($oneDatabaseTables, strnatcasecmp(...))]]></code>
</MixedArgumentTypeCoercion>
<MixedArrayAccess>
<code><![CDATA[$resultTarget[$row[$keyIndex]]]]></code>
<code><![CDATA[$resultTarget[]]]></code>
Expand All @@ -3471,8 +3464,6 @@
<code><![CDATA[$resultTarget[$row[$keyIndex]]]]></code>
</MixedArrayAssignment>
<MixedAssignment>
<code><![CDATA[$aLength]]></code>
<code><![CDATA[$bLength]]></code>
<code><![CDATA[$resultTarget]]></code>
<code><![CDATA[$resultTarget]]></code>
<code><![CDATA[$this->versionComment]]></code>
Expand Down Expand Up @@ -3513,17 +3504,10 @@
<code><![CDATA[$resultRows]]></code>
<code><![CDATA[$user]]></code>
</NullableReturnStatement>
<PossiblyInvalidArgument>
<code><![CDATA[$tableData[$sortBy] ?? '']]></code>
</PossiblyInvalidArgument>
<PossiblyInvalidArrayOffset>
<code><![CDATA[$resultTarget[$row[$keyIndex]]]]></code>
<code><![CDATA[$resultTarget[$row[$keyIndex]]]]></code>
</PossiblyInvalidArrayOffset>
<PossiblyInvalidOperand>
<code><![CDATA[$tableData['Data_length']]]></code>
<code><![CDATA[$tableData['Index_length']]]></code>
</PossiblyInvalidOperand>
<PossiblyNullArgument>
<code><![CDATA[$_SERVER['SCRIPT_NAME']]]></code>
<code><![CDATA[$version['@@sql_mode']]]></code>
Expand All @@ -3545,8 +3529,6 @@
<code><![CDATA[$row['Index_length']]]></code>
<code><![CDATA[$row['Max_data_length']]]></code>
<code><![CDATA[$row['Rows']]]></code>
<code><![CDATA[$tableData['Data_length']]]></code>
<code><![CDATA[$tableData['Index_length']]]></code>
</PossiblyNullOperand>
<PossiblyUndefinedArrayOffset>
<code><![CDATA[$_SERVER['SCRIPT_NAME']]]></code>
Expand All @@ -3558,9 +3540,6 @@
<code><![CDATA[$index->isUnique()]]></code>
<code><![CDATA[$limitCount]]></code>
<code><![CDATA[$limitCount]]></code>
<code><![CDATA[$limitCount]]></code>
<code><![CDATA[$limitCount]]></code>
<code><![CDATA[$limitCount]]></code>
<code><![CDATA[empty($fieldData['Key'])]]></code>
</RiskyTruthyFalsyComparison>
<UnsupportedReferenceUsage>
Expand Down Expand Up @@ -5775,10 +5754,10 @@
<code><![CDATA[empty($statement->fields)]]></code>
<code><![CDATA[empty($statement->name->database)]]></code>
<code><![CDATA[empty($statement->table->database)]]></code>
<code><![CDATA[empty($tableStatus['Check_time'])]]></code>
<code><![CDATA[empty($tableStatus['Create_time'])]]></code>
<code><![CDATA[empty($tableStatus['Update_time'])]]></code>
<code><![CDATA[empty($this->config->selectedServer['port'])]]></code>
<code><![CDATA[empty($tmpres['Check_time'])]]></code>
<code><![CDATA[empty($tmpres['Create_time'])]]></code>
<code><![CDATA[empty($tmpres['Update_time'])]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Plugins/Export/ExportTexytext.php">
Expand Down Expand Up @@ -10190,6 +10169,8 @@
<file src="tests/unit/Plugins/Export/ExportSqlTest.php">
<DeprecatedMethod>
<code><![CDATA[Config::getInstance()]]></code>
<code><![CDATA[Config::getInstance()]]></code>
<code><![CDATA[Config::getInstance()]]></code>
</DeprecatedMethod>
<MixedArgument>
<code><![CDATA[$result]]></code>
Expand Down
Loading
Loading