Skip to content

Commit

Permalink
PHPStan: ignore two new issues
Browse files Browse the repository at this point in the history
... 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.
  • Loading branch information
jrfnl committed Dec 8, 2023
1 parent 17cc585 commit a4b330a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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<int, array<string, int\\|string>>.$#"
path: WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php

# Level 4
- '#^Property \S+::\$\S+ \([^)]+\) in isset\(\) is not nullable\.$#'
-
Expand All @@ -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<int, array<string, int\\|string>>.$#"
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\.$#'

0 comments on commit a4b330a

Please sign in to comment.