Completed
Pull Request — master (#834)
by Stephanie
39s
created
classes/models/FrmField.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 		$values = FrmAppHelper::maybe_filter_array( $values, array( 'name', 'description' ) );
235 235
 
236 236
 		foreach ( array( 'name', 'description', 'type', 'default_value' ) as $col ) {
237
-			$new_values[ $col ] = $values[ $col ];
237
+			$new_values[$col] = $values[$col];
238 238
 		}
239 239
 
240 240
 		$new_values['options']       = self::maybe_filter_options( $values['options'] );
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 		$new_values['created_at']    = current_time( 'mysql', 1 );
246 246
 
247 247
 		if ( isset( $values['id'] ) ) {
248
-			$frm_duplicate_ids[ $values['field_key'] ] = $new_values['field_key'];
248
+			$frm_duplicate_ids[$values['field_key']] = $new_values['field_key'];
249 249
 			$new_values                                = apply_filters( 'frm_duplicated_field', $new_values );
250 250
 		}
251 251
 
@@ -254,9 +254,9 @@  discard block
 block discarded – undo
254 254
 		foreach ( $new_values as $k => $v ) {
255 255
 			if ( is_array( $v ) ) {
256 256
 				if ( $k === 'default_value' ) {
257
-					$new_values[ $k ] = FrmAppHelper::maybe_json_encode( $v );
257
+					$new_values[$k] = FrmAppHelper::maybe_json_encode( $v );
258 258
 				} else {
259
-					$new_values[ $k ] = serialize( $v );
259
+					$new_values[$k] = serialize( $v );
260 260
 				}
261 261
 			}
262 262
 			unset( $k, $v );
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 
276 276
 		if ( $query_results ) {
277 277
 			if ( isset( $values['id'] ) ) {
278
-				$frm_duplicate_ids[ $values['id'] ] = $new_id;
278
+				$frm_duplicate_ids[$values['id']] = $new_id;
279 279
 			}
280 280
 
281 281
 			return $new_id;
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 	public static function duplicate( $old_form_id, $form_id, $copy_keys = false, $blog_id = false ) {
339 339
 		global $frm_duplicate_ids;
340 340
 
341
-		$where  = array(
341
+		$where = array(
342 342
 			array(
343 343
 				'or'                => 1,
344 344
 				'fi.form_id'        => $old_form_id,
@@ -384,8 +384,8 @@  discard block
 block discarded – undo
384 384
 
385 385
 			$values                                 = apply_filters( 'frm_duplicated_field', $values );
386 386
 			$new_id                                 = self::create( $values );
387
-			$frm_duplicate_ids[ $field->id ]        = $new_id;
388
-			$frm_duplicate_ids[ $field->field_key ] = $new_id;
387
+			$frm_duplicate_ids[$field->id]        = $new_id;
388
+			$frm_duplicate_ids[$field->field_key] = $new_id;
389 389
 			unset( $field );
390 390
 		}
391 391
 	}
@@ -417,11 +417,11 @@  discard block
 block discarded – undo
417 417
 
418 418
 		// serialize array values
419 419
 		foreach ( array( 'field_options', 'options' ) as $opt ) {
420
-			if ( isset( $values[ $opt ] ) && is_array( $values[ $opt ] ) ) {
420
+			if ( isset( $values[$opt] ) && is_array( $values[$opt] ) ) {
421 421
 				if ( 'field_options' === $opt ) {
422
-					$values[ $opt ] = self::maybe_filter_options( $values[ $opt ] );
422
+					$values[$opt] = self::maybe_filter_options( $values[$opt] );
423 423
 				}
424
-				$values[ $opt ] = serialize( $values[ $opt ] );
424
+				$values[$opt] = serialize( $values[$opt] );
425 425
 			}
426 426
 		}
427 427
 		if ( isset( $values['default_value'] ) && is_array( $values['default_value'] ) ) {
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 				'id'        => $id,
574 574
 				'field_key' => $id,
575 575
 			);
576
-			$type  = FrmDb::get_var( 'frm_fields', $where, $col );
576
+			$type = FrmDb::get_var( 'frm_fields', $where, $col );
577 577
 		}
578 578
 
579 579
 		return $type;
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
 					continue;
600 600
 				}
601 601
 
602
-				$fields[ $result->id ] = $result;
602
+				$fields[$result->id] = $result;
603 603
 				$count ++;
604 604
 				if ( $limit == 1 ) {
605 605
 					$fields = $result;
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
 			$count  = 0;
646 646
 			foreach ( $results as $result ) {
647 647
 				$count ++;
648
-				$fields[ $result->id ] = $result;
648
+				$fields[$result->id] = $result;
649 649
 				if ( ! empty( $limit ) && $count >= $limit ) {
650 650
 					break;
651 651
 				}
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
 			}
715 715
 
716 716
 			if ( ! empty( $sub_fields ) ) {
717
-				$index        = $k + $index_offset;
717
+				$index = $k + $index_offset;
718 718
 				$index_offset += count( $sub_fields );
719 719
 				array_splice( $results, $index, 0, $sub_fields );
720 720
 			}
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
 		$query_type = ( $limit == ' LIMIT 1' || $limit == 1 ) ? 'row' : 'results';
760 760
 
761 761
 		if ( is_array( $where ) ) {
762
-			$args    = array(
762
+			$args = array(
763 763
 				'order_by' => $order_by,
764 764
 				'limit'    => $limit,
765 765
 			);
@@ -790,9 +790,9 @@  discard block
 block discarded – undo
790 790
 				FrmDb::set_cache( $result->field_key, $result, 'frm_field' );
791 791
 
792 792
 				self::prepare_options( $result );
793
-				$results[ $r_key ]->field_options = $result->field_options;
794
-				$results[ $r_key ]->options       = $result->options;
795
-				$results[ $r_key ]->default_value = $result->default_value;
793
+				$results[$r_key]->field_options = $result->field_options;
794
+				$results[$r_key]->options       = $result->options;
795
+				$results[$r_key]->default_value = $result->default_value;
796 796
 
797 797
 				unset( $r_key, $result );
798 798
 			}
@@ -994,23 +994,23 @@  discard block
 block discarded – undo
994 994
 	}
995 995
 
996 996
 	public static function is_option_true_in_array( $field, $option ) {
997
-		return isset( $field[ $option ] ) && $field[ $option ];
997
+		return isset( $field[$option] ) && $field[$option];
998 998
 	}
999 999
 
1000 1000
 	public static function is_option_true_in_object( $field, $option ) {
1001
-		return isset( $field->field_options[ $option ] ) && $field->field_options[ $option ];
1001
+		return isset( $field->field_options[$option] ) && $field->field_options[$option];
1002 1002
 	}
1003 1003
 
1004 1004
 	public static function is_option_empty_in_array( $field, $option ) {
1005
-		return ! isset( $field[ $option ] ) || empty( $field[ $option ] );
1005
+		return ! isset( $field[$option] ) || empty( $field[$option] );
1006 1006
 	}
1007 1007
 
1008 1008
 	public static function is_option_empty_in_object( $field, $option ) {
1009
-		return ! isset( $field->field_options[ $option ] ) || empty( $field->field_options[ $option ] );
1009
+		return ! isset( $field->field_options[$option] ) || empty( $field->field_options[$option] );
1010 1010
 	}
1011 1011
 
1012 1012
 	public static function is_option_value_in_object( $field, $option ) {
1013
-		return isset( $field->field_options[ $option ] ) && $field->field_options[ $option ] != '';
1013
+		return isset( $field->field_options[$option] ) && $field->field_options[$option] != '';
1014 1014
 	}
1015 1015
 
1016 1016
 	/**
@@ -1028,10 +1028,10 @@  discard block
 block discarded – undo
1028 1028
 
1029 1029
 	public static function get_option_in_array( $field, $option ) {
1030 1030
 
1031
-		if ( isset( $field[ $option ] ) ) {
1032
-			$this_option = $field[ $option ];
1033
-		} elseif ( isset( $field['field_options'] ) && is_array( $field['field_options'] ) && isset( $field['field_options'][ $option ] ) ) {
1034
-			$this_option = $field['field_options'][ $option ];
1031
+		if ( isset( $field[$option] ) ) {
1032
+			$this_option = $field[$option];
1033
+		} elseif ( isset( $field['field_options'] ) && is_array( $field['field_options'] ) && isset( $field['field_options'][$option] ) ) {
1034
+			$this_option = $field['field_options'][$option];
1035 1035
 		} else {
1036 1036
 			$this_option = '';
1037 1037
 		}
@@ -1040,7 +1040,7 @@  discard block
 block discarded – undo
1040 1040
 	}
1041 1041
 
1042 1042
 	public static function get_option_in_object( $field, $option ) {
1043
-		return isset( $field->field_options[ $option ] ) ? $field->field_options[ $option ] : '';
1043
+		return isset( $field->field_options[$option] ) ? $field->field_options[$option] : '';
1044 1044
 	}
1045 1045
 
1046 1046
 	/**
Please login to merge, or discard this patch.
classes/models/FrmInbox.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 			return;
94 94
 		}
95 95
 
96
-		if ( isset( self::$messages[ $message['key'] ] ) && ! isset( $message['force'] ) ) {
96
+		if ( isset( self::$messages[$message['key']] ) && ! isset( $message['force'] ) ) {
97 97
 			// Don't replace messages unless required.
98 98
 			return;
99 99
 		}
@@ -102,13 +102,13 @@  discard block
 block discarded – undo
102 102
 			return;
103 103
 		}
104 104
 
105
-		if ( isset( self::$messages[ $message['key'] ] ) ) {
105
+		if ( isset( self::$messages[$message['key']] ) ) {
106 106
 			// Move up and mark as new.
107
-			unset( self::$messages[ $message['key'] ] );
107
+			unset( self::$messages[$message['key']] );
108 108
 		}
109 109
 
110 110
 		$this->fill_message( $message );
111
-		self::$messages[ $message['key'] ] = $message;
111
+		self::$messages[$message['key']] = $message;
112 112
 
113 113
 		$this->update_list();
114 114
 
@@ -136,11 +136,11 @@  discard block
 block discarded – undo
136 136
 	private function clean_messages() {
137 137
 		$removed = false;
138 138
 		foreach ( self::$messages as $t => $message ) {
139
-			$read      = isset( $message['read'] ) && ! empty( $message['read'] ) && isset( $message['read'][ get_current_user_id() ] ) && $message['read'][ get_current_user_id() ] < strtotime( '-1 month' );
140
-			$dismissed = isset( $message['dismissed'] ) && ! empty( $message['dismissed'] ) && isset( $message['dismissed'][ get_current_user_id() ] ) && $message['dismissed'][ get_current_user_id() ] < strtotime( '-1 week' );
139
+			$read      = isset( $message['read'] ) && ! empty( $message['read'] ) && isset( $message['read'][get_current_user_id()] ) && $message['read'][get_current_user_id()] < strtotime( '-1 month' );
140
+			$dismissed = isset( $message['dismissed'] ) && ! empty( $message['dismissed'] ) && isset( $message['dismissed'][get_current_user_id()] ) && $message['dismissed'][get_current_user_id()] < strtotime( '-1 week' );
141 141
 			$expired   = $this->is_expired( $message );
142 142
 			if ( $read || $expired || $dismissed ) {
143
-				unset( self::$messages[ $t ] );
143
+				unset( self::$messages[$t] );
144 144
 				$removed = true;
145 145
 			}
146 146
 		}
@@ -153,11 +153,11 @@  discard block
 block discarded – undo
153 153
 	private function filter_messages( &$messages ) {
154 154
 		$user_id = get_current_user_id();
155 155
 		foreach ( $messages as $k => $message ) {
156
-			$dismissed = isset( $message['dismissed'] ) && isset( $message['dismissed'][ $user_id ] );
156
+			$dismissed = isset( $message['dismissed'] ) && isset( $message['dismissed'][$user_id] );
157 157
 			if ( empty( $k ) || $this->is_expired( $message ) || $dismissed ) {
158
-				unset( $messages[ $k ] );
158
+				unset( $messages[$k] );
159 159
 			} elseif ( ! $this->is_for_user( $message ) ) {
160
-				unset( $messages[ $k ] );
160
+				unset( $messages[$k] );
161 161
 			}
162 162
 		}
163 163
 		$messages = apply_filters( 'frm_filter_inbox', $messages );
@@ -196,14 +196,14 @@  discard block
 block discarded – undo
196 196
 	 * @param string $key
197 197
 	 */
198 198
 	public function mark_read( $key ) {
199
-		if ( ! $key || ! isset( self::$messages[ $key ] ) ) {
199
+		if ( ! $key || ! isset( self::$messages[$key] ) ) {
200 200
 			return;
201 201
 		}
202 202
 
203
-		if ( ! isset( self::$messages[ $key ]['read'] ) ) {
204
-			self::$messages[ $key ]['read'] = array();
203
+		if ( ! isset( self::$messages[$key]['read'] ) ) {
204
+			self::$messages[$key]['read'] = array();
205 205
 		}
206
-		self::$messages[ $key ]['read'][ get_current_user_id() ] = time();
206
+		self::$messages[$key]['read'][get_current_user_id()] = time();
207 207
 
208 208
 		$this->update_list();
209 209
 	}
@@ -214,9 +214,9 @@  discard block
 block discarded – undo
214 214
 	 * @since 4.05.02
215 215
 	 */
216 216
 	public function mark_unread( $key ) {
217
-		$is_read = isset( self::$messages[ $key ] ) && isset( self::$messages[ $key ]['read'] ) && isset( self::$messages[ $key ]['read'][ get_current_user_id() ] );
217
+		$is_read = isset( self::$messages[$key] ) && isset( self::$messages[$key]['read'] ) && isset( self::$messages[$key]['read'][get_current_user_id()] );
218 218
 		if ( $is_read ) {
219
-			unset( self::$messages[ $key ]['read'][ get_current_user_id() ] );
219
+			unset( self::$messages[$key]['read'][get_current_user_id()] );
220 220
 			$this->update_list();
221 221
 		}
222 222
 	}
@@ -230,14 +230,14 @@  discard block
 block discarded – undo
230 230
 			return;
231 231
 		}
232 232
 
233
-		if ( ! isset( self::$messages[ $key ] ) ) {
233
+		if ( ! isset( self::$messages[$key] ) ) {
234 234
 			return;
235 235
 		}
236 236
 
237
-		if ( ! isset( self::$messages[ $key ]['dismissed'] ) ) {
238
-			self::$messages[ $key ]['dismissed'] = array();
237
+		if ( ! isset( self::$messages[$key]['dismissed'] ) ) {
238
+			self::$messages[$key]['dismissed'] = array();
239 239
 		}
240
-		self::$messages[ $key ]['dismissed'][ get_current_user_id() ] = time();
240
+		self::$messages[$key]['dismissed'][get_current_user_id()] = time();
241 241
 
242 242
 		$this->update_list();
243 243
 	}
@@ -249,11 +249,11 @@  discard block
 block discarded – undo
249 249
 		$user_id = get_current_user_id();
250 250
 		foreach ( self::$messages as $key => $message ) {
251 251
 			if ( ! isset( $message['dismissed'] ) ) {
252
-				self::$messages[ $key ]['dismissed'] = array();
252
+				self::$messages[$key]['dismissed'] = array();
253 253
 			}
254 254
 
255
-			if ( ! isset( $message['dismissed'][ $user_id ] ) ) {
256
-				self::$messages[ $key ]['dismissed'][ $user_id ] = time();
255
+			if ( ! isset( $message['dismissed'][$user_id] ) ) {
256
+				self::$messages[$key]['dismissed'][$user_id] = time();
257 257
 			}
258 258
 		}
259 259
 		$this->update_list();
@@ -263,8 +263,8 @@  discard block
 block discarded – undo
263 263
 		$messages = $this->get_messages( 'filter' );
264 264
 		$user_id  = get_current_user_id();
265 265
 		foreach ( $messages as $t => $message ) {
266
-			if ( isset( $message['read'] ) && isset( $message['read'][ $user_id ] ) ) {
267
-				unset( $messages[ $t ] );
266
+			if ( isset( $message['read'] ) && isset( $message['read'][$user_id] ) ) {
267
+				unset( $messages[$t] );
268 268
 			}
269 269
 		}
270 270
 		return $messages;
@@ -288,8 +288,8 @@  discard block
 block discarded – undo
288 288
 	 * @since 4.05.02
289 289
 	 */
290 290
 	public function remove( $key ) {
291
-		if ( isset( self::$messages[ $key ] ) ) {
292
-			unset( self::$messages[ $key ] );
291
+		if ( isset( self::$messages[$key] ) ) {
292
+			unset( self::$messages[$key] );
293 293
 			$this->update_list();
294 294
 		}
295 295
 	}
Please login to merge, or discard this patch.
classes/models/FrmFormApi.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 			}
97 97
 			$cats = array_intersect( $this->skip_categories(), $addon['categories'] );
98 98
 			if ( ! empty( $cats ) ) {
99
-				unset( $addons[ $k ] );
99
+				unset( $addons[$k] );
100 100
 			}
101 101
 		}
102 102
 
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
 					return $addon;
139 139
 				}
140 140
 			}
141
-		} elseif ( isset( $addons[ $download_id ] ) ) {
142
-			$plugin = $addons[ $download_id ];
141
+		} elseif ( isset( $addons[$download_id] ) ) {
142
+			$plugin = $addons[$download_id];
143 143
 		}
144 144
 
145 145
 		return $plugin;
Please login to merge, or discard this patch.
classes/controllers/FrmWelcomeController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,8 @@
 block discarded – undo
42 42
 		}
43 43
 
44 44
 		// Only do this for single site installs.
45
-		if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
45
+		if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) {
46
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
46 47
 			return;
47 48
 		}
48 49
 
Please login to merge, or discard this patch.
classes/controllers/FrmEntriesController.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -75,19 +75,19 @@  discard block
 block discarded – undo
75 75
 		global $frm_vars;
76 76
 		$form_id = FrmForm::get_current_form_id();
77 77
 
78
-		$columns[ $form_id . '_id' ]       = 'ID';
79
-		$columns[ $form_id . '_item_key' ] = esc_html__( 'Entry Key', 'formidable' );
78
+		$columns[$form_id . '_id']       = 'ID';
79
+		$columns[$form_id . '_item_key'] = esc_html__( 'Entry Key', 'formidable' );
80 80
 
81 81
 		if ( $form_id ) {
82 82
 			self::get_columns_for_form( $form_id, $columns );
83 83
 		} else {
84
-			$columns[ $form_id . '_form_id' ] = __( 'Form', 'formidable' );
85
-			$columns[ $form_id . '_name' ]    = __( 'Entry Name', 'formidable' );
86
-			$columns[ $form_id . '_user_id' ] = __( 'Created By', 'formidable' );
84
+			$columns[$form_id . '_form_id'] = __( 'Form', 'formidable' );
85
+			$columns[$form_id . '_name']    = __( 'Entry Name', 'formidable' );
86
+			$columns[$form_id . '_user_id'] = __( 'Created By', 'formidable' );
87 87
 		}
88 88
 
89
-		$columns[ $form_id . '_created_at' ] = __( 'Entry creation date', 'formidable' );
90
-		$columns[ $form_id . '_updated_at' ] = __( 'Entry update date', 'formidable' );
89
+		$columns[$form_id . '_created_at'] = __( 'Entry creation date', 'formidable' );
90
+		$columns[$form_id . '_updated_at'] = __( 'Entry update date', 'formidable' );
91 91
 		self::maybe_add_ip_col( $form_id, $columns );
92 92
 
93 93
 		$frm_vars['cols'] = $columns;
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
 
146 146
 		foreach ( $sub_form_cols as $k => $sub_form_col ) {
147 147
 			if ( FrmField::is_no_save_field( $sub_form_col->type ) ) {
148
-				unset( $sub_form_cols[ $k ] );
148
+				unset( $sub_form_cols[$k] );
149 149
 				continue;
150 150
 			}
151
-			$columns[ $form_id . '_' . $sub_form_col->field_key . '-_-' . $field->id ] = FrmAppHelper::truncate( $sub_form_col->name, 35 );
151
+			$columns[$form_id . '_' . $sub_form_col->field_key . '-_-' . $field->id] = FrmAppHelper::truncate( $sub_form_col->name, 35 );
152 152
 			unset( $sub_form_col );
153 153
 		}
154 154
 	}
@@ -165,15 +165,15 @@  discard block
 block discarded – undo
165 165
 		$has_separate_value = ! FrmField::is_option_empty( $field, 'separate_value' );
166 166
 		$is_post_status     = FrmField::is_option_true( $field, 'post_field' ) && $field->field_options['post_field'] == 'post_status';
167 167
 		if ( $has_separate_value && ! $is_post_status ) {
168
-			$columns[ $form_id . '_frmsep_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 );
168
+			$columns[$form_id . '_frmsep_' . $col_id] = FrmAppHelper::truncate( $field->name, 35 );
169 169
 		}
170 170
 
171
-		$columns[ $form_id . '_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 );
171
+		$columns[$form_id . '_' . $col_id] = FrmAppHelper::truncate( $field->name, 35 );
172 172
 	}
173 173
 
174 174
 	private static function maybe_add_ip_col( $form_id, &$columns ) {
175 175
 		if ( FrmAppHelper::ips_saved() ) {
176
-			$columns[ $form_id . '_ip' ] = 'IP';
176
+			$columns[$form_id . '_ip'] = 'IP';
177 177
 		}
178 178
 	}
179 179
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 		foreach ( $meta_value as $mk => $mv ) {
212 212
 			// Remove blank values.
213 213
 			if ( empty( $mv ) ) {
214
-				unset( $meta_value[ $mk ] );
214
+				unset( $meta_value[$mk] );
215 215
 			}
216 216
 		}
217 217
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 
288 288
 		foreach ( $fields as $field ) {
289 289
 			if ( self::field_supports_sorting( $field ) ) {
290
-				$columns[ $form_id . '_' . $field->field_key ] = 'meta_' . $field->id;
290
+				$columns[$form_id . '_' . $field->field_key] = 'meta_' . $field->id;
291 291
 			}
292 292
 		}
293 293
 
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 			$atts['form_id'] . '_item_key' => '',
364 364
 			$atts['form_id'] . '_id'       => '',
365 365
 		);
366
-		$cols         = $remove_first + array_reverse( $frm_vars['cols'], true );
366
+		$cols = $remove_first + array_reverse( $frm_vars['cols'], true );
367 367
 
368 368
 		$i = $atts['i'];
369 369
 
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 
375 375
 			if ( empty( $result ) || ! in_array( $col_key, $result, true ) ) {
376 376
 				$result[] = $col_key;
377
-				$i--;
377
+				$i --;
378 378
 			}
379 379
 
380 380
 			unset( $col_key, $col );
@@ -507,9 +507,9 @@  discard block
 block discarded – undo
507 507
 		if ( ! isset( $frm_vars['form_params'] ) ) {
508 508
 			$frm_vars['form_params'] = array();
509 509
 		}
510
-		$frm_vars['form_params'][ $form->id ] = $params;
510
+		$frm_vars['form_params'][$form->id] = $params;
511 511
 
512
-		if ( isset( $frm_vars['created_entries'][ $form_id ] ) ) {
512
+		if ( isset( $frm_vars['created_entries'][$form_id] ) ) {
513 513
 			return;
514 514
 		}
515 515
 
@@ -525,16 +525,16 @@  discard block
 block discarded – undo
525 525
 		 */
526 526
 		$errors = apply_filters( 'frm_entries_before_create', $errors, $form );
527 527
 
528
-		$frm_vars['created_entries'][ $form_id ] = array( 'errors' => $errors );
528
+		$frm_vars['created_entries'][$form_id] = array( 'errors' => $errors );
529 529
 
530 530
 		if ( empty( $errors ) ) {
531 531
 			$_POST['frm_skip_cookie'] = 1;
532 532
 			$do_success               = false;
533 533
 			if ( $params['action'] === 'create' ) {
534
-				if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][ $form_id ]['entry_id'] ) ) {
535
-					$frm_vars['created_entries'][ $form_id ]['entry_id'] = FrmEntry::create( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
534
+				if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][$form_id]['entry_id'] ) ) {
535
+					$frm_vars['created_entries'][$form_id]['entry_id'] = FrmEntry::create( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
536 536
 
537
-					$params['id'] = $frm_vars['created_entries'][ $form_id ]['entry_id'];
537
+					$params['id'] = $frm_vars['created_entries'][$form_id]['entry_id'];
538 538
 					$do_success   = true;
539 539
 				}
540 540
 			}
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -491,7 +491,8 @@
 block discarded – undo
491 491
 
492 492
 	public static function process_entry( $errors = '', $ajax = false ) {
493 493
 		$form_id = FrmAppHelper::get_post_param( 'form_id', '', 'absint' );
494
-		if ( FrmAppHelper::is_admin() || empty( $_POST ) || empty( $form_id ) || ! isset( $_POST['item_key'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
494
+		if ( FrmAppHelper::is_admin() || empty( $_POST ) || empty( $form_id ) || ! isset( $_POST['item_key'] ) ) {
495
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
495 496
 			return;
496 497
 		}
497 498
 
Please login to merge, or discard this patch.
classes/models/fields/FrmFieldUserID.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 	protected function get_field_value( $args ) {
53 53
 		$user_ID      = get_current_user_id();
54 54
 		$user_ID      = ( $user_ID ? $user_ID : '' );
55
-		$posted_value = ( FrmAppHelper::is_admin() && $_POST && isset( $_POST['item_meta'][ $this->field['id'] ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
55
+		$posted_value = ( FrmAppHelper::is_admin() && $_POST && isset( $_POST['item_meta'][$this->field['id']] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
56 56
 		$action       = ( isset( $args['action'] ) ? $args['action'] : ( isset( $args['form_action'] ) ? $args['form_action'] : '' ) );
57 57
 		$updating     = $action == 'update';
58 58
 		return ( is_numeric( $this->field['value'] ) || $posted_value || $updating ) ? $this->field['value'] : $user_ID;
Please login to merge, or discard this patch.
classes/helpers/FrmFieldsHelper.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -180,7 +180,8 @@  discard block
 block discarded – undo
180 180
 	 * @param mixed $value
181 181
 	 */
182 182
 	private static function get_posted_field_setting( $setting, &$value ) {
183
-		if ( ! isset( $_POST['field_options'][ $setting ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
183
+		if ( ! isset( $_POST['field_options'][ $setting ] ) ) {
184
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
184 185
 			return;
185 186
 		}
186 187
 
@@ -1084,7 +1085,8 @@  discard block
 block discarded – undo
1084 1085
 
1085 1086
 		// Check posted vals before checking saved values
1086 1087
 		// For fields inside repeating sections - note, don't check if $pointer is true because it will often be zero
1087
-		if ( $parent && isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1088
+		if ( $parent && isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ) {
1089
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
1088 1090
 			if ( FrmField::is_field_with_multiple_values( $field ) ) {
1089 1091
 				// phpcs:ignore WordPress.Security.NonceVerification.Missing
1090 1092
 				$other_val = isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ][ $opt_key ] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ][ $opt_key ] ) ) : '';
@@ -1094,7 +1096,8 @@  discard block
 block discarded – undo
1094 1096
 
1095 1097
 			return $other_val;
1096 1098
 
1097
-		} elseif ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][ $field['id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1099
+		} elseif ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][ $field['id'] ] ) ) {
1100
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
1098 1101
 			// For normal fields
1099 1102
 
1100 1103
 			if ( FrmField::is_field_with_multiple_values( $field ) ) {
Please login to merge, or discard this patch.
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 			if ( in_array( $type, array( 'data', 'lookup' ) ) ) {
27 27
 				$values['field_options']['data_type'] = $setting;
28 28
 			} else {
29
-				$values['field_options'][ $setting ] = 1;
29
+				$values['field_options'][$setting] = 1;
30 30
 			}
31 31
 		}
32 32
 
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
 		}
134 134
 
135 135
 		foreach ( $defaults as $opt => $default ) {
136
-			$values[ $opt ] = isset( $field->field_options[ $opt ] ) ? $field->field_options[ $opt ] : $default;
136
+			$values[$opt] = isset( $field->field_options[$opt] ) ? $field->field_options[$opt] : $default;
137 137
 
138 138
 			if ( $check_post ) {
139
-				self::get_posted_field_setting( $opt . '_' . $field->id, $values[ $opt ] );
139
+				self::get_posted_field_setting( $opt . '_' . $field->id, $values[$opt] );
140 140
 			}
141 141
 
142 142
 			unset( $opt, $default );
@@ -180,18 +180,18 @@  discard block
 block discarded – undo
180 180
 	 * @param mixed $value
181 181
 	 */
182 182
 	private static function get_posted_field_setting( $setting, &$value ) {
183
-		if ( ! isset( $_POST['field_options'][ $setting ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
183
+		if ( ! isset( $_POST['field_options'][$setting] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
184 184
 			return;
185 185
 		}
186 186
 
187 187
 		if ( strpos( $setting, 'html' ) !== false ) {
188 188
 			// Strip slashes from HTML but not regex or script tags.
189
-			$value = wp_unslash( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
189
+			$value = wp_unslash( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
190 190
 		} elseif ( strpos( $setting, 'format_' ) === 0 ) {
191 191
 			// TODO: Remove stripslashes on output, and use on input only.
192
-			$value = sanitize_text_field( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.NonceVerification.Missing
192
+			$value = sanitize_text_field( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.NonceVerification.Missing
193 193
 		} else {
194
-			$value = wp_unslash( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
194
+			$value = wp_unslash( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
195 195
 			FrmAppHelper::sanitize_value( 'wp_kses_post', $value );
196 196
 		}
197 197
 	}
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 		$values['default_value'] = FrmAppHelper::maybe_json_encode( $field->default_value );
265 265
 
266 266
 		foreach ( array( 'name', 'description', 'type', 'field_order', 'field_options', 'required' ) as $col ) {
267
-			$values[ $col ] = $field->{$col};
267
+			$values[$col] = $field->{$col};
268 268
 		}
269 269
 	}
270 270
 
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 		);
305 305
 
306 306
 		$msg = FrmField::get_option( $field, $error );
307
-		$msg = empty( $msg ) ? $defaults[ $error ]['part'] : $msg;
307
+		$msg = empty( $msg ) ? $defaults[$error]['part'] : $msg;
308 308
 		$msg = do_shortcode( $msg );
309 309
 
310 310
 		return $msg;
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 		}
415 415
 
416 416
 		$base_name = 'default_value_' . $field['id'];
417
-		$html_id    = isset( $field['html_id'] ) ? $field['html_id'] : self::get_html_id( $field );
417
+		$html_id = isset( $field['html_id'] ) ? $field['html_id'] : self::get_html_id( $field );
418 418
 
419 419
 		$default_type = self::get_default_value_type( $field );
420 420
 
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
 				continue;
739 739
 			}
740 740
 
741
-			$atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[3][ $short_key ] );
741
+			$atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[3][$short_key] );
742 742
 			$tag  = FrmShortcodeHelper::get_shortcode_tag( $shortcodes, $short_key );
743 743
 
744 744
 			$atts['entry'] = $entry;
@@ -748,7 +748,7 @@  discard block
 block discarded – undo
748 748
 			if ( $replace_with !== null ) {
749 749
 				$replace_with = self::trigger_shortcode_atts( $replace_with, $atts );
750 750
 				self::sanitize_embedded_shortcodes( compact( 'entry' ), $replace_with );
751
-				$content = str_replace( $shortcodes[0][ $short_key ], $replace_with, $content );
751
+				$content = str_replace( $shortcodes[0][$short_key], $replace_with, $content );
752 752
 			}
753 753
 
754 754
 			unset( $atts, $replace_with );
@@ -821,8 +821,8 @@  discard block
 block discarded – undo
821 821
 
822 822
 		$dynamic_default = array( 'admin_email', 'siteurl', 'frmurl', 'sitename', 'get' );
823 823
 
824
-		if ( isset( $shortcode_values[ $atts['tag'] ] ) ) {
825
-			$replace_with = $shortcode_values[ $atts['tag'] ];
824
+		if ( isset( $shortcode_values[$atts['tag']] ) ) {
825
+			$replace_with = $shortcode_values[$atts['tag']];
826 826
 		} elseif ( in_array( $atts['tag'], $dynamic_default ) ) {
827 827
 			$replace_with = self::dynamic_default_values( $atts['tag'], $atts );
828 828
 		} elseif ( $clean_tag == 'user_agent' ) {
@@ -1033,8 +1033,8 @@  discard block
 block discarded – undo
1033 1033
 			self::field_types_for_input( $single_input, $field_selection, $field_types );
1034 1034
 		} elseif ( in_array( $type, $multiple_input ) ) {
1035 1035
 			self::field_types_for_input( $multiple_input, $field_selection, $field_types );
1036
-		} elseif ( isset( $field_selection[ $type ] ) ) {
1037
-			$field_types[ $type ] = $field_selection[ $type ];
1036
+		} elseif ( isset( $field_selection[$type] ) ) {
1037
+			$field_types[$type] = $field_selection[$type];
1038 1038
 		}
1039 1039
 
1040 1040
 		$field_types = apply_filters( 'frm_switch_field_types', $field_types, compact( 'type', 'field_selection' ) );
@@ -1067,7 +1067,7 @@  discard block
 block discarded – undo
1067 1067
 
1068 1068
 	private static function field_types_for_input( $inputs, $fields, &$field_types ) {
1069 1069
 		foreach ( $inputs as $input ) {
1070
-			$field_types[ $input ] = $fields[ $input ];
1070
+			$field_types[$input] = $fields[$input];
1071 1071
 			unset( $input );
1072 1072
 		}
1073 1073
 	}
@@ -1099,7 +1099,7 @@  discard block
 block discarded – undo
1099 1099
 			'parent'  => false,
1100 1100
 			'pointer' => false,
1101 1101
 		);
1102
-		$args     = wp_parse_args( $args, $defaults );
1102
+		$args = wp_parse_args( $args, $defaults );
1103 1103
 
1104 1104
 		$opt_key   = $args['opt_key'];
1105 1105
 		$field     = $args['field'];
@@ -1115,24 +1115,24 @@  discard block
 block discarded – undo
1115 1115
 
1116 1116
 		// Check posted vals before checking saved values
1117 1117
 		// For fields inside repeating sections - note, don't check if $pointer is true because it will often be zero
1118
-		if ( $parent && isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1118
+		if ( $parent && isset( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1119 1119
 			if ( FrmField::is_field_with_multiple_values( $field ) ) {
1120 1120
 				// phpcs:ignore WordPress.Security.NonceVerification.Missing
1121
-				$other_val = isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ][ $opt_key ] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ][ $opt_key ] ) ) : '';
1121
+				$other_val = isset( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']][$opt_key] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']][$opt_key] ) ) : '';
1122 1122
 			} else {
1123
-				$other_val = sanitize_text_field( wp_unslash( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
1123
+				$other_val = sanitize_text_field( wp_unslash( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
1124 1124
 			}
1125 1125
 
1126 1126
 			return $other_val;
1127 1127
 
1128
-		} elseif ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][ $field['id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1128
+		} elseif ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][$field['id']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1129 1129
 			// For normal fields
1130 1130
 
1131 1131
 			if ( FrmField::is_field_with_multiple_values( $field ) ) {
1132 1132
 				// phpcs:ignore WordPress.Security.NonceVerification.Missing
1133
-				$other_val = isset( $_POST['item_meta']['other'][ $field['id'] ][ $opt_key ] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][ $field['id'] ][ $opt_key ] ) ) : '';
1133
+				$other_val = isset( $_POST['item_meta']['other'][$field['id']][$opt_key] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][$field['id']][$opt_key] ) ) : '';
1134 1134
 			} else {
1135
-				$other_val = sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][ $field['id'] ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
1135
+				$other_val = sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][$field['id']] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
1136 1136
 			}
1137 1137
 
1138 1138
 			return $other_val;
@@ -1142,8 +1142,8 @@  discard block
 block discarded – undo
1142 1142
 		if ( $field['type'] === 'checkbox' && is_array( $field['value'] ) ) {
1143 1143
 			// Check if there is an "other" val in saved value and make sure the
1144 1144
 			// "other" val is not equal to the Other checkbox option
1145
-			if ( isset( $field['value'][ $opt_key ] ) && $field['options'][ $opt_key ] != $field['value'][ $opt_key ] ) {
1146
-				$other_val = $field['value'][ $opt_key ];
1145
+			if ( isset( $field['value'][$opt_key] ) && $field['options'][$opt_key] != $field['value'][$opt_key] ) {
1146
+				$other_val = $field['value'][$opt_key];
1147 1147
 			}
1148 1148
 		} else {
1149 1149
 			/**
@@ -1155,8 +1155,8 @@  discard block
 block discarded – undo
1155 1155
 				// Multi-select dropdowns - key is not preserved
1156 1156
 				if ( is_array( $field['value'] ) ) {
1157 1157
 					$o_key = array_search( $temp_val, $field['value'] );
1158
-					if ( isset( $field['value'][ $o_key ] ) ) {
1159
-						unset( $field['value'][ $o_key ], $o_key );
1158
+					if ( isset( $field['value'][$o_key] ) ) {
1159
+						unset( $field['value'][$o_key], $o_key );
1160 1160
 					}
1161 1161
 				} elseif ( $temp_val == $field['value'] ) {
1162 1162
 					// For radio and regular dropdowns
@@ -1198,7 +1198,7 @@  discard block
 block discarded – undo
1198 1198
 			return $other_args;
1199 1199
 		}
1200 1200
 
1201
-		$other_opt  = true;
1201
+		$other_opt = true;
1202 1202
 
1203 1203
 		self::set_other_name( $args, $other_args );
1204 1204
 		self::set_other_value( $args, $other_args );
@@ -1352,7 +1352,7 @@  discard block
 block discarded – undo
1352 1352
 		if ( is_array( $val ) ) {
1353 1353
 			foreach ( $val as $k => $v ) {
1354 1354
 				if ( is_string( $v ) ) {
1355
-					$val[ $k ] = str_replace( $replace, $replace_with, $v );
1355
+					$val[$k] = str_replace( $replace, $replace_with, $v );
1356 1356
 					unset( $k, $v );
1357 1357
 				}
1358 1358
 			}
@@ -1705,7 +1705,7 @@  discard block
 block discarded – undo
1705 1705
 			$countries['class'] = 'frm-countries-opts';
1706 1706
 		}
1707 1707
 
1708
-		$prepop[ __( 'Countries', 'formidable' ) ] = $countries;
1708
+		$prepop[__( 'Countries', 'formidable' )] = $countries;
1709 1709
 
1710 1710
 		// State abv.
1711 1711
 		$states    = self::get_us_states();
@@ -1715,7 +1715,7 @@  discard block
 block discarded – undo
1715 1715
 			$state_abv['class'] = 'frm-state-abv-opts';
1716 1716
 		}
1717 1717
 
1718
-		$prepop[ __( 'U.S. State Abbreviations', 'formidable' ) ] = $state_abv;
1718
+		$prepop[__( 'U.S. State Abbreviations', 'formidable' )] = $state_abv;
1719 1719
 
1720 1720
 		// States.
1721 1721
 		$states = array_values( $states );
@@ -1724,7 +1724,7 @@  discard block
 block discarded – undo
1724 1724
 			$states['class'] = 'frm-states-opts';
1725 1725
 		}
1726 1726
 
1727
-		$prepop[ __( 'U.S. States', 'formidable' ) ] = $states;
1727
+		$prepop[__( 'U.S. States', 'formidable' )] = $states;
1728 1728
 		unset( $state_abv, $states );
1729 1729
 
1730 1730
 		// Age.
@@ -1742,7 +1742,7 @@  discard block
 block discarded – undo
1742 1742
 			$ages['class'] = 'frm-age-opts';
1743 1743
 		}
1744 1744
 
1745
-		$prepop[ __( 'Age', 'formidable' ) ] = $ages;
1745
+		$prepop[__( 'Age', 'formidable' )] = $ages;
1746 1746
 
1747 1747
 		// Satisfaction.
1748 1748
 		$satisfaction = array(
@@ -1757,7 +1757,7 @@  discard block
 block discarded – undo
1757 1757
 			$satisfaction['class'] = 'frm-satisfaction-opts';
1758 1758
 		}
1759 1759
 
1760
-		$prepop[ __( 'Satisfaction', 'formidable' ) ] = $satisfaction;
1760
+		$prepop[__( 'Satisfaction', 'formidable' )] = $satisfaction;
1761 1761
 
1762 1762
 		// Importance.
1763 1763
 		$importance = array(
@@ -1772,7 +1772,7 @@  discard block
 block discarded – undo
1772 1772
 			$importance['class'] = 'frm-importance-opts';
1773 1773
 		}
1774 1774
 
1775
-		$prepop[ __( 'Importance', 'formidable' ) ] = $importance;
1775
+		$prepop[__( 'Importance', 'formidable' )] = $importance;
1776 1776
 
1777 1777
 		// Agreement.
1778 1778
 		$agreement = array(
@@ -1787,7 +1787,7 @@  discard block
 block discarded – undo
1787 1787
 			$agreement['class'] = 'frm-agreement-opts';
1788 1788
 		}
1789 1789
 
1790
-		$prepop[ __( 'Agreement', 'formidable' ) ] = $agreement;
1790
+		$prepop[__( 'Agreement', 'formidable' )] = $agreement;
1791 1791
 
1792 1792
 		// Likely.
1793 1793
 		$likely = array(
@@ -1802,7 +1802,7 @@  discard block
 block discarded – undo
1802 1802
 			$likely['class'] = 'frm-likely-opts';
1803 1803
 		}
1804 1804
 
1805
-		$prepop[ __( 'Likely', 'formidable' ) ] = $likely;
1805
+		$prepop[__( 'Likely', 'formidable' )] = $likely;
1806 1806
 
1807 1807
 		$prepop = apply_filters( 'frm_bulk_field_choices', $prepop );
1808 1808
 	}
@@ -1977,16 +1977,16 @@  discard block
 block discarded – undo
1977 1977
 	 */
1978 1978
 	private static function fill_image_setting_options( $options, &$args ) {
1979 1979
 		foreach ( $options as $key => $option ) {
1980
-			$args['options'][ $key ] = $option;
1980
+			$args['options'][$key] = $option;
1981 1981
 
1982 1982
 			if ( ! empty( $option['addon'] ) ) {
1983
-				$args['options'][ $key ]['custom_attrs'] = self::fill_image_setting_addon_link( $option );
1983
+				$args['options'][$key]['custom_attrs'] = self::fill_image_setting_addon_link( $option );
1984 1984
 			}
1985 1985
 
1986
-			unset( $args['options'][ $key ]['addon'] );
1986
+			unset( $args['options'][$key]['addon'] );
1987 1987
 			$fill = array( 'upgrade', 'message', 'content' );
1988 1988
 			foreach ( $fill as $f ) {
1989
-				unset( $args['options'][ $key ][ $f ], $f );
1989
+				unset( $args['options'][$key][$f], $f );
1990 1990
 			}
1991 1991
 		}
1992 1992
 	}
@@ -2007,8 +2007,8 @@  discard block
 block discarded – undo
2007 2007
 
2008 2008
 		$fill = array( 'upgrade', 'message', 'content' );
2009 2009
 		foreach ( $fill as $f ) {
2010
-			if ( isset( $option[ $f ] ) ) {
2011
-				$custom_attrs[ 'data-' . $f ] = $option[ $f ];
2010
+			if ( isset( $option[$f] ) ) {
2011
+				$custom_attrs['data-' . $f] = $option[$f];
2012 2012
 			}
2013 2013
 		}
2014 2014
 
Please login to merge, or discard this patch.
classes/helpers/FrmListHelper.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
 			return $this->get_pagenum();
236 236
 		}
237 237
 
238
-		if ( isset( $this->_pagination_args[ $key ] ) ) {
239
-			return $this->_pagination_args[ $key ];
238
+		if ( isset( $this->_pagination_args[$key] ) ) {
239
+			return $this->_pagination_args[$key];
240 240
 		}
241 241
 	}
242 242
 
@@ -284,8 +284,8 @@  discard block
 block discarded – undo
284 284
 	}
285 285
 
286 286
 	private function hidden_search_inputs( $param_name ) {
287
-		if ( ! empty( $_REQUEST[ $param_name ] ) ) {
288
-			$value = sanitize_text_field( wp_unslash( $_REQUEST[ $param_name ] ) );
287
+		if ( ! empty( $_REQUEST[$param_name] ) ) {
288
+			$value = sanitize_text_field( wp_unslash( $_REQUEST[$param_name] ) );
289 289
 			echo '<input type="hidden" name="' . esc_attr( $param_name ) . '" value="' . esc_attr( $value ) . '" />';
290 290
 		}
291 291
 	}
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 
330 330
 		echo "<ul class='subsubsub'>\n";
331 331
 		foreach ( $views as $class => $view ) {
332
-			$views[ $class ] = "\t" . '<li class="' . esc_attr( $class ) . '">' . $view;
332
+			$views[$class] = "\t" . '<li class="' . esc_attr( $class ) . '">' . $view;
333 333
 		}
334 334
 		echo implode( " |</li>\n", $views ) . "</li>\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
335 335
 		echo '</ul>';
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
 			'next'  => __( 'Next page', 'formidable' ),
703 703
 		);
704 704
 
705
-		return $labels[ $link ];
705
+		return $labels[$link];
706 706
 	}
707 707
 
708 708
 	private function current_url() {
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
 
796 796
 		// If the primary column doesn't exist fall back to the
797 797
 		// first non-checkbox column.
798
-		if ( ! isset( $columns[ $default ] ) ) {
798
+		if ( ! isset( $columns[$default] ) ) {
799 799
 			$default = self::get_default_primary_column_name();
800 800
 		}
801 801
 
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
 		 */
810 810
 		$column = apply_filters( 'list_table_primary_column', $default, $this->screen->id );
811 811
 
812
-		if ( empty( $column ) || ! isset( $columns[ $column ] ) ) {
812
+		if ( empty( $column ) || ! isset( $columns[$column] ) ) {
813 813
 			$column = $default;
814 814
 		}
815 815
 
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
 			// In 4.3, we added a fourth argument for primary column.
832 832
 			$column_headers = array( array(), array(), array(), $this->get_primary_column_name() );
833 833
 			foreach ( $this->_column_headers as $key => $value ) {
834
-				$column_headers[ $key ] = $value;
834
+				$column_headers[$key] = $value;
835 835
 			}
836 836
 
837 837
 			return $column_headers;
@@ -864,7 +864,7 @@  discard block
 block discarded – undo
864 864
 				$data[1] = false;
865 865
 			}
866 866
 
867
-			$sortable[ $id ] = $data;
867
+			$sortable[$id] = $data;
868 868
 		}
869 869
 
870 870
 		$primary = $this->get_primary_column_name();
@@ -941,8 +941,8 @@  discard block
 block discarded – undo
941 941
 				$class[] = 'column-primary';
942 942
 			}
943 943
 
944
-			if ( isset( $sortable[ $column_key ] ) ) {
945
-				list( $orderby, $desc_first ) = $sortable[ $column_key ];
944
+			if ( isset( $sortable[$column_key] ) ) {
945
+				list( $orderby, $desc_first ) = $sortable[$column_key];
946 946
 
947 947
 				if ( $current_orderby == $orderby ) {
948 948
 					$order   = 'asc' == $current_order ? 'desc' : 'asc';
Please login to merge, or discard this patch.
classes/helpers/FrmEntriesHelper.php 2 patches
Braces   +14 added lines, -7 removed lines patch added patch discarded remove patch
@@ -114,13 +114,16 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	public static function value_is_posted( $field, $args ) {
116 116
 		$value_is_posted = false;
117
-		if ( $_POST ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
117
+		if ( $_POST ) {
118
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
118 119
 			$repeating = isset( $args['repeating'] ) && $args['repeating'];
119 120
 			if ( $repeating ) {
120
-				if ( isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ][ $field->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
121
+				if ( isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ][ $field->id ] ) ) {
122
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
121 123
 					$value_is_posted = true;
122 124
 				}
123
-			} elseif ( isset( $_POST['item_meta'][ $field->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
125
+			} elseif ( isset( $_POST['item_meta'][ $field->id ] ) ) {
126
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
124 127
 				$value_is_posted = true;
125 128
 			}
126 129
 		}
@@ -322,8 +325,10 @@  discard block
 block discarded – undo
322 325
 	 * @since 4.01
323 326
 	 */
324 327
 	private static function set_parent_field_posted_value( $field, $value, $args ) {
325
-		if ( isset( $_POST['item_meta'][ $args['parent_field_id'] ] ) && is_array( $_POST['item_meta'][ $args['parent_field_id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
326
-			if ( ! isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ] ) || ! is_array( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
328
+		if ( isset( $_POST['item_meta'][ $args['parent_field_id'] ] ) && is_array( $_POST['item_meta'][ $args['parent_field_id'] ] ) ) {
329
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
330
+			if ( ! isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ] ) || ! is_array( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ] ) ) {
331
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
327 332
 				$_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ] = array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing
328 333
 			}
329 334
 		} else {
@@ -395,7 +400,8 @@  discard block
 block discarded – undo
395 400
 		self::set_other_repeating_vals( $field, $value, $args );
396 401
 
397 402
 		// Check if there are any posted "Other" values.
398
-		if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta']['other'][ $field->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
403
+		if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta']['other'][ $field->id ] ) ) {
404
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
399 405
 
400 406
 			// Save original value.
401 407
 			$args['temp_value'] = $value;
@@ -425,7 +431,8 @@  discard block
 block discarded – undo
425 431
 		}
426 432
 
427 433
 		// Check if there are any other posted "other" values for this field.
428
-		if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ]['other'][ $field->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
434
+		if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ]['other'][ $field->id ] ) ) {
435
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
429 436
 			// Save original value
430 437
 			$args['temp_value'] = $value;
431 438
 			$args['other']      = true;
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -117,10 +117,10 @@  discard block
 block discarded – undo
117 117
 		if ( $_POST ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
118 118
 			$repeating = isset( $args['repeating'] ) && $args['repeating'];
119 119
 			if ( $repeating ) {
120
-				if ( isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ][ $field->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
120
+				if ( isset( $_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']][$field->id] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
121 121
 					$value_is_posted = true;
122 122
 				}
123
-			} elseif ( isset( $_POST['item_meta'][ $field->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
123
+			} elseif ( isset( $_POST['item_meta'][$field->id] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
124 124
 				$value_is_posted = true;
125 125
 			}
126 126
 		}
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 		preg_match_all( "/\[(default-message|default_message)\b(.*?)(?:(\/))?\]/s", $message, $shortcodes, PREG_PATTERN_ORDER );
153 153
 
154 154
 		foreach ( $shortcodes[0] as $short_key => $tag ) {
155
-			$add_atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[2][ $short_key ] );
155
+			$add_atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[2][$short_key] );
156 156
 			if ( ! empty( $add_atts ) ) {
157 157
 				$this_atts = array_merge( $atts, $add_atts );
158 158
 			} else {
@@ -162,14 +162,14 @@  discard block
 block discarded – undo
162 162
 			$default = FrmEntriesController::show_entry_shortcode( $this_atts );
163 163
 
164 164
 			// Add the default message.
165
-			$message = str_replace( $shortcodes[0][ $short_key ], $default, $message );
165
+			$message = str_replace( $shortcodes[0][$short_key], $default, $message );
166 166
 		}
167 167
 
168 168
 		return $message;
169 169
 	}
170 170
 
171 171
 	public static function prepare_display_value( $entry, $field, $atts ) {
172
-		$field_value = isset( $entry->metas[ $field->id ] ) ? $entry->metas[ $field->id ] : false;
172
+		$field_value = isset( $entry->metas[$field->id] ) ? $entry->metas[$field->id] : false;
173 173
 
174 174
 		if ( FrmAppHelper::pro_is_installed() ) {
175 175
 			$empty = empty( $field_value );
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 			$child_entries = FrmEntry::getAll( array( 'it.parent_item_id' => $entry->id ) );
193 193
 		} else {
194 194
 			// Get all values for this field.
195
-			$child_values = isset( $entry->metas[ $atts['embedded_field_id'] ] ) ? $entry->metas[ $atts['embedded_field_id'] ] : false;
195
+			$child_values = isset( $entry->metas[$atts['embedded_field_id']] ) ? $entry->metas[$atts['embedded_field_id']] : false;
196 196
 
197 197
 			if ( $child_values ) {
198 198
 				$child_entries = FrmEntry::getAll( array( 'it.id' => (array) $child_values ) );
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 			$value = $args['temp_value'];
311 311
 		}
312 312
 		if ( empty( $args['parent_field_id'] ) ) {
313
-			$_POST['item_meta'][ $field->id ] = $value;
313
+			$_POST['item_meta'][$field->id] = $value;
314 314
 		} else {
315 315
 			self::set_parent_field_posted_value( $field, $value, $args );
316 316
 		}
@@ -322,17 +322,17 @@  discard block
 block discarded – undo
322 322
 	 * @since 4.01
323 323
 	 */
324 324
 	private static function set_parent_field_posted_value( $field, $value, $args ) {
325
-		if ( isset( $_POST['item_meta'][ $args['parent_field_id'] ] ) && is_array( $_POST['item_meta'][ $args['parent_field_id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
326
-			if ( ! isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ] ) || ! is_array( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
327
-				$_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ] = array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing
325
+		if ( isset( $_POST['item_meta'][$args['parent_field_id']] ) && is_array( $_POST['item_meta'][$args['parent_field_id']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
326
+			if ( ! isset( $_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']] ) || ! is_array( $_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
327
+				$_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']] = array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing
328 328
 			}
329 329
 		} else {
330 330
 			// All of the section was probably removed.
331
-			$_POST['item_meta'][ $args['parent_field_id'] ]                         = array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing
332
-			$_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ] = array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing
331
+			$_POST['item_meta'][$args['parent_field_id']]                         = array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing
332
+			$_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']] = array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing
333 333
 		}
334 334
 
335
-		$_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ][ $field->id ] = $value; // phpcs:ignore WordPress.Security.NonceVerification.Missing
335
+		$_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']][$field->id] = $value; // phpcs:ignore WordPress.Security.NonceVerification.Missing
336 336
 	}
337 337
 
338 338
 	public static function get_posted_value( $field, &$value, $args ) {
@@ -362,9 +362,9 @@  discard block
 block discarded – undo
362 362
 	private static function get_posted_meta( $field_id, $args ) {
363 363
 		if ( empty( $args['parent_field_id'] ) ) {
364 364
 			// Sanitizing is done next.
365
-			$value = isset( $_POST['item_meta'][ $field_id ] ) ? wp_unslash( $_POST['item_meta'][ $field_id ] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
365
+			$value = isset( $_POST['item_meta'][$field_id] ) ? wp_unslash( $_POST['item_meta'][$field_id] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
366 366
 		} else {
367
-			$value = isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ][ $field_id ] ) ? wp_unslash( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ][ $field_id ] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
367
+			$value = isset( $_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']][$field_id] ) ? wp_unslash( $_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']][$field_id] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
368 368
 		}
369 369
 		return $value;
370 370
 	}
@@ -395,14 +395,14 @@  discard block
 block discarded – undo
395 395
 		self::set_other_repeating_vals( $field, $value, $args );
396 396
 
397 397
 		// Check if there are any posted "Other" values.
398
-		if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta']['other'][ $field->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
398
+		if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta']['other'][$field->id] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
399 399
 
400 400
 			// Save original value.
401 401
 			$args['temp_value'] = $value;
402 402
 			$args['other']      = true;
403 403
 
404 404
 			// Sanitizing is done next.
405
-			$other_vals = wp_unslash( $_POST['item_meta']['other'][ $field->id ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
405
+			$other_vals = wp_unslash( $_POST['item_meta']['other'][$field->id] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
406 406
 			FrmAppHelper::sanitize_value( 'sanitize_text_field', $other_vals );
407 407
 
408 408
 			// Set the validation value now
@@ -425,12 +425,12 @@  discard block
 block discarded – undo
425 425
 		}
426 426
 
427 427
 		// Check if there are any other posted "other" values for this field.
428
-		if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ]['other'][ $field->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
428
+		if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']]['other'][$field->id] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
429 429
 			// Save original value
430 430
 			$args['temp_value'] = $value;
431 431
 			$args['other']      = true;
432 432
 
433
-			$other_vals = wp_unslash( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ]['other'][ $field->id ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
433
+			$other_vals = wp_unslash( $_POST['item_meta'][$args['parent_field_id']][$args['key_pointer']]['other'][$field->id] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
434 434
 			FrmAppHelper::sanitize_value( 'sanitize_text_field', $other_vals );
435 435
 
436 436
 			// Set the validation value now.
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 		if ( is_array( $value ) && $field->type === 'checkbox' ) {
458 458
 			// Combine "Other" values with checked values. "Other" values will override checked box values.
459 459
 			foreach ( $other_vals as $k => $v ) {
460
-				if ( isset( $value[ $k ] ) && trim( $v ) === '' ) {
460
+				if ( isset( $value[$k] ) && trim( $v ) === '' ) {
461 461
 					// If the other box is checked, but doesn't have a value.
462 462
 					$value = '';
463 463
 					break;
@@ -474,25 +474,25 @@  discard block
 block discarded – undo
474 474
 
475 475
 			// Multi-select dropdown.
476 476
 			if ( is_array( $value ) ) {
477
-				$o_key = array_search( $field->options[ $other_key ], $value );
477
+				$o_key = array_search( $field->options[$other_key], $value );
478 478
 
479 479
 				if ( $o_key !== false ) {
480 480
 					// Modify the original value so other key will be preserved.
481
-					$value[ $other_key ] = $value[ $o_key ];
481
+					$value[$other_key] = $value[$o_key];
482 482
 
483 483
 					// By default, the array keys will be numeric for multi-select dropdowns.
484 484
 					// If going backwards and forwards between pages, the array key will match the other key.
485 485
 					if ( $o_key !== $other_key ) {
486
-						unset( $value[ $o_key ] );
486
+						unset( $value[$o_key] );
487 487
 					}
488 488
 
489 489
 					$args['temp_value']  = $value;
490
-					$value[ $other_key ] = reset( $other_vals );
491
-					if ( FrmAppHelper::is_empty_value( $value[ $other_key ] ) ) {
492
-						unset( $value[ $other_key ] );
490
+					$value[$other_key] = reset( $other_vals );
491
+					if ( FrmAppHelper::is_empty_value( $value[$other_key] ) ) {
492
+						unset( $value[$other_key] );
493 493
 					}
494 494
 				}
495
-			} elseif ( $field->options[ $other_key ] == $value ) {
495
+			} elseif ( $field->options[$other_key] == $value ) {
496 496
 				$value = $other_vals;
497 497
 			}
498 498
 		}
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
 	 * @return void
703 703
 	 */
704 704
 	public static function maybe_render_captcha_score( $entry_id ) {
705
-		$query                 = array(
705
+		$query = array(
706 706
 			'item_id'  => (int) $entry_id,
707 707
 			'field_id' => 0,
708 708
 		);
Please login to merge, or discard this patch.