From a4b330a7f2032752e1e275ca44f43000ad338ed4 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Fri, 8 Dec 2023 21:28:30 +0100 Subject: [PATCH] PHPStan: ignore two new issues ... caused by improved, but not 100% correct, type information coming from PHPCSUtils. This incorrect type info will be fixed in the next version of PHPCSUtils. --- phpstan.neon.dist | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 3aafa9a3db..ae7cf53502 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -11,6 +11,12 @@ parameters: # Level 0 - '#^Result of method \S+ \(void\) is used\.$#' + - + # False positive. Will be fixed via next version of PHPCSUtils. + count: 1 + message: "#^Cannot unset offset 'query' on non-empty-array>.$#" + path: WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php + # Level 4 - '#^Property \S+::\$\S+ \([^)]+\) in isset\(\) is not nullable\.$#' - @@ -22,5 +28,11 @@ parameters: message: '#^Strict comparison using === between true and false will always evaluate to false\.$#' path: WordPress/Sniffs/Utils/I18nTextDomainFixerSniff.php + - + # False positive. Will be fixed via next version of PHPCSUtils. + count: 1 + message: "#^Cannot unset offset 'file' on array>.$#" + path: WordPress/Sniffs/Security/EscapeOutputSniff.php + # Level 5 - '#^Parameter \#3 \$value of method \S+File::recordMetric\(\) expects string, \(?(float|int|bool)(\|(float|int|bool))*\)? given\.$#'