Do not treat PHP doc types as certain in PHPStan
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
2c6e839f2a
commit
ae8e621d55
@ -435,16 +435,6 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Dbal/DbiMysqli.php
|
||||
|
||||
-
|
||||
message: "#^Result of && is always true\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Dbal/DbiMysqli.php
|
||||
|
||||
-
|
||||
message: "#^Call to function is_bool\\(\\) with mysqli_result will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Dbal/DbiMysqli.php
|
||||
|
||||
-
|
||||
message: "#^Unreachable statement \\- code above always terminates\\.$#"
|
||||
count: 2
|
||||
@ -585,16 +575,6 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Engines/Pbxt.php
|
||||
|
||||
-
|
||||
message: "#^Elseif branch is unreachable because previous condition is always true\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Error.php
|
||||
|
||||
-
|
||||
message: "#^Else branch is unreachable because previous condition is always true\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Error.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$callback of function set_error_handler expects \\(callable\\(int, string, string, int, array\\)\\: bool\\)\\|null, array\\(\\$this\\(PhpMyAdmin\\\\ErrorHandler\\), 'handleError'\\) given\\.$#"
|
||||
count: 1
|
||||
@ -725,11 +705,6 @@ parameters:
|
||||
count: 2
|
||||
path: libraries/classes/Font.php
|
||||
|
||||
-
|
||||
message: "#^Result of \\|\\| is always true\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Footer.php
|
||||
|
||||
-
|
||||
message: "#^Argument of an invalid type array\\|object supplied for foreach, only iterables are supported\\.$#"
|
||||
count: 1
|
||||
@ -1000,11 +975,6 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Language.php
|
||||
|
||||
-
|
||||
message: "#^Instanceof between string and PhpMyAdmin\\\\SqlParser\\\\UtfString will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Linter.php
|
||||
|
||||
-
|
||||
message: "#^Right side of && is always true\\.$#"
|
||||
count: 1
|
||||
@ -1870,16 +1840,6 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Replication.php
|
||||
|
||||
-
|
||||
message: "#^Call to function is_array\\(\\) with string will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Response.php
|
||||
|
||||
-
|
||||
message: "#^Instanceof between string and PhpMyAdmin\\\\Message will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Response.php
|
||||
|
||||
-
|
||||
message: "#^Method PhpMyAdmin\\\\Sanitize\\:\\:sanitizeFilename\\(\\) should return string but returns string\\|null\\.$#"
|
||||
count: 1
|
||||
@ -1890,21 +1850,6 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Sanitize.php
|
||||
|
||||
-
|
||||
message: "#^Call to function is_bool\\(\\) with string will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Sanitize.php
|
||||
|
||||
-
|
||||
message: "#^If condition is always false\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Sanitize.php
|
||||
|
||||
-
|
||||
message: "#^Call to function is_int\\(\\) with string will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Sanitize.php
|
||||
|
||||
-
|
||||
message: "#^Offset 'criteriaColumn' does not exist on array\\|string\\.$#"
|
||||
count: 1
|
||||
@ -2085,11 +2030,6 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Sql.php
|
||||
|
||||
-
|
||||
message: "#^Right side of && is always true\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Sql.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$sqlData of method PhpMyAdmin\\\\Sql\\:\\:getHtmlForPreviousUpdateQuery\\(\\) expects array, array\\|null given\\.$#"
|
||||
count: 1
|
||||
@ -2365,11 +2305,6 @@ parameters:
|
||||
count: 1
|
||||
path: test/classes/Properties/Options/OptionsPropertyGroupTest.php
|
||||
|
||||
-
|
||||
message: "#^Call to function is_bool\\(\\) with object will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: test/classes/Stubs/DbiDummy.php
|
||||
|
||||
-
|
||||
message: "#^Comparison operation \"\\>\\=\" between object and 1000 results in an error\\.$#"
|
||||
count: 1
|
||||
@ -2385,16 +2320,6 @@ parameters:
|
||||
count: 1
|
||||
path: test/classes/Stubs/DbiDummy.php
|
||||
|
||||
-
|
||||
message: "#^Call to function is_array\\(\\) with string will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: test/classes/Stubs/Response.php
|
||||
|
||||
-
|
||||
message: "#^Instanceof between string and PhpMyAdmin\\\\Message will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: test/classes/Stubs/Response.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$pma_transformation_data of method PhpMyAdmin\\\\SystemDatabase\\:\\:getNewTransformationDataSql\\(\\) expects object, array given\\.$#"
|
||||
count: 1
|
||||
|
||||
@ -9,10 +9,9 @@ parameters:
|
||||
- vendor/phpmyadmin/motranslator/src/functions.php
|
||||
bootstrapFiles:
|
||||
- test/phpstan-constants.php
|
||||
reportUnmatchedIgnoredErrors: true
|
||||
inferPrivatePropertyTypeFromConstructor: true
|
||||
checkMissingIterableValueType: false
|
||||
checkGenericClassInNonGenericObjectType: false
|
||||
treatPhpDocTypesAsCertain: false
|
||||
excludes_analyse:
|
||||
- examples/openid.php
|
||||
- node_modules/*
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<files psalm-version="3.17.1@8f211792d813e4dc89f04ed372785ce93b902fd1">
|
||||
<files psalm-version="3.18.2@19aa905f7c3c7350569999a93c40ae91ae4e1626">
|
||||
<file src="libraries/classes/Charsets.php">
|
||||
<TypeDoesNotContainType occurrences="1">
|
||||
<code>$pieces === false</code>
|
||||
@ -396,6 +396,9 @@
|
||||
<code>$varValue[1]</code>
|
||||
<code>$varValue[1]</code>
|
||||
</PossiblyNullArrayAccess>
|
||||
<PossiblyUndefinedArrayOffset occurrences="1">
|
||||
<code>$params['varName']</code>
|
||||
</PossiblyUndefinedArrayOffset>
|
||||
</file>
|
||||
<file src="libraries/classes/Controllers/Setup/FormController.php">
|
||||
<PossiblyNullArgument occurrences="1">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user