-
-
Notifications
You must be signed in to change notification settings - Fork 742
Closed
rectorphp/rector-src
#6740Closed
Copy link
Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | 2.0.9 |
Minimal PHP Code Causing Issue
https://getrector.com/demo/30cf809d-fcf8-4424-8c7c-31ffe56b157e
-$a ? $a : ($a !== false ? $b : null);
+$a ?: $a !== false ? $b : null;a second pass then sets it to
-$a = $a ?: $a !== false ? $b : null;
+$a = ($a ?: $a !== false) ? $b : null;Expected Behaviour
TernaryToElvisRector should apply without removing parenthesis
-$a = $a ? $a : ($a !== false ? $b : null);
+$a = $a ?: ($a !== false ? $b : null);Reactions are currently unavailable