diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 66beeeb7ed..360b6861ad 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -6295,11 +6295,6 @@ parameters: count: 1 path: src/Dbal/MysqliResult.php - - - message: "#^Method PhpMyAdmin\\\\Dbal\\\\MysqliResult\\:\\:getFieldNames\\(\\) should return array\\ but returns array\\\\.$#" - count: 1 - path: src/Dbal/MysqliResult.php - - message: "#^Parameter \\#1 \\$field of class PhpMyAdmin\\\\FieldMetadata constructor expects object\\{name\\: non\\-empty\\-string, orgname\\: string, table\\: string, orgtable\\: string, max_length\\: int, length\\: int, charsetnr\\: int, flags\\: int, type\\: int, decimals\\: int, db\\: string, def\\: string, catalog\\: string\\}, object\\{name\\: string, orgname\\: string, table\\: string, orgtable\\: string, def\\: string, db\\: string, catalog\\: 'def', max_length\\: 0, length\\: int, charsetnr\\: string, flags\\: int, type\\: int, decimals\\: int\\}&stdClass given\\.$#" count: 1 @@ -9550,14 +9545,9 @@ parameters: count: 1 path: src/Plugins/Export/ExportCsv.php - - - message: "#^Cannot access offset non\\-empty\\-string on mixed\\.$#" - count: 1 - path: src/Plugins/Export/ExportCsv.php - - message: "#^Cannot access offset string on mixed\\.$#" - count: 1 + count: 2 path: src/Plugins/Export/ExportCsv.php - @@ -9600,14 +9590,9 @@ parameters: count: 3 path: src/Plugins/Export/ExportHtmlword.php - - - message: "#^Cannot access offset non\\-empty\\-string on mixed\\.$#" - count: 1 - path: src/Plugins/Export/ExportHtmlword.php - - message: "#^Cannot access offset string on mixed\\.$#" - count: 5 + count: 6 path: src/Plugins/Export/ExportHtmlword.php - @@ -9660,14 +9645,9 @@ parameters: count: 2 path: src/Plugins/Export/ExportLatex.php - - - message: "#^Cannot access offset non\\-empty\\-string on mixed\\.$#" - count: 1 - path: src/Plugins/Export/ExportLatex.php - - message: "#^Cannot access offset string on mixed\\.$#" - count: 3 + count: 4 path: src/Plugins/Export/ExportLatex.php - @@ -9880,14 +9860,9 @@ parameters: count: 1 path: src/Plugins/Export/ExportPhparray.php - - - message: "#^Cannot access offset non\\-empty\\-string on mixed\\.$#" - count: 1 - path: src/Plugins/Export/ExportPhparray.php - - message: "#^Cannot access offset string on mixed\\.$#" - count: 1 + count: 2 path: src/Plugins/Export/ExportPhparray.php - @@ -10185,14 +10160,9 @@ parameters: count: 3 path: src/Plugins/Export/ExportTexytext.php - - - message: "#^Cannot access offset non\\-empty\\-string on mixed\\.$#" - count: 1 - path: src/Plugins/Export/ExportTexytext.php - - message: "#^Cannot access offset string on mixed\\.$#" - count: 5 + count: 6 path: src/Plugins/Export/ExportTexytext.php - @@ -10235,14 +10205,9 @@ parameters: count: 1 path: src/Plugins/Export/ExportXml.php - - - message: "#^Cannot access offset non\\-empty\\-string on mixed\\.$#" - count: 1 - path: src/Plugins/Export/ExportXml.php - - message: "#^Cannot access offset string on mixed\\.$#" - count: 1 + count: 2 path: src/Plugins/Export/ExportXml.php - diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 7999955e22..02bbdf4584 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -5227,18 +5227,12 @@ >]]> ]]> - - result->fetch_fields(), 'name')]]> - ]]> result->fetch_all(), 1, 0)]]> ]]> - - ]]> - diff --git a/src/Dbal/MysqliResult.php b/src/Dbal/MysqliResult.php index 5409f1d359..95284f78cc 100644 --- a/src/Dbal/MysqliResult.php +++ b/src/Dbal/MysqliResult.php @@ -207,7 +207,7 @@ final class MysqliResult implements ResultInterface } /** - * returns meta info for fields in $result + * Returns meta info for fields in $result * * @return array meta info for fields in $result * @psalm-return list @@ -229,8 +229,7 @@ final class MysqliResult implements ResultInterface /** * Returns the names of the fields in the result * - * @return array Fields names - * @psalm-return list + * @return list Fields names */ public function getFieldNames(): array { diff --git a/src/Dbal/ResultInterface.php b/src/Dbal/ResultInterface.php index 3b4dd167fd..31e5440081 100644 --- a/src/Dbal/ResultInterface.php +++ b/src/Dbal/ResultInterface.php @@ -106,8 +106,7 @@ interface ResultInterface extends IteratorAggregate /** * Returns the names of the fields in the result * - * @return array Fields names - * @psalm-return list + * @return list Fields names */ public function getFieldNames(): array; } diff --git a/tests/unit/Stubs/DummyResult.php b/tests/unit/Stubs/DummyResult.php index 3717d45880..e44d520e28 100644 --- a/tests/unit/Stubs/DummyResult.php +++ b/tests/unit/Stubs/DummyResult.php @@ -265,8 +265,7 @@ class DummyResult implements ResultInterface /** * Returns the names of the fields in the result * - * @return array Fields names - * @psalm-return list + * @return list Fields names */ public function getFieldNames(): array {