Commit d8833d5
committed
Squiz/NonExecutableCode: fold duplicate code
Follow up on commits 0e10f43 and 01754d9, which both deal with fixing bugs where the sniff would not handle if/elseif/else conditions without curly braces correctly.
This commit merges the two near duplicate code blocks, which the above mentioned commits introduced, each containing code doing essentially the same thing.
Also note that `T_ELSE` is handled separately now as `else` does not take parentheses and can therefore not be a parenthesis owner.
This change is already covered by pre-existing tests.1 parent 8947251 commit d8833d5
1 file changed
+7
-30
lines changedLines changed: 7 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
112 | 104 | | |
113 | 105 | | |
114 | 106 | | |
| |||
176 | 168 | | |
177 | 169 | | |
178 | 170 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | 171 | | |
195 | 172 | | |
196 | 173 | | |
| |||
0 commit comments