Commit d1a7027
PHP 8.0 | Squiz/DisallowMultipleAssignments: correct errorcode for assignment in match expression
The `Squiz.PHP.DisallowMultipleAssignments` sniff differentiates in the error code between "normal" assignments which aren't the only thing on a line and assignments in control structure conditions.
This adds `match` to the list of control structures, so it gets the correct error code.
Includes unit test.1 parent bf7d788 commit d1a7027
File tree
3 files changed
+15
-0
lines changed- src/Standards/Squiz
- Sniffs/PHP
- Tests/PHP
3 files changed
+15
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
0 commit comments