Commit 13e2191
committed
Fix removing elseifs that should be skipped
I accidentally put an && ! condition rather than
an ||, causing elseifs with skippable exprs to get
removed rather than being skipped.
- Fix the conditional
- Add a test for skippable exprs in elseif
condition.1 parent 2d7c59c commit 13e2191
File tree
2 files changed
+18
-1
lines changed- rules-tests/DeadCode/Rector/If_/RemoveDeadIfBlocksRector/Fixture
- rules/DeadCode/Rector/If_
2 files changed
+18
-1
lines changedLines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
0 commit comments