File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
includes/fraud-prevention/models Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change
1
+ Significance: patch
2
+ Type: fix
3
+ Comment: Ignore a PHPCS rule in two lines.
4
+
5
+
Original file line number Diff line number Diff line change @@ -154,6 +154,8 @@ public static function validate_array( array $array ): bool {
154
154
*/
155
155
public static function list ( string $ operator , array $ checks ) {
156
156
if ( ! in_array ( $ operator , self ::$ list_operators , true ) ) {
157
+ // $operator is a predefined constant, no need to escape.
158
+ // phpcs:ignore WordPress.Security.EscapeOutput
157
159
throw new Fraud_Ruleset_Exception ( 'Operator for the check is invalid: ' . $ operator );
158
160
}
159
161
if ( 0 < count (
@@ -183,6 +185,8 @@ function( $check ) {
183
185
*/
184
186
public static function check ( string $ key , string $ operator , $ value ) {
185
187
if ( ! in_array ( $ operator , self ::$ check_operators , true ) ) {
188
+ // $operator is a predefined constant, no need to escape.
189
+ // phpcs:ignore WordPress.Security.EscapeOutput
186
190
throw new Fraud_Ruleset_Exception ( 'Operator for the check is invalid: ' . $ operator );
187
191
}
188
192
You can’t perform that action at this time.
0 commit comments