Commit 1e88d4b
committed
Tokenizer/PHP: goto label check - minor tweak
While the check for a double colon works correctly when there is no whitespace/comments between the tokens, there could still be unnecessary token walking if there was (whitespace/comments).
Fixed now.
Includes some extra tests (which would previously already pass, but now more efficiently).
Follow up to squizlabs/PHP_CodeSniffer 1551 parent f22e90b commit 1e88d4b
File tree
3 files changed
+23
-3
lines changed- src/Tokenizers
- tests/Core/Tokenizers/PHP
3 files changed
+23
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2271 | 2271 | | |
2272 | 2272 | | |
2273 | 2273 | | |
| 2274 | + | |
2274 | 2275 | | |
2275 | 2276 | | |
2276 | 2277 | | |
| |||
2285 | 2286 | | |
2286 | 2287 | | |
2287 | 2288 | | |
2288 | | - | |
| 2289 | + | |
| 2290 | + | |
2289 | 2291 | | |
2290 | 2292 | | |
2291 | 2293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
71 | 81 | | |
72 | 82 | | |
73 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
182 | 190 | | |
183 | 191 | | |
184 | 192 | | |
| |||
0 commit comments