Commit d74714d
committed
Fix fixer conflict: PSR12/Squiz.Functions.FunctionDeclarationArgumentSpacing
This commit resolves the a fixer conflict between
`Squiz.Functions.FunctionDeclarationArgumentSpacing` and
`Squiz.WhiteSpace.SuperfluousWhitespace`.
This is done by changing the logic within the
`FunctionDeclarationArgumentSpacing` sniff to no longer look at (the length of)
only one `T_WHITESPACE` token, but instead consider all `T_WHITESPACE` tokens
between the type and parameter tokens, and validate on their content (not just
length).
As part of this, the error message has been changed slightly in some
circumstances. The error code has not been changed.
* When there are only space characters between the two tokens, the error
message remains unchanged.
* When there are tabs or newlines included between the two tokens, these are
rendered as part of the error message.1 parent b43e1d8 commit d74714d
File tree
4 files changed
+30
-11
lines changed- src/Standards/Squiz
- Sniffs/Functions
- Tests/Functions
4 files changed
+30
-11
lines changedLines changed: 23 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
238 | | - | |
239 | | - | |
240 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
241 | 243 | | |
242 | 244 | | |
243 | | - | |
| 245 | + | |
244 | 246 | | |
245 | 247 | | |
246 | 248 | | |
247 | | - | |
248 | 249 | | |
249 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
250 | 259 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
255 | 265 | | |
| 266 | + | |
| 267 | + | |
256 | 268 | | |
257 | | - | |
| 269 | + | |
258 | 270 | | |
259 | 271 | | |
260 | 272 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
0 commit comments