Skip to content

Commit

Permalink
When using match to match enum, the enumeration must be completely …
Browse files Browse the repository at this point in the history
…overwritten
  • Loading branch information
limingxinleo committed Mar 20, 2024
1 parent 45cd234 commit 914b813
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,14 @@ parameters:
ignoreErrors:
- '#Static call to instance method Hyperf\\HttpServer\\Router\\Router::[a-zA-Z0-9\\_]+\(\)#'
- '#Static call to instance method Hyperf\\DbConnection\\Db::[a-zA-Z0-9\\_]+\(\)#'

services:
# When using `match` to match enum, the enumeration must be completely overwritten
- class: PHPStan\Rules\Comparison\MatchExpressionRule
arguments:
checkAlwaysTrueStrictComparison: %checkAlwaysTrueStrictComparison%
disableUnreachable: %featureToggles.disableUnreachableBranchesRules%
reportAlwaysTrueInLastCondition: %reportAlwaysTrueInLastCondition%
treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
tags:
- phpstan.rules.rule

0 comments on commit 914b813

Please sign in to comment.