Commit c028f32
authored
Remove unused variables from a few sniffs (#2514)
* Remove unused variable passed as the third parameter to `preg_match()`
This commit removes three instances where a variable was passed to
`preg_match()` as the third parameter to fill it with the results of the
search, but later it was not used.
* EscapeOutput: remove unused variable `$end`
This commit removes the unnecessary initialization of the variable
`$end` at the beginning of the sniff code. Every single `case` statement
of the `switch` that follows either re-initialize the variable with a
different value or returns without using the variable.1 parent 9f9726a commit c028f32
File tree
3 files changed
+3
-4
lines changed- WordPress/Sniffs
- Security
- WP
- WhiteSpace
3 files changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | 188 | | |
190 | 189 | | |
191 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
873 | 873 | | |
874 | 874 | | |
875 | 875 | | |
876 | | - | |
| 876 | + | |
877 | 877 | | |
878 | 878 | | |
879 | 879 | | |
| |||
969 | 969 | | |
970 | 970 | | |
971 | 971 | | |
972 | | - | |
| 972 | + | |
973 | 973 | | |
974 | 974 | | |
975 | 975 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
| 413 | + | |
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| |||
0 commit comments