diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index b1fb9df463..462384e1fd 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -780,11 +780,31 @@ parameters: count: 1 path: libraries/classes/Command/TwigLintCommand.php + - + message: "#^Offset 'date' does not exist on array\\\\|string\\.$#" + count: 2 + path: libraries/classes/Command/WriteGitRevisionCommand.php + + - + message: "#^Offset 'email' does not exist on array\\\\|string\\.$#" + count: 2 + path: libraries/classes/Command/WriteGitRevisionCommand.php + + - + message: "#^Offset 'name' does not exist on array\\\\|string\\.$#" + count: 2 + path: libraries/classes/Command/WriteGitRevisionCommand.php + - message: "#^PHPDoc type string of property PhpMyAdmin\\\\Command\\\\WriteGitRevisionCommand\\:\\:\\$defaultName is not the same as PHPDoc type string\\|null of overridden property Symfony\\\\Component\\\\Console\\\\Command\\\\Command\\:\\:\\$defaultName\\.$#" count: 1 path: libraries/classes/Command/WriteGitRevisionCommand.php + - + message: "#^Parameter \\#1 \\$str of function trim expects string, array\\\\|string given\\.$#" + count: 1 + path: libraries/classes/Command/WriteGitRevisionCommand.php + - message: "#^Cannot access offset 'Server' on mixed\\.$#" count: 1 @@ -15567,12 +15587,7 @@ parameters: - message: "#^Method PhpMyAdmin\\\\Dbal\\\\MysqliResult\\:\\:fetchAllKeyPair\\(\\) should return array\\ but returns array\\.$#" - count: 1 - path: libraries/classes/Dbal/MysqliResult.php - - - - message: "#^Method PhpMyAdmin\\\\Dbal\\\\MysqliResult\\:\\:fetchAllKeyPair\\(\\) should return array\\ but returns array\\\\.$#" - count: 1 + count: 2 path: libraries/classes/Dbal/MysqliResult.php - @@ -19455,6 +19470,21 @@ parameters: count: 1 path: libraries/classes/Git.php + - + message: "#^Cannot access offset 'date' on mixed\\.$#" + count: 2 + path: libraries/classes/Git.php + + - + message: "#^Cannot access offset 'email' on mixed\\.$#" + count: 2 + path: libraries/classes/Git.php + + - + message: "#^Cannot access offset 'name' on mixed\\.$#" + count: 2 + path: libraries/classes/Git.php + - message: "#^Cannot access offset 1 on array\\|false\\.$#" count: 2 @@ -19495,11 +19525,6 @@ parameters: count: 1 path: libraries/classes/Git.php - - - message: "#^Method PhpMyAdmin\\\\Git\\:\\:extractDataFormTextBody\\(\\) has parameter \\$commit with no value type specified in iterable type array\\.$#" - count: 1 - path: libraries/classes/Git.php - - message: "#^Method PhpMyAdmin\\\\Git\\:\\:getHashFromHeadRef\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -19551,7 +19576,7 @@ parameters: path: libraries/classes/Git.php - - message: "#^Parameter \\#1 \\$commit of method PhpMyAdmin\\\\Git\\:\\:extractDataFormTextBody\\(\\) expects array, mixed given\\.$#" + message: "#^Parameter \\#1 \\$commit of static method PhpMyAdmin\\\\Git\\:\\:extractDataFormTextBody\\(\\) expects array\\, mixed given\\.$#" count: 1 path: libraries/classes/Git.php @@ -19616,7 +19641,7 @@ parameters: path: libraries/classes/Git.php - - message: "#^Parameter \\#2 \\$str of function explode expects string, mixed given\\.$#" + message: "#^Parameter \\#2 \\$str of function explode expects string, string\\|null given\\.$#" count: 1 path: libraries/classes/Git.php @@ -45090,6 +45115,16 @@ parameters: count: 1 path: test/classes/Gis/GisPolygonTest.php + - + message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertIsArray\\(\\) with array will always evaluate to true\\.$#" + count: 1 + path: test/classes/GitTest.php + + - + message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotNull\\(\\) with array will always evaluate to true\\.$#" + count: 1 + path: test/classes/GitTest.php + - message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:markTestSkipped\\(\\)\\.$#" count: 2 diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 461a1924a4..47ff2d32a5 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -266,9 +266,28 @@ + + $author['date'] + $author['email'] + $author['name'] + $committer['date'] + $committer['email'] + $committer['name'] + $defaultName + + $message + + + $author['date'] + $author['email'] + $author['name'] + $committer['date'] + $committer['email'] + $committer['name'] + @@ -6744,26 +6763,28 @@ $params + + is_array($info) ? $info : [] + + + array{revision: string, revisionUrl: string, branch: string, branchUrl: string}|[] + $db $table - - $info + $params['route'] $params['server'] $subObject - - array{revision: string, revisionUrl: string, branch: string, branchUrl: string}|[] - is_array($info) ? $info : [] - (string) $GLOBALS['db'] (string) $GLOBALS['table'] (string) $_REQUEST['no_history'] - + + is_array($info) is_scalar($GLOBALS['db']) is_scalar($GLOBALS['table']) isset($GLOBALS['db']) && is_scalar($GLOBALS['db']) @@ -6772,6 +6793,9 @@ ! isset($dbi) + + [] + @@ -7542,22 +7566,25 @@ - + $commit $commit_json->message - $dataline $hash $hash $hash $offset + ($position * 20) $offset + ($position * 4) - + + $info['author']['date'] + $info['author']['email'] + $info['author']['name'] + $info['committer']['date'] + $info['committer']['email'] + $info['committer']['name'] + + $commit - - - $commit - $dataline $end $git_location $isRemoteCommit @@ -15517,6 +15544,11 @@ $queryString + + + assertIsArray + + array