Commit 01657a9
committed
Various sniffs + File methods: remove redundant code/simplify for T_USE parenthesis owner
As `T_USE` tokens are now parenthesis owners and will have the `parenthesis_*` keys, sniffs do not need to token walk anymore to find the parentheses (or the `T_USE` token).
It has been confirmed that the changes in this commit are all covered by pre-existing tests.
Replaces squizlabs/PHP_CodeSniffer 3338
Closes 431 parent 8e6dc45 commit 01657a9
File tree
8 files changed
+32
-58
lines changed- src
- Files
- Standards
- Generic/Sniffs
- Functions
- WhiteSpace
- PEAR/Sniffs/Functions
- PSR12/Sniffs/Files
- PSR2/Sniffs/Namespaces
- Squiz/Sniffs/Functions
8 files changed
+32
-58
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1698 | 1698 | | |
1699 | 1699 | | |
1700 | 1700 | | |
| 1701 | + | |
1701 | 1702 | | |
1702 | | - | |
1703 | | - | |
1704 | | - | |
1705 | | - | |
1706 | | - | |
1707 | | - | |
1708 | | - | |
1709 | | - | |
1710 | | - | |
1711 | | - | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
1712 | 1706 | | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
1713 | 1710 | | |
1714 | 1711 | | |
1715 | 1712 | | |
| |||
2067 | 2064 | | |
2068 | 2065 | | |
2069 | 2066 | | |
| 2067 | + | |
2070 | 2068 | | |
2071 | 2069 | | |
2072 | 2070 | | |
| |||
2076 | 2074 | | |
2077 | 2075 | | |
2078 | 2076 | | |
2079 | | - | |
2080 | | - | |
2081 | | - | |
2082 | | - | |
2083 | | - | |
2084 | | - | |
2085 | | - | |
2086 | | - | |
2087 | | - | |
2088 | | - | |
2089 | | - | |
2090 | | - | |
2091 | | - | |
2092 | 2077 | | |
2093 | 2078 | | |
2094 | 2079 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 78 | + | |
| 79 | + | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
Lines changed: 5 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
227 | | - | |
228 | | - | |
| 226 | + | |
229 | 227 | | |
230 | 228 | | |
231 | 229 | | |
| |||
281 | 279 | | |
282 | 280 | | |
283 | 281 | | |
284 | | - | |
285 | | - | |
286 | | - | |
| 282 | + | |
| 283 | + | |
287 | 284 | | |
288 | 285 | | |
289 | 286 | | |
| |||
420 | 417 | | |
421 | 418 | | |
422 | 419 | | |
423 | | - | |
424 | | - | |
425 | | - | |
| 420 | + | |
| 421 | + | |
426 | 422 | | |
427 | 423 | | |
428 | 424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
282 | 287 | | |
283 | | - | |
| 288 | + | |
284 | 289 | | |
285 | 290 | | |
286 | 291 | | |
| |||
Lines changed: 4 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
| 87 | + | |
| 88 | + | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
| |||
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 110 | + | |
| 111 | + | |
118 | 112 | | |
119 | 113 | | |
120 | 114 | | |
| |||
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 39 | + | |
| 40 | + | |
44 | 41 | | |
45 | 42 | | |
46 | 43 | | |
| |||
155 | 152 | | |
156 | 153 | | |
157 | 154 | | |
158 | | - | |
| 155 | + | |
159 | 156 | | |
160 | 157 | | |
161 | 158 | | |
162 | | - | |
163 | | - | |
| 159 | + | |
164 | 160 | | |
165 | 161 | | |
166 | 162 | | |
| |||
0 commit comments