lint/php-8.0/prefer-match
In the lint-strict preset. In Rector’s rector/php80 set. Unsafe fix: it can change behavior. Runs only when [php] version is 8.0 or later.
What it does
Change switch() to match()
Configuration
[lint.rules]
"php-8.0/prefer-match" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
ChangeSwitchToMatch(rector)