From 3379930b25000513e242d452caf72b5a5e80f8eb Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 14 Nov 2024 17:47:11 +0100 Subject: [PATCH] generate baseline --- phpstan-baseline.neon | 108 +++++++++++++++++++++++++++++++++--------- 1 file changed, 85 insertions(+), 23 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e0f834f0b..87641bc9b 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,80 +1,142 @@ parameters: ignoreErrors: - - message: "#^Unresolvable Query\\: Cannot resolve query with variable type\\: non\\-empty\\-string\\.$#" + message: '#^Unresolvable Query\: Cannot resolve query with variable type\: non\-empty\-string\.$#' + identifier: dba.unresolvableQuery count: 2 path: src/Analyzer/QueryPlanAnalyzerMysql.php - - message: """ - #^Call to deprecated method resolveQueryString\\(\\) of class staabm\\\\PHPStanDba\\\\QueryReflection\\\\QueryReflection\\: - use resolveQueryStrings\\(\\) instead$# - """ + message: ''' + #^Call to deprecated method resolveQueryString\(\) of class staabm\\PHPStanDba\\QueryReflection\\QueryReflection\: + use resolveQueryStrings\(\) instead$# + ''' + identifier: method.deprecated count: 1 path: src/Extensions/DeployerRunMysqlQueryDynamicReturnTypeExtension.php - - message: "#^Doing instanceof PHPStan\\\\Type\\\\Constant\\\\ConstantArrayType is error\\-prone and deprecated\\. Use Type\\:\\:getConstantArrays\\(\\) instead\\.$#" + message: '#^Doing instanceof PHPStan\\Type\\Constant\\ConstantArrayType is error\-prone and deprecated\. Use Type\:\:getConstantArrays\(\) instead\.$#' + identifier: phpstanApi.instanceofType count: 2 path: src/Extensions/DibiConnectionFetchDynamicReturnTypeExtension.php - - message: "#^Strict comparison using \\=\\=\\= between 'dibi' and 'dibi' will always evaluate to true\\.$#" + message: '#^Strict comparison using \=\=\= between ''dibi'' and ''dibi'' will always evaluate to true\.$#' + identifier: identical.alwaysTrue count: 1 path: src/QueryReflection/DbaApi.php - - message: """ - #^Call to deprecated method resolvePreparedQueryString\\(\\) of class staabm\\\\PHPStanDba\\\\QueryReflection\\\\QueryReflection\\: - use resolvePreparedQueryStrings\\(\\) instead$# - """ + message: '#^Return type \(array\\}\>\|PDOException\|null\) of method staabm\\PHPStanDba\\QueryReflection\\PdoPgSqlQueryReflector\:\:simulateQuery\(\) should be covariant with return type \(array\, precision\: int\<0, max\>, pdo_type\: 0\|1\|2\|3\|4\|5\|6\|536870912\|1073741824\|2147483648\}\>\|PDOException\|null\) of method staabm\\PHPStanDba\\QueryReflection\\BasePdoQueryReflector\:\:simulateQuery\(\)$#' + identifier: method.childReturnType + count: 1 + path: src/QueryReflection/PdoPgSqlQueryReflector.php + + - + message: ''' + #^Call to deprecated method resolvePreparedQueryString\(\) of class staabm\\PHPStanDba\\QueryReflection\\QueryReflection\: + use resolvePreparedQueryStrings\(\) instead$# + ''' + identifier: method.deprecated count: 1 path: src/QueryReflection/QueryReflection.php - - message: "#^Casting to \\*NEVER\\* something that's already \\*NEVER\\*\\.$#" + message: '#^Casting to \*NEVER\* something that''s already \*NEVER\*\.$#' + identifier: cast.useless count: 1 path: src/QueryReflection/QueryReflection.php - - message: "#^Strict comparison using \\=\\=\\= between null and null will always evaluate to true\\.$#" + message: '#^Strict comparison using \=\=\= between null and null will always evaluate to true\.$#' + identifier: identical.alwaysTrue count: 1 path: src/QueryReflection/QueryReflection.php - - message: "#^Doing instanceof PHPStan\\\\Type\\\\ConstantScalarType is error\\-prone and deprecated\\. Use Type\\:\\:isConstantScalarValue\\(\\) or Type\\:\\:getConstantScalarTypes\\(\\) or Type\\:\\:getConstantScalarValues\\(\\) instead\\.$#" + message: '#^Doing instanceof PHPStan\\Type\\ConstantScalarType is error\-prone and deprecated\. Use Type\:\:isConstantScalarValue\(\) or Type\:\:getConstantScalarTypes\(\) or Type\:\:getConstantScalarValues\(\) instead\.$#' + identifier: phpstanApi.instanceofType count: 1 path: src/QueryReflection/QuerySimulation.php - - message: "#^Doing instanceof PHPStan\\\\Type\\\\IntersectionType is error\\-prone and deprecated\\.$#" + message: '#^Doing instanceof PHPStan\\Type\\IntersectionType is error\-prone and deprecated\.$#' + identifier: phpstanApi.instanceofType count: 1 path: src/QueryReflection/QuerySimulation.php - - message: "#^Doing instanceof PHPStan\\\\Type\\\\ObjectType is error\\-prone and deprecated\\. Use Type\\:\\:isObject\\(\\) or Type\\:\\:getObjectClassNames\\(\\) instead\\.$#" + message: '#^Doing instanceof PHPStan\\Type\\ObjectType is error\-prone and deprecated\. Use Type\:\:isObject\(\) or Type\:\:getObjectClassNames\(\) instead\.$#' + identifier: phpstanApi.instanceofType count: 2 path: src/QueryReflection/QuerySimulation.php - - message: "#^Doing instanceof PHPStan\\\\Type\\\\Constant\\\\ConstantStringType is error\\-prone and deprecated\\. Use Type\\:\\:getConstantStrings\\(\\) instead\\.$#" + message: '#^Doing instanceof PHPStan\\Type\\Constant\\ConstantStringType is error\-prone and deprecated\. Use Type\:\:getConstantStrings\(\) instead\.$#' + identifier: phpstanApi.instanceofType count: 1 path: src/Rules/PdoStatementExecuteMethodRule.php - - message: """ - #^Call to deprecated method resolveQueryString\\(\\) of class staabm\\\\PHPStanDba\\\\QueryReflection\\\\QueryReflection\\: - use resolveQueryStrings\\(\\) instead$# - """ + message: ''' + #^Call to deprecated method resolveQueryString\(\) of class staabm\\PHPStanDba\\QueryReflection\\QueryReflection\: + use resolveQueryStrings\(\) instead$# + ''' + identifier: method.deprecated count: 1 path: src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php - - message: "#^Doing instanceof PHPStan\\\\Type\\\\Constant\\\\ConstantArrayType is error\\-prone and deprecated\\. Use Type\\:\\:getConstantArrays\\(\\) instead\\.$#" + message: '#^Doing instanceof PHPStan\\Type\\Constant\\ConstantArrayType is error\-prone and deprecated\. Use Type\:\:getConstantArrays\(\) instead\.$#' + identifier: phpstanApi.instanceofType count: 1 path: src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php - - message: "#^Only booleans are allowed in an if condition, int given\\.$#" + message: '#^Cannot call method getCondition\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/SqlAst/ParserInference.php + + - + message: '#^Cannot call method getLeft\(\) on mixed\.$#' + identifier: method.nonObject + count: 4 + path: src/SqlAst/ParserInference.php + + - + message: '#^Cannot call method getName\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/SqlAst/ParserInference.php + + - + message: '#^Cannot call method getRight\(\) on mixed\.$#' + identifier: method.nonObject + count: 2 + path: src/SqlAst/ParserInference.php + + - + message: '#^Cannot call method getTable\(\) on mixed\.$#' + identifier: method.nonObject + count: 1 + path: src/SqlAst/ParserInference.php + + - + message: '#^Parameter \#1 \$tableName of method staabm\\PHPStanDba\\SchemaReflection\\SchemaReflection\:\:getTable\(\) expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/SqlAst/ParserInference.php + + - + message: '#^Parameter \#3 \$joinCondition of class staabm\\PHPStanDba\\SchemaReflection\\Join constructor expects SqlFtw\\Sql\\Expression\\RootNode, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/SqlAst/ParserInference.php + + - + message: '#^Only booleans are allowed in an if condition, int given\.$#' + identifier: if.condNotBoolean count: 1 path: src/TypeMapping/MysqliTypeMapper.php