Commit 7c6f0a8
committed
ValidatedSanitizedInput: allow for validation via null coalesce / null coalesce equals
PHP 7.0 introduced the null coalesce operator, while PHP 7.4 will introduce the null coalesce equal operator.
These operators should be accounted for in the `ValidatedSanitizedInput` sniff as valid ways to validate a variable, but should still allow for the sniff to *also* check for sanitization.
Refs:
* https://php.net/manual/en/language.operators.comparison.php#language.operators.comparison.coalesce
* https://wiki.php.net/rfc/isset_ternary
* https://wiki.php.net/rfc/null_coalesce_equal_operator
Related to 764
Fixes 837
Closes 840 which is superseded by this PR1 parent 625f221 commit 7c6f0a8
1 file changed
+32
-2
lines changedLines changed: 32 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
134 | | - | |
135 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
136 | 166 | | |
137 | 167 | | |
138 | 168 | | |
| |||
0 commit comments