Skip to content

Commit 2967a49

Browse files
authored
readme: wording in enforceEnumMatchRule (#101)
1 parent e07867c commit 2967a49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ enum MyEnum: string { // missing @implements tag
139139
```
140140

141141
### enforceEnumMatchRule
142-
- Enforces usage of `match ($enum)` instead of conditions like `($enum === Enum::Case)`
142+
- Enforces usage of `match ($enum)` instead of exhaustive conditions like `if ($enum === Enum::One) elseif ($enum === Enum::Two)`
143143
- 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:
144144
```php
145145
enum MyEnum {

0 commit comments

Comments
 (0)