Skip to content

Commit

Permalink
readme: wording in enforceEnumMatchRule (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal committed Apr 5, 2023
1 parent e07867c commit 2967a49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ enum MyEnum: string { // missing @implements tag
```

### enforceEnumMatchRule
- Enforces usage of `match ($enum)` instead of conditions like `($enum === Enum::Case)`
- Enforces usage of `match ($enum)` instead of exhaustive conditions like `if ($enum === Enum::One) elseif ($enum === Enum::Two)`
- This rule aims to "fix" a bit problematic behaviour of PHPStan (introduced at 1.10). It understands enum cases very well and forces you to adjust following code:
```php
enum MyEnum {
Expand Down

0 comments on commit 2967a49

Please sign in to comment.