-
-
Notifications
You must be signed in to change notification settings - Fork 742
Closed
rectorphp/rector-src
#3437Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-main |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/ab671fa0-5f74-4495-b6f6-e8918d8b5f1a
<?php
switch ($file['type']) {
case StorageAttributes::TYPE_DIRECTORY:
$root['folders'][] = $file;
break;
case StorageAttributes::TYPE_FILE:
$root['files'][] = $file;
break;
default:
$root['unknown'][] = $file;
}Responsible rules
ChangeSwitchToMatchRector
Expected Behavior
Code should be skipped: assignment is applied to different variables (or more specifically: different array keys), so should not be converted to a match case.
Reactions are currently unavailable