Completed
Push — master ( dbdf52...ba6bfe )
by Stephanie
17s queued 13s
created
classes/helpers/FrmStylesCardHelper.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -349,12 +349,12 @@
 block discarded – undo
349 349
 		array_walk(
350 350
 			$styles,
351 351
 			/**
352
-			* Echo a style card for a single style in the $styles array.
353
-			*
354
-			* @param WP_Post $style
355
-			* @param int     $count Used for pagination.
356
-			* @return void
357
-			*/
352
+			 * Echo a style card for a single style in the $styles array.
353
+			 *
354
+			 * @param WP_Post $style
355
+			 * @param int     $count Used for pagination.
356
+			 * @return void
357
+			 */
358 358
 			function( $style ) use ( &$count ) {
359 359
 				$hidden = $count > ( self::PAGE_SIZE - 1 );
360 360
 				$this->echo_style_card( $style, $hidden );
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -130,11 +130,11 @@  discard block
 block discarded – undo
130 130
 	private static function has_dark_background( $style ) {
131 131
 		$key = 'fieldset_bg_color';
132 132
 
133
-		if ( empty( $style->post_content[ $key ] ) ) {
133
+		if ( empty( $style->post_content[$key] ) ) {
134 134
 			return false;
135 135
 		}
136 136
 
137
-		$color = $style->post_content[ $key ];
137
+		$color = $style->post_content[$key];
138 138
 
139 139
 		if ( 0 === strpos( $color, 'rgba' ) ) {
140 140
 			preg_match_all( '/([\\d.]+)/', $color, $matches );
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 					),
205 205
 					'/style-templates/' . $style['slug']
206 206
 				);
207
-				$params['data-requires']    = FrmFormsHelper::get_plan_required( $style );
207
+				$params['data-requires'] = FrmFormsHelper::get_plan_required( $style );
208 208
 				return $params;
209 209
 			};
210 210
 		} else {
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 				continue;
266 266
 			}
267 267
 
268
-			$value = $style->post_content[ $key ];
268
+			$value = $style->post_content[$key];
269 269
 
270 270
 			$is_hex = in_array( $key, $color_settings, true ) && $value && '#' !== $value[0] && false === strpos( $value, 'rgb' ) && $value !== 'transparent';
271 271
 			if ( $is_hex ) {
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 			function( $style ) use ( &$count ) {
414 414
 				$hidden = $count > ( self::PAGE_SIZE - 1 );
415 415
 				$this->echo_style_card( $style, $hidden );
416
-				++$count;
416
+				++ $count;
417 417
 			}
418 418
 		);
419 419
 
Please login to merge, or discard this patch.
classes/models/FrmStyleApi.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 		// Remove 'Styling Template' from titles.
51 51
 		foreach ( $api_info as $id => $template ) {
52 52
 			if ( isset( $template['name'] ) ) {
53
-				$api_info[ $id ]['name'] = preg_replace( '/(\sStyle|Styling)?(\sTemplate)?$/', '', $template['name'] );
53
+				$api_info[$id]['name'] = preg_replace( '/(\sStyle|Styling)?(\sTemplate)?$/', '', $template['name'] );
54 54
 			}
55 55
 		}
56 56
 
Please login to merge, or discard this patch.
classes/models/fields/FrmFieldType.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
 		$field_val = '';
133 133
 		if ( is_object( $this->field ) ) {
134 134
 			$field_val = $this->field->{$column};
135
-		} elseif ( is_array( $this->field ) && isset( $this->field[ $column ] ) ) {
136
-			$field_val = $this->field[ $column ];
135
+		} elseif ( is_array( $this->field ) && isset( $this->field[$column] ) ) {
136
+			$field_val = $this->field[$column];
137 137
 		}
138 138
 
139 139
 		return $field_val;
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 		if ( is_object( $this->field ) ) {
148 148
 			$this->field->{$column} = $value;
149 149
 		} elseif ( is_array( $this->field ) ) {
150
-			$this->field[ $column ] = $value;
150
+			$this->field[$column] = $value;
151 151
 		}
152 152
 	}
153 153
 
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 			printf(
528 528
 				/* translators: %s: Field type */
529 529
 				esc_html__( '%s Options', 'formidable' ),
530
-				esc_html( $all_field_types[ $args['display']['type'] ]['name'] )
530
+				esc_html( $all_field_types[$args['display']['type']]['name'] )
531 531
 			);
532 532
 			FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown6_icon', array( 'aria-hidden' => 'true' ) );
533 533
 			?>
