-
-
Notifications
You must be signed in to change notification settings - Fork 738
Closed
rectorphp/rector-src
#6394Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-main |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/71ea7a79-61c4-44d3-a655-69b385710524
<?php
final class DemoFile
{
public function run(bool $permission): bool
{
switch ($permission) {
case 'VIEW':
return false;
case 'EDIT':
return true;
}
// Comment
return true;
}
}Responsible rules
ChangeSwitchToMatchRector
Expected Behavior
<?php
final class DemoFile
{
public function run(bool $permission): bool
{
return match ($permission) {
'VIEW' => false,
'EDIT' => true,
// Comment
default => true,
};
}
}
}Reactions are currently unavailable