@@ -650,8 +650,8 @@  discard block
 block discarded – undo
650 650
 		$fields = FrmField::field_selection();
651 651
 		$fields = array_merge( $fields, FrmField::pro_field_selection() );
652 652
 
653
-		if ( isset( $fields[ $this->type ] ) ) {
654
-			$name = is_array( $fields[ $this->type ] ) ? $fields[ $this->type ]['name'] : $fields[ $this->type ];
653
+		if ( isset( $fields[$this->type] ) ) {
654
+			$name = is_array( $fields[$this->type] ) ? $fields[$this->type]['name'] : $fields[$this->type];
655 655
 		}
656 656
 
657 657
 		return $name;
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
 	}
663 663
 
664 664
 	public function get_default_field_options() {
665
-		$opts       = array(
665
+		$opts = array(
666 666
 			'size'               => '',
667 667
 			'max'                => '',
668 668
 			'label'              => '',
@@ -1004,7 +1004,7 @@  discard block
 block discarded – undo
1004 1004
 			}
1005 1005
 		} else {
1006 1006
 			$args['save_array'] = $this->is_readonly_array();
1007
-			$hidden             .= $this->show_single_hidden( $selected_value, $args );
1007
+			$hidden .= $this->show_single_hidden( $selected_value, $args );
1008 1008
 		}
1009 1009
 
1010 1010
 		return $hidden;
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
 	protected function show_single_hidden( $selected, $args ) {
1014 1014
 		if ( $args['save_array'] ) {
1015 1015
 			$args['field_name'] .= '[]';
1016
-			$id                 = '';
1016
+			$id = '';
1017 1017
 		} else {
1018 1018
 			$id = ' id="' . esc_attr( $args['html_id'] ) . '"';
1019 1019
 		}
@@ -1029,8 +1029,8 @@  discard block
 block discarded – undo
1029 1029
 		$selected = $values['field_value'];
1030 1030
 
1031 1031
 		if ( isset( $values['combo_name'] ) ) {
1032
-			$options  = $options[ $values['combo_name'] ];
1033
-			$selected = ( is_array( $selected ) && isset( $selected[ $values['combo_name'] ] ) ) ? $selected[ $values['combo_name'] ] : '';
1032
+			$options  = $options[$values['combo_name']];
1033
+			$selected = ( is_array( $selected ) && isset( $selected[$values['combo_name']] ) ) ? $selected[$values['combo_name']] : '';
1034 1034
 		}
1035 1035
 
1036 1036
 		$input = $this->select_tag( $values );
@@ -1081,7 +1081,7 @@  discard block
 block discarded – undo
1081 1081
 	}
1082 1082
 
1083 1083
 	protected function fill_display_field_values( $args = array() ) {
1084
-		$defaults        = array(
1084
+		$defaults = array(
1085 1085
 			'field_name'    => 'item_meta[' . $this->get_field_column( 'id' ) . ']',
1086 1086
 			'field_id'      => $this->get_field_column( 'id' ),
1087 1087
 			'field_plus_id' => '',
@@ -1134,7 +1134,7 @@  discard block
 block discarded – undo
1134 1134
 			}
1135 1135
 		}
1136 1136
 
1137
-		if ( isset( $args['errors'][ 'field' . $args['field_id'] ] ) && ! $custom_error_fields ) {
1137
+		if ( isset( $args['errors']['field' . $args['field_id']] ) && ! $custom_error_fields ) {
1138 1138
 			if ( $error_comes_first ) {
1139 1139
 				array_unshift( $describedby, 'frm_error_' . $args['html_id'] );
1140 1140
 			} else {
@@ -1213,11 +1213,11 @@  discard block
 block discarded – undo
1213 1213
 
1214 1214
 		$field_id = $this->get_field_column( 'id' );
1215 1215
 		if ( ! array_key_exists( $field_id, $frm_validated_unique_values ) ) {
1216
-			$frm_validated_unique_values[ $field_id ] = array();
1216
+			$frm_validated_unique_values[$field_id] = array();
1217 1217
 			return false;
1218 1218
 		}
1219 1219
 
1220
-		$already_validated_this_value = in_array( $value, $frm_validated_unique_values[ $field_id ], true );
1220
+		$already_validated_this_value = in_array( $value, $frm_validated_unique_values[$field_id], true );
1221 1221
 		return $already_validated_this_value;
1222 1222
 	}
1223 1223
 
@@ -1242,7 +1242,7 @@  discard block
 block discarded – undo
1242 1242
 	private function value_validated_as_unique( $value ) {
1243 1243
 		global $frm_validated_unique_values;
1244 1244
 		$field_id                                   = $this->get_field_column( 'id' );
1245
-		$frm_validated_unique_values[ $field_id ][] = $value;
1245
+		$frm_validated_unique_values[$field_id][] = $value;
1246 1246
 	}
1247 1247
 
1248 1248
 	public function get_value_to_save( $value, $atts ) {
@@ -1274,8 +1274,8 @@  discard block
 block discarded – undo
1274 1274
 		$value = $this->prepare_display_value( $value, $atts );
1275 1275
 
1276 1276
 		if ( is_array( $value ) ) {
1277
-			if ( isset( $atts['show'] ) && $atts['show'] && isset( $value[ $atts['show'] ] ) ) {
1278
-				$value = $value[ $atts['show'] ];
1277
+			if ( isset( $atts['show'] ) && $atts['show'] && isset( $value[$atts['show']] ) ) {
1278
+				$value = $value[$atts['show']];
1279 1279
 			} elseif ( ! isset( $atts['return_array'] ) || ! $atts['return_array'] ) {
1280 1280
 				$sep   = isset( $atts['sep'] ) ? $atts['sep'] : ', ';
1281 1281
 				$value = implode( $sep, $value );
@@ -1344,8 +1344,8 @@  discard block
 block discarded – undo
1344 1344
 		$saved_entries = $atts['ids'];
1345 1345
 		$new_value     = array();
1346 1346
 		foreach ( (array) $value as $old_child_id ) {
1347
-			if ( isset( $saved_entries[ $old_child_id ] ) ) {
1348
-				$new_value[] = $saved_entries[ $old_child_id ];
1347
+			if ( isset( $saved_entries[$old_child_id] ) ) {
1348
+				$new_value[] = $saved_entries[$old_child_id];
1349 1349
 			}
1350 1350
 		}
1351 1351
 
Please login to merge, or discard this patch.
classes/views/styles/_style-card.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 				'text-color'      => $style->post_content['text_color'],
41 41
 				'submit-bg-color' => $style->post_content['submit_bg_color'],
42 42
 			);
43
-			$index  = 0;
43
+			$index = 0;
44 44
 			foreach ( $colors as $css_var_name => $color ) {
45 45
 				if ( 0 !== strpos( $color, 'rgb' ) ) {
46 46
 					$color = '#' . $color;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 					'style' => 'background-color: var(--' . $css_var_name . ')',
52 52
 				);
53 53
 
54
-				++$index;
54
+				++ $index;
55 55
 				?>
56 56
 				<div <?php FrmAppHelper::array_to_html_params( $circle_params, true ); ?>></div>
57 57
 				<?php
Please login to merge, or discard this patch.
classes/models/FrmFormApi.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 			if ( isset( $addon['categories'] ) ) {
106 106
 				$cats = array_intersect( $this->skip_categories(), $addon['categories'] );
107 107
 				if ( ! empty( $cats ) ) {
108
-					unset( $addons[ $k ] );
108
+					unset( $addons[$k] );
109 109
 					continue;
110 110
 				}
111 111
 			}
112 112
 
113 113
 			if ( ! array_key_exists( 'is_new', $addon ) && array_key_exists( 'released', $addon ) ) {
114
-				$addons[ $k ]['is_new'] = $this->is_new( $addon );
114
+				$addons[$k]['is_new'] = $this->is_new( $addon );
115 115
 			}
116 116
 		}
117 117
 
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
 					return $addon;
154 154
 				}
155 155
 			}
156
-		} elseif ( isset( $addons[ $download_id ] ) ) {
157
-			$plugin = $addons[ $download_id ];
156
+		} elseif ( isset( $addons[$download_id] ) ) {
157
+			$plugin = $addons[$download_id];
158 158
 		}
159 159
 
160 160
 		return $plugin;
Please login to merge, or discard this patch.
classes/helpers/FrmFormsListHelper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 		$page     = $this->get_pagenum();
21 21
 		$per_page = $this->get_items_per_page( 'formidable_page_formidable_per_page' );
22 22
 
23
-		$mode    = self::get_param(
23
+		$mode = self::get_param(
24 24
 			array(
25 25
 				'param'   => 'mode',
26 26
 				'default' => 'list',
@@ -32,13 +32,13 @@  discard block
 block discarded – undo
32 32
 				'default' => 'name',
33 33
 			)
34 34
 		);
35
-		$order   = self::get_param(
35
+		$order = self::get_param(
36 36
 			array(
37 37
 				'param'   => 'order',
38 38
 				'default' => 'ASC',
39 39
 			)
40 40
 		);
41
-		$start   = self::get_param(
41
+		$start = self::get_param(
42 42
 			array(
43 43
 				'param'   => 'start',
44 44
 				'default' => ( $page - 1 ) * $per_page,
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 		$counts    = FrmForm::get_count();
163 163
 		$form_type = FrmAppHelper::simple_get( 'form_type', 'sanitize_title', 'published' );
164 164
 
165
-		if ( isset( $statuses[ $form_type ] ) ) {
165
+		if ( isset( $statuses[$form_type] ) ) {
166 166
 			$counts->$form_type = $this->total_items;
167 167
 		}
168 168
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
 			if ( $counts->{$status} || 'draft' !== $status ) {
185 185
 				/* translators: %1$s: Status, %2$s: Number of items */
186
-				$links[ $status ] = '<a href="' . esc_url( '?page=formidable&form_type=' . $status ) . '" ' . $class . '>' . sprintf( __( '%1$s <span class="count">(%2$s)</span>', 'formidable' ), $name, number_format_i18n( $counts->{$status} ) ) . '</a>';
186
+				$links[$status] = '<a href="' . esc_url( '?page=formidable&form_type=' . $status ) . '" ' . $class . '>' . sprintf( __( '%1$s <span class="count">(%2$s)</span>', 'formidable' ), $name, number_format_i18n( $counts->{$status} ) ) . '</a>';
187 187
 			}
188 188
 
189 189
 			unset( $status, $name );
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 	private function get_actions( &$actions, $item, $edit_link ) {
349 349
 		$new_actions = FrmFormsHelper::get_action_links( $item->id, $item );
350 350
 		foreach ( $new_actions as $link => $action ) {
351
-			$new_actions[ $link ] = FrmFormsHelper::format_link_html( $action, 'short' );
351
+			$new_actions[$link] = FrmFormsHelper::format_link_html( $action, 'short' );
352 352
 		}
353 353
 
354 354
 		if ( 'trash' == $this->status ) {
Please login to merge, or discard this patch.
classes/helpers/FrmTipsHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 	 * @return array
359 359
 	 */
360 360
 	public static function get_banner_tip() {
361
-		$tips       = array(
361
+		$tips = array(
362 362
 			array(
363 363
 				'link' => array(
364 364
 					'medium'  => 'banner',
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 			),
386 386
 		);
387 387
 		$random     = rand( 0, count( $tips ) - 1 );
388
-		$tip        = $tips[ $random ];
388
+		$tip        = $tips[$random];
389 389
 		$tip['num'] = $random;
390 390
 
391 391
 		return $tip;
@@ -394,6 +394,6 @@  discard block
 block discarded – undo
394 394
 	public static function get_random_tip( $tips ) {
395 395
 		$random = rand( 0, count( $tips ) - 1 );
396 396
 
397
-		return $tips[ $random ];
397
+		return $tips[$random];
398 398
 	}
399 399
 }
Please login to merge, or discard this patch.
classes/controllers/FrmXMLController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 			return;
164 164
 		}
165 165
 
166
-		$selected_xml  = isset( $form['xml'] ) && isset( $form['xml'][ $selected_form ] ) ? $form['xml'][ $selected_form ] : '';
166
+		$selected_xml = isset( $form['xml'] ) && isset( $form['xml'][$selected_form] ) ? $form['xml'][$selected_form] : '';
167 167
 		if ( empty( $selected_xml ) || strpos( $selected_xml, 'http' ) !== 0 ) {
168 168
 			return;
169 169
 		}
@@ -178,8 +178,8 @@  discard block
 block discarded – undo
178 178
 	 * @param array $form
179 179
 	 */
180 180
 	private static function get_selected_in_form( $form, $value = 'form' ) {
181
-		if ( ! empty( $form ) && isset( $form[ $value ] ) && ! empty( $form[ $value ] ) ) {
182
-			return $form[ $value ];
181
+		if ( ! empty( $form ) && isset( $form[$value] ) && ! empty( $form[$value] ) ) {
182
+			return $form[$value];
183 183
 		}
184 184
 
185 185
 		return '';
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 			}
209 209
 
210 210
 			if ( $for === 'view' ) {
211
-				$item_key  = is_array( $view_keys ) ? $view_keys[ $form_key ] : $view_keys;
211
+				$item_key  = is_array( $view_keys ) ? $view_keys[$form_key] : $view_keys;
212 212
 				$shortcode = '[display-frm-data id=%1$s filter=limited]';
213 213
 			} elseif ( $for === 'form' ) {
214 214
 				$item_key = $form_key;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 				continue;
224 224
 			}
225 225
 
226
-			$page_ids[ $for ] = wp_insert_post(
226
+			$page_ids[$for] = wp_insert_post(
227 227
 				array(
228 228
 					'post_title'   => $name,
229 229
 					'post_type'    => 'page',
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 		// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
378 378
 		$file_type = sanitize_option( 'upload_path', $_FILES['frm_import_file']['name'] );
379 379
 		$file_type = strtolower( pathinfo( $file_type, PATHINFO_EXTENSION ) );
380
-		if ( 'xml' !== $file_type && isset( $export_format[ $file_type ] ) ) {
380
+		if ( 'xml' !== $file_type && isset( $export_format[$file_type] ) ) {
381 381
 			// allow other file types to be imported
382 382
 			do_action( 'frm_before_import_' . $file_type );
383 383
 
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 		foreach ( $type as $tb_type ) {
471 471
 			$where = array();
472 472
 			$join  = '';
473
-			$table = $tables[ $tb_type ];
473
+			$table = $tables[$tb_type];
474 474
 
475 475
 			$select     = $table . '.id';
476 476
 			$query_vars = array();
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
 							$table . '.parent_form_id' => $args['ids'],
486 486
 						);
487 487
 					} else {
488
-						$where[ $table . '.status !' ] = 'draft';
488
+						$where[$table . '.status !'] = 'draft';
489 489
 					}
490 490
 					break;
491 491
 				case 'actions':
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 				case 'items':
499 499
 					// $join = "INNER JOIN {$wpdb->prefix}frm_item_metas im ON ($table.id = im.item_id)";
500 500
 					if ( $args['ids'] ) {
501
-						$where[ $table . '.form_id' ] = $args['ids'];
501
+						$where[$table . '.form_id'] = $args['ids'];
502 502
 					}
503 503
 					break;
504 504
 				case 'styles':
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
 					}
540 540
 			}
541 541
 
542
-			$records[ $tb_type ] = FrmDb::get_col( $table . $join, $where, $select );
542
+			$records[$tb_type] = FrmDb::get_col( $table . $join, $where, $select );
543 543
 			unset( $tb_type );
544 544
 		}
545 545
 
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
 		$no_export_fields = FrmField::no_save_fields();
711 711
 		foreach ( $csv_fields as $k => $f ) {
712 712
 			if ( in_array( $f->type, $no_export_fields, true ) ) {
713
-				unset( $csv_fields[ $k ] );
713
+				unset( $csv_fields[$k] );
714 714
 			}
715 715
 		}
716 716
 
Please login to merge, or discard this patch.
classes/models/fields/FrmFieldNumber.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
 		//validate the number format
65 65
 		if ( ! is_numeric( $args['value'] ) && '' !== $args['value'] ) {
66
-			$errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
66
+			$errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
67 67
 		}
68 68
 
69 69
 		// validate number settings
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
 			if ( $frm_settings->use_html && $maxnum !== '' && $minnum !== '' ) {
76 76
 				$value = (float) $args['value'];
77 77
 				if ( $value < $minnum ) {
78
-					$errors[ 'field' . $args['id'] ] = __( 'Please select a higher number', 'formidable' );
78
+					$errors['field' . $args['id']] = __( 'Please select a higher number', 'formidable' );
79 79
 				} elseif ( $value > $maxnum ) {
80
-					$errors[ 'field' . $args['id'] ] = __( 'Please select a lower number', 'formidable' );
80
+					$errors['field' . $args['id']] = __( 'Please select a lower number', 'formidable' );
81 81
 				}
82 82
 			}
83 83
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 * @return void
99 99
 	 */
100 100
 	private function validate_step( &$errors, $args ) {
101
-		if ( isset( $errors[ 'field' . $args['id'] ] ) ) {
101
+		if ( isset( $errors['field' . $args['id']] ) ) {
102 102
 			return; // Don't need to check if value is invalid before.
103 103
 		}
104 104
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 			return;
113 113
 		}
114 114
 
115
-		$errors[ 'field' . $args['id'] ] = sprintf(
115
+		$errors['field' . $args['id']] = sprintf(
116 116
 			// Translators: %1$s: the first nearest value; %2$s: the second nearest value.
117 117
 			__( 'Please enter a valid value. Two nearest valid values are %1$s and %2$s', 'formidable' ),
118 118
 			floatval( $result[0] ),
Please login to merge, or discard this patch.