Completed
Push — master ( 7504f2...0efaab )
by Stephanie
29s queued 14s
created
classes/models/FrmFormAction.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -5,15 +5,15 @@  discard block
 block discarded – undo
5 5
 
6 6
 class FrmFormAction {
7 7
 
8
-	public $id_base;         // Root id for all actions of this type.
9
-	public $name;            // Name for this action type.
8
+	public $id_base; // Root id for all actions of this type.
9
+	public $name; // Name for this action type.
10 10
 	public $option_name;
11
-	public $action_options;  // Option array passed to wp_register_sidebar_widget()
11
+	public $action_options; // Option array passed to wp_register_sidebar_widget()
12 12
 	public $control_options; // Option array passed to wp_register_widget_control()
13 13
 
14
-	public $form_id;         // The ID of the form to evaluate
15
-	public $number = false;  // Unique ID number of the current instance.
16
-	public $id = '';         // Unique ID string of the current instance (id_base-number)
14
+	public $form_id; // The ID of the form to evaluate
15
+	public $number = false; // Unique ID number of the current instance.
16
+	public $id = ''; // Unique ID string of the current instance (id_base-number)
17 17
 	public $updated = false; // Set true when we update the data after a POST submit - makes sure we don't do it twice.
18 18
 
19 19
 	// Member functions that you must over-ride.
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
 		$groups = FrmFormActionsController::form_action_groups();
157 157
 		$group  = 'misc';
158 158
 
159
-		if ( isset( $action_options['group'] ) && isset( $groups[ $action_options['group'] ] ) ) {
159
+		if ( isset( $action_options['group'] ) && isset( $groups[$action_options['group']] ) ) {
160 160
 			$group = $action_options['group'];
161
-		} elseif ( isset( $groups[ $this->id_base ] ) ) {
161
+		} elseif ( isset( $groups[$this->id_base] ) ) {
162 162
 			$group = $this->id_base;
163 163
 		} else {
164 164
 			foreach ( $groups as $name => $check_group ) {
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
 			}
170 170
 		}
171 171
 
172
-		$groups[ $group ]['id'] = $group;
173
-		return $groups[ $group ];
172
+		$groups[$group]['id'] = $group;
173
+		return $groups[$group];
174 174
 	}
175 175
 
176 176
 	/**
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 	 * @return integer $post_id
281 281
 	 */
282 282
 	public function maybe_create_action( $action, $forms ) {
283
-		if ( isset( $action['ID'] ) && is_numeric( $action['ID'] ) && isset( $forms[ $action['menu_order'] ] ) && $forms[ $action['menu_order'] ] == 'updated' ) {
283
+		if ( isset( $action['ID'] ) && is_numeric( $action['ID'] ) && isset( $forms[$action['menu_order']] ) && $forms[$action['menu_order']] == 'updated' ) {
284 284
 			// Update action only
285 285
 			$action['post_content'] = FrmAppHelper::maybe_json_decode( $action['post_content'] );
286 286
 			$post_id                = $this->save_settings( $action );
@@ -303,18 +303,18 @@  discard block
 block discarded – undo
303 303
 		$switch             = $this->get_global_switch_fields();
304 304
 
305 305
 		foreach ( (array) $action->post_content as $key => $val ) {
306
-			if ( is_numeric( $val ) && isset( $frm_duplicate_ids[ $val ] ) ) {
307
-				$action->post_content[ $key ] = $frm_duplicate_ids[ $val ];
306
+			if ( is_numeric( $val ) && isset( $frm_duplicate_ids[$val] ) ) {
307
+				$action->post_content[$key] = $frm_duplicate_ids[$val];
308 308
 			} elseif ( ! is_array( $val ) ) {
309
-				$action->post_content[ $key ] = FrmFieldsHelper::switch_field_ids( $val );
310
-			} elseif ( isset( $switch[ $key ] ) && is_array( $switch[ $key ] ) ) {
309
+				$action->post_content[$key] = FrmFieldsHelper::switch_field_ids( $val );
310
+			} elseif ( isset( $switch[$key] ) && is_array( $switch[$key] ) ) {
311 311
 				// loop through each value if empty
312
-				if ( empty( $switch[ $key ] ) ) {
313
-					$switch[ $key ] = array_keys( $val );
312
+				if ( empty( $switch[$key] ) ) {
313
+					$switch[$key] = array_keys( $val );
314 314
 				}
315 315
 
316
-				foreach ( $switch[ $key ] as $subkey ) {
317
-					$action->post_content[ $key ] = $this->duplicate_array_walk( $action->post_content[ $key ], $subkey, $val );
316
+				foreach ( $switch[$key] as $subkey ) {
317
+					$action->post_content[$key] = $this->duplicate_array_walk( $action->post_content[$key], $subkey, $val );
318 318
 				}
319 319
 			}
320 320
 
@@ -332,20 +332,20 @@  discard block
 block discarded – undo
332 332
 			foreach ( $subkey as $subkey2 ) {
333 333
 				foreach ( (array) $val as $ck => $cv ) {
334 334
 					if ( is_array( $cv ) ) {
335
-						$action[ $ck ] = $this->duplicate_array_walk( $action[ $ck ], $subkey2, $cv );
336
-					} elseif ( isset( $cv[ $subkey ] ) && is_numeric( $cv[ $subkey ] ) && isset( $frm_duplicate_ids[ $cv[ $subkey ] ] ) ) {
337
-						$action[ $ck ][ $subkey ] = $frm_duplicate_ids[ $cv[ $subkey ] ];
335
+						$action[$ck] = $this->duplicate_array_walk( $action[$ck], $subkey2, $cv );
336
+					} elseif ( isset( $cv[$subkey] ) && is_numeric( $cv[$subkey] ) && isset( $frm_duplicate_ids[$cv[$subkey]] ) ) {
337
+						$action[$ck][$subkey] = $frm_duplicate_ids[$cv[$subkey]];
338 338
 					}
339 339
 				}
340 340
 			}
341 341
 		} else {
342 342
 			foreach ( (array) $val as $ck => $cv ) {
343 343
 				if ( is_array( $cv ) ) {
344
-					$action[ $ck ] = $this->duplicate_array_walk( $action[ $ck ], $subkey, $cv );
345
-				} elseif ( $ck == $subkey && isset( $frm_duplicate_ids[ $cv ] ) ) {
346
-					$action[ $ck ] = $frm_duplicate_ids[ $cv ];
344
+					$action[$ck] = $this->duplicate_array_walk( $action[$ck], $subkey, $cv );
345
+				} elseif ( $ck == $subkey && isset( $frm_duplicate_ids[$cv] ) ) {
346
+					$action[$ck] = $frm_duplicate_ids[$cv];
347 347
 				} elseif ( $ck == $subkey ) {
348
-					$action[ $ck ] = $this->maybe_switch_field_ids( $action[ $ck ] );
348
+					$action[$ck] = $this->maybe_switch_field_ids( $action[$ck] );
349 349
 				}
350 350
 			}
351 351
 		}
@@ -369,10 +369,10 @@  discard block
 block discarded – undo
369 369
 		}
370 370
 
371 371
 		// phpcs:ignore WordPress.Security.NonceVerification.Missing
372
-		if ( isset( $_POST[ $this->option_name ] ) && is_array( $_POST[ $this->option_name ] ) ) {
372
+		if ( isset( $_POST[$this->option_name] ) && is_array( $_POST[$this->option_name] ) ) {
373 373
 			// Sanitizing removes scripts and <email> type of values.
374 374
 			// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
375
-			$settings = wp_unslash( $_POST[ $this->option_name ] );
375
+			$settings = wp_unslash( $_POST[$this->option_name] );
376 376
 		} else {
377 377
 			return;
378 378
 		}
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 		foreach ( $settings as $number => $new_instance ) {
383 383
 			$this->_set( $number );
384 384
 
385
-			$old_instance = isset( $all_instances[ $number ] ) ? $all_instances[ $number ] : array();
385
+			$old_instance = isset( $all_instances[$number] ) ? $all_instances[$number] : array();
386 386
 
387 387
 			if ( ! isset( $new_instance['post_status'] ) ) {
388 388
 				$new_instance['post_status'] = 'draft';
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 			$instance['post_content'] = apply_filters( 'frm_before_save_' . $this->id_base . '_action', $instance['post_content'], $instance, $new_instance, $old_instance, $this );
422 422
 
423 423
 			if ( false !== $instance ) {
424
-				$all_instances[ $number ] = $instance;
424
+				$all_instances[$number] = $instance;
425 425
 			}
426 426
 
427 427
 			$action_ids[] = $this->save_settings( $instance );
@@ -503,12 +503,12 @@  discard block
 block discarded – undo
503 503
 			// some plugins/themes are formatting the post_excerpt
504 504
 			$action->post_excerpt = sanitize_title( $action->post_excerpt );
505 505
 
506
-			if ( ! isset( $action_controls[ $action->post_excerpt ] ) ) {
506
+			if ( ! isset( $action_controls[$action->post_excerpt] ) ) {
507 507
 				continue;
508 508
 			}
509 509
 
510
-			$action                  = $action_controls[ $action->post_excerpt ]->prepare_action( $action );
511
-			$settings[ $action->ID ] = $action;
510
+			$action                  = $action_controls[$action->post_excerpt]->prepare_action( $action );
511
+			$settings[$action->ID] = $action;
512 512
 
513 513
 			if ( count( $settings ) >= $limit ) {
514 514
 				break;
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
 			'limit'       => 99,
542 542
 			'post_status' => $default_status,
543 543
 		);
544
-		$args     = wp_parse_args( $args, $defaults );
544
+		$args = wp_parse_args( $args, $defaults );
545 545
 	}
546 546
 
547 547
 	/**
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
 
608 608
 			$action = $this->prepare_action( $action );
609 609
 
610
-			$settings[ $action->ID ] = $action;
610
+			$settings[$action->ID] = $action;
611 611
 		}
612 612
 
613 613
 		if ( 1 === $limit ) {
@@ -650,10 +650,10 @@  discard block
 block discarded – undo
650 650
 
651 651
 		foreach ( $default_values as $k => $vals ) {
652 652
 			if ( is_array( $vals ) && ! empty( $vals ) ) {
653
-				if ( 'event' === $k && ! $this->action_options['force_event'] && ! empty( $action->post_content[ $k ] ) ) {
653
+				if ( 'event' === $k && ! $this->action_options['force_event'] && ! empty( $action->post_content[$k] ) ) {
654 654
 					continue;
655 655
 				}
656
-				$action->post_content[ $k ] = wp_parse_args( $action->post_content[ $k ], $vals );
656
+				$action->post_content[$k] = wp_parse_args( $action->post_content[$k], $vals );
657 657
 			}
658 658
 		}
659 659
 
@@ -736,14 +736,14 @@  discard block
 block discarded – undo
736 736
 	 * Migrate settings from form->options into new action.
737 737
 	 */
738 738
 	public function migrate_to_2( $form, $update = 'update' ) {
739
-		$action        = $this->prepare_new( $form->id );
739
+		$action = $this->prepare_new( $form->id );
740 740
 		FrmAppHelper::unserialize_or_decode( $form->options );
741 741
 
742 742
 		// fill with existing options
743 743
 		foreach ( $action->post_content as $name => $val ) {
744
-			if ( isset( $form->options[ $name ] ) ) {
745
-				$action->post_content[ $name ] = $form->options[ $name ];
746
-				unset( $form->options[ $name ] );
744
+			if ( isset( $form->options[$name] ) ) {
745
+				$action->post_content[$name] = $form->options[$name];
746
+				unset( $form->options[$name] );
747 747
 			}
748 748
 		}
749 749
 
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
 				$stop = $stop ? false : true;
810 810
 			}
811 811
 
812
-			$met[ $stop ] = $stop;
812
+			$met[$stop] = $stop;
813 813
 		}
814 814
 
815 815
 		if ( $notification['conditions']['any_all'] == 'all' && ! empty( $met ) && isset( $met[0] ) && isset( $met[1] ) ) {
@@ -863,8 +863,8 @@  discard block
 block discarded – undo
863 863
 	private static function get_value_from_entry( $entry, $field_id ) {
864 864
 		$observed_value = '';
865 865
 
866
-		if ( isset( $entry->metas[ $field_id ] ) ) {
867
-			$observed_value = $entry->metas[ $field_id ];
866
+		if ( isset( $entry->metas[$field_id] ) ) {
867
+			$observed_value = $entry->metas[$field_id];
868 868
 		} elseif ( $entry->post_id && FrmAppHelper::pro_is_installed() ) {
869 869
 			$field          = FrmField::getOne( $field_id );
870 870
 			$observed_value = FrmProEntryMetaHelper::get_post_or_meta_value(
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
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
 		$field_val = '';
145 145
 		if ( is_object( $this->field ) ) {
146 146
 			$field_val = $this->field->{$column};
147
-		} elseif ( is_array( $this->field ) && isset( $this->field[ $column ] ) ) {
148
-			$field_val = $this->field[ $column ];
147
+		} elseif ( is_array( $this->field ) && isset( $this->field[$column] ) ) {
148
+			$field_val = $this->field[$column];
149 149
 		}
150 150
 
151 151
 		return $field_val;
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 		if ( is_object( $this->field ) ) {
160 160
 			$this->field->{$column} = $value;
161 161
 		} elseif ( is_array( $this->field ) ) {
162
-			$this->field[ $column ] = $value;
162
+			$this->field[$column] = $value;
163 163
 		}
164 164
 	}
165 165
 
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 			printf(
549 549
 				/* translators: %s: Field type */
550 550
 				esc_html__( '%s Options', 'formidable' ),
551
-				esc_html( $all_field_types[ $args['display']['type'] ]['name'] )
551
+				esc_html( $all_field_types[$args['display']['type']]['name'] )
552 552
 			);
553 553
 			FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown6_icon', array( 'aria-hidden' => 'true' ) );
554 554
 			?>
@@ -681,8 +681,8 @@  discard block
 block discarded – undo
681 681
 
682 682
 		$fields = array_merge( $fields, $pro_fields );
683 683
 
684
-		if ( isset( $fields[ $this->type ] ) ) {
685
-			$name = is_array( $fields[ $this->type ] ) ? $fields[ $this->type ]['name'] : $fields[ $this->type ];
684
+		if ( isset( $fields[$this->type] ) ) {
685
+			$name = is_array( $fields[$this->type] ) ? $fields[$this->type]['name'] : $fields[$this->type];
686 686
 		}
687 687
 
688 688
 		return $name;
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
 	 * @return array
700 700
 	 */
701 701
 	public function get_default_field_options() {
702
-		$opts       = array(
702
+		$opts = array(
703 703
 			'size'               => '',
704 704
 			'max'                => '',
705 705
 			'label'              => '',
@@ -1066,7 +1066,7 @@  discard block
 block discarded – undo
1066 1066
 			}
1067 1067
 		} else {
1068 1068
 			$args['save_array'] = $this->is_readonly_array();
1069
-			$hidden             .= $this->show_single_hidden( $selected_value, $args );
1069
+			$hidden .= $this->show_single_hidden( $selected_value, $args );
1070 1070
 		}
1071 1071
 
1072 1072
 		return $hidden;
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
 	protected function show_single_hidden( $selected, $args ) {
1076 1076
 		if ( $args['save_array'] ) {
1077 1077
 			$args['field_name'] .= '[]';
1078
-			$id                 = '';
1078
+			$id = '';
1079 1079
 		} else {
1080 1080
 			$id = ' id="' . esc_attr( $args['html_id'] ) . '"';
1081 1081
 		}
@@ -1091,8 +1091,8 @@  discard block
 block discarded – undo
1091 1091
 		$selected = $values['field_value'];
1092 1092
 
1093 1093
 		if ( isset( $values['combo_name'] ) ) {
1094
-			$options  = $options[ $values['combo_name'] ];
1095
-			$selected = ( is_array( $selected ) && isset( $selected[ $values['combo_name'] ] ) ) ? $selected[ $values['combo_name'] ] : '';
1094
+			$options  = $options[$values['combo_name']];
1095
+			$selected = ( is_array( $selected ) && isset( $selected[$values['combo_name']] ) ) ? $selected[$values['combo_name']] : '';
1096 1096
 		}
1097 1097
 
1098 1098
 		$input = $this->select_tag( $values );
@@ -1143,7 +1143,7 @@  discard block
 block discarded – undo
1143 1143
 	}
1144 1144
 
1145 1145
 	protected function fill_display_field_values( $args = array() ) {
1146
-		$defaults        = array(
1146
+		$defaults = array(
1147 1147
 			'field_name'    => 'item_meta[' . $this->get_field_column( 'id' ) . ']',
1148 1148
 			'field_id'      => $this->get_field_column( 'id' ),
1149 1149
 			'field_plus_id' => '',
@@ -1196,7 +1196,7 @@  discard block
 block discarded – undo
1196 1196
 			}
1197 1197
 		}
1198 1198
 
1199
-		if ( isset( $args['errors'][ 'field' . $args['field_id'] ] ) && ! $custom_error_fields ) {
1199
+		if ( isset( $args['errors']['field' . $args['field_id']] ) && ! $custom_error_fields ) {
1200 1200
 			if ( $error_comes_first ) {
1201 1201
 				array_unshift( $describedby, 'frm_error_' . $args['html_id'] );
1202 1202
 			} else {
@@ -1275,11 +1275,11 @@  discard block
 block discarded – undo
1275 1275
 
1276 1276
 		$field_id = $this->get_field_column( 'id' );
1277 1277
 		if ( ! array_key_exists( $field_id, $frm_validated_unique_values ) ) {
1278
-			$frm_validated_unique_values[ $field_id ] = array();
1278
+			$frm_validated_unique_values[$field_id] = array();
1279 1279
 			return false;
1280 1280
 		}
1281 1281
 
1282
-		$already_validated_this_value = in_array( $value, $frm_validated_unique_values[ $field_id ], true );
1282
+		$already_validated_this_value = in_array( $value, $frm_validated_unique_values[$field_id], true );
1283 1283
 		return $already_validated_this_value;
1284 1284
 	}
1285 1285
 
@@ -1304,7 +1304,7 @@  discard block
 block discarded – undo
1304 1304
 	private function value_validated_as_unique( $value ) {
1305 1305
 		global $frm_validated_unique_values;
1306 1306
 		$field_id                                   = $this->get_field_column( 'id' );
1307
-		$frm_validated_unique_values[ $field_id ][] = $value;
1307
+		$frm_validated_unique_values[$field_id][] = $value;
1308 1308
 	}
1309 1309
 
1310 1310
 	public function get_value_to_save( $value, $atts ) {
@@ -1336,8 +1336,8 @@  discard block
 block discarded – undo
1336 1336
 		$value = $this->prepare_display_value( $value, $atts );
1337 1337
 
1338 1338
 		if ( is_array( $value ) ) {
1339
-			if ( isset( $atts['show'] ) && $atts['show'] && isset( $value[ $atts['show'] ] ) ) {
1340
-				$value = $value[ $atts['show'] ];
1339
+			if ( isset( $atts['show'] ) && $atts['show'] && isset( $value[$atts['show']] ) ) {
1340
+				$value = $value[$atts['show']];
1341 1341
 			} elseif ( ! isset( $atts['return_array'] ) || ! $atts['return_array'] ) {
1342 1342
 				$sep   = isset( $atts['sep'] ) ? $atts['sep'] : ', ';
1343 1343
 				$value = implode( $sep, $value );
@@ -1406,8 +1406,8 @@  discard block
 block discarded – undo
1406 1406
 		$saved_entries = $atts['ids'];
1407 1407
 		$new_value     = array();
1408 1408
 		foreach ( (array) $value as $old_child_id ) {
1409
-			if ( isset( $saved_entries[ $old_child_id ] ) ) {
1410
-				$new_value[] = $saved_entries[ $old_child_id ];
1409
+			if ( isset( $saved_entries[$old_child_id] ) ) {
1410
+				$new_value[] = $saved_entries[$old_child_id];
1411 1411
 			}
1412 1412
 		}
1413 1413
 
Please login to merge, or discard this patch.
classes/helpers/FrmAppHelper.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -493,7 +493,8 @@  discard block
 block discarded – undo
493 493
 
494 494
 		if ( $src === 'get' ) {
495 495
 			$value = isset( $_POST[ $param ] ) ? wp_unslash( $_POST[ $param ] ) : ( isset( $_GET[ $param ] ) ? wp_unslash( $_GET[ $param ] ) : $default ); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
496
-			if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
496
+			if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) {
497
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
497 498
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
498 499
 				$value = htmlspecialchars_decode( wp_unslash( $_GET[ $param ] ) );
499 500
 			}
@@ -581,7 +582,8 @@  discard block
 block discarded – undo
581 582
 				$value = wp_unslash( $_GET[ $args['param'] ] );
582 583
 			}
583 584
 		} elseif ( $args['type'] === 'post' ) {
584
-			if ( isset( $_POST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
585
+			if ( isset( $_POST[ $args['param'] ] ) ) {
586
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
585 587
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
586 588
 				$value = wp_unslash( $_POST[ $args['param'] ] );
587 589
 				if ( $args['serialized'] === true && is_serialized_string( $value ) && is_serialized( $value ) ) {
@@ -589,7 +591,8 @@  discard block
 block discarded – undo
589 591
 				}
590 592
 			}
591 593
 		} else {
592
-			if ( isset( $_REQUEST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
594
+			if ( isset( $_REQUEST[ $args['param'] ] ) ) {
595
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
593 596
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
594 597
 				$value = wp_unslash( $_REQUEST[ $args['param'] ] );
595 598
 			}
Please login to merge, or discard this patch.
Spacing   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 			'fill'   => '#4d4d4d',
186 186
 			'orange' => '#f05a24',
187 187
 		);
188
-		$atts     = array_merge( $defaults, $atts );
188
+		$atts = array_merge( $defaults, $atts );
189 189
 
190 190
 		return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 599.68 601.37" width="' . esc_attr( $atts['width'] ) . '" height="' . esc_attr( $atts['height'] ) . '">
191 191
 			<path fill="' . esc_attr( $atts['orange'] ) . '" d="M289.6 384h140v76h-140z"/>
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 	 * @return string
397 397
 	 */
398 398
 	public static function get_server_value( $value ) {
399
-		return isset( $_SERVER[ $value ] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[ $value ] ) ) : '';
399
+		return isset( $_SERVER[$value] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[$value] ) ) : '';
400 400
 	}
401 401
 
402 402
 	/**
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 		$ip         = '';
431 431
 
432 432
 		foreach ( $ip_options as $key ) {
433
-			if ( ! isset( $_SERVER[ $key ] ) ) {
433
+			if ( ! isset( $_SERVER[$key] ) ) {
434 434
 				continue;
435 435
 			}
436 436
 
@@ -498,10 +498,10 @@  discard block
 block discarded – undo
498 498
 		}
499 499
 
500 500
 		if ( $src === 'get' ) {
501
-			$value = isset( $_POST[ $param ] ) ? wp_unslash( $_POST[ $param ] ) : ( isset( $_GET[ $param ] ) ? wp_unslash( $_GET[ $param ] ) : $default ); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
502
-			if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
501
+			$value = isset( $_POST[$param] ) ? wp_unslash( $_POST[$param] ) : ( isset( $_GET[$param] ) ? wp_unslash( $_GET[$param] ) : $default ); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
502
+			if ( ! isset( $_POST[$param] ) && isset( $_GET[$param] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
503 503
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
504
-				$value = htmlspecialchars_decode( wp_unslash( $_GET[ $param ] ) );
504
+				$value = htmlspecialchars_decode( wp_unslash( $_GET[$param] ) );
505 505
 			}
506 506
 			self::sanitize_value( $sanitize, $value );
507 507
 		} else {
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
 				}
523 523
 
524 524
 				$p     = trim( $p, ']' );
525
-				$value = isset( $value[ $p ] ) ? $value[ $p ] : $default;
525
+				$value = isset( $value[$p] ) ? $value[$p] : $default;
526 526
 			}
527 527
 		}
528 528
 
@@ -578,26 +578,26 @@  discard block
 block discarded – undo
578 578
 			'sanitize' => 'sanitize_text_field',
579 579
 			'serialized' => false,
580 580
 		);
581
-		$args     = wp_parse_args( $args, $defaults );
581
+		$args = wp_parse_args( $args, $defaults );
582 582
 
583 583
 		$value = $args['default'];
584 584
 		if ( $args['type'] === 'get' ) {
585
-			if ( $_GET && isset( $_GET[ $args['param'] ] ) ) {
585
+			if ( $_GET && isset( $_GET[$args['param']] ) ) {
586 586
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
587
-				$value = wp_unslash( $_GET[ $args['param'] ] );
587
+				$value = wp_unslash( $_GET[$args['param']] );
588 588
 			}
589 589
 		} elseif ( $args['type'] === 'post' ) {
590
-			if ( isset( $_POST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
590
+			if ( isset( $_POST[$args['param']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
591 591
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
592
-				$value = wp_unslash( $_POST[ $args['param'] ] );
592
+				$value = wp_unslash( $_POST[$args['param']] );
593 593
 				if ( $args['serialized'] === true && is_serialized_string( $value ) && is_serialized( $value ) ) {
594 594
 					self::unserialize_or_decode( $value );
595 595
 				}
596 596
 			}
597 597
 		} else {
598
-			if ( isset( $_REQUEST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
598
+			if ( isset( $_REQUEST[$args['param']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
599 599
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
600
-				$value = wp_unslash( $_REQUEST[ $args['param'] ] );
600
+				$value = wp_unslash( $_REQUEST[$args['param']] );
601 601
 			}
602 602
 		}
603 603
 
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
 			if ( is_array( $value ) ) {
630 630
 				$temp_values = $value;
631 631
 				foreach ( $temp_values as $k => $v ) {
632
-					self::sanitize_value( $sanitize, $value[ $k ] );
632
+					self::sanitize_value( $sanitize, $value[$k] );
633 633
 				}
634 634
 			} else {
635 635
 				$value = call_user_func( $sanitize, $value );
@@ -640,8 +640,8 @@  discard block
 block discarded – undo
640 640
 	public static function sanitize_request( $sanitize_method, &$values ) {
641 641
 		$temp_values = $values;
642 642
 		foreach ( $temp_values as $k => $val ) {
643
-			if ( isset( $sanitize_method[ $k ] ) ) {
644
-				$values[ $k ] = call_user_func( $sanitize_method[ $k ], $val );
643
+			if ( isset( $sanitize_method[$k] ) ) {
644
+				$values[$k] = call_user_func( $sanitize_method[$k], $val );
645 645
 			}
646 646
 		}
647 647
 	}
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 		if ( is_array( $value ) ) {
665 665
 			$temp_values = $value;
666 666
 			foreach ( $temp_values as $k => $v ) {
667
-				self::decode_specialchars( $value[ $k ] );
667
+				self::decode_specialchars( $value[$k] );
668 668
 			}
669 669
 		} else {
670 670
 			self::decode_amp( $value );
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
 	 * @return array
785 785
 	 */
786 786
 	public static function add_allowed_submit_button_tags( $allowed_html ) {
787
-		$allowed_html['input']                    = array(
787
+		$allowed_html['input'] = array(
788 788
 			'type'           => true,
789 789
 			'value'          => true,
790 790
 			'formnovalidate' => true,
@@ -807,7 +807,7 @@  discard block
 block discarded – undo
807 807
 			$allowed_html = $html;
808 808
 		} elseif ( ! empty( $allowed ) ) {
809 809
 			foreach ( (array) $allowed as $a ) {
810
-				$allowed_html[ $a ] = isset( $html[ $a ] ) ? $html[ $a ] : array();
810
+				$allowed_html[$a] = isset( $html[$a] ) ? $html[$a] : array();
811 811
 			}
812 812
 		}
813 813
 
@@ -986,8 +986,8 @@  discard block
 block discarded – undo
986 986
 		}
987 987
 
988 988
 		global $wp_query;
989
-		if ( isset( $wp_query->query_vars[ $param ] ) ) {
990
-			$value = $wp_query->query_vars[ $param ];
989
+		if ( isset( $wp_query->query_vars[$param] ) ) {
990
+			$value = $wp_query->query_vars[$param];
991 991
 		}
992 992
 
993 993
 		return $value;
@@ -1016,9 +1016,9 @@  discard block
 block discarded – undo
1016 1016
 			'frm_keyalt_icon'       => 'frm_key_icon',
1017 1017
 			'frm_keyalt_solid_icon' => 'frm_key_solid_icon',
1018 1018
 		);
1019
-		if ( isset( $deprecated[ $icon ] ) ) {
1020
-			$icon  = $deprecated[ $icon ];
1021
-			$class = str_replace( $icon, $deprecated[ $icon ], $class );
1019
+		if ( isset( $deprecated[$icon] ) ) {
1020
+			$icon  = $deprecated[$icon];
1021
+			$class = str_replace( $icon, $deprecated[$icon], $class );
1022 1022
 		}
1023 1023
 
1024 1024
 		if ( $icon === $class ) {
@@ -1349,7 +1349,7 @@  discard block
 block discarded – undo
1349 1349
 				'new_file_path' => self::plugin_path() . '/js',
1350 1350
 			)
1351 1351
 		);
1352
-		$new_file  = new FrmCreateFile( $file_atts );
1352
+		$new_file = new FrmCreateFile( $file_atts );
1353 1353
 
1354 1354
 		$files = array(
1355 1355
 			self::plugin_path() . '/js/formidable.min.js',
@@ -1368,7 +1368,7 @@  discard block
 block discarded – undo
1368 1368
 				'new_file_path' => self::plugin_path() . '/js',
1369 1369
 			)
1370 1370
 		);
1371
-		$new_file  = new FrmCreateFile( $file_atts );
1371
+		$new_file = new FrmCreateFile( $file_atts );
1372 1372
 		$files = array(
1373 1373
 			FrmStrpLiteAppHelper::plugin_path() . 'js/frmstrp.min.js',
1374 1374
 		);
@@ -1859,8 +1859,8 @@  discard block
 block discarded – undo
1859 1859
 			return $error;
1860 1860
 		}
1861 1861
 
1862
-		$nonce_value = ( $_REQUEST && isset( $_REQUEST[ $nonce_name ] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST[ $nonce_name ] ) ) : '';
1863
-		if ( $_REQUEST && ( ! isset( $_REQUEST[ $nonce_name ] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) {
1862
+		$nonce_value = ( $_REQUEST && isset( $_REQUEST[$nonce_name] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST[$nonce_name] ) ) : '';
1863
+		if ( $_REQUEST && ( ! isset( $_REQUEST[$nonce_name] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) {
1864 1864
 			$frm_settings = self::get_settings();
1865 1865
 			$error        = $frm_settings->admin_permission;
1866 1866
 		}
@@ -1895,7 +1895,7 @@  discard block
 block discarded – undo
1895 1895
 			} else {
1896 1896
 				foreach ( $value as $k => $v ) {
1897 1897
 					if ( ! is_array( $v ) ) {
1898
-						$value[ $k ] = call_user_func( $original_function, $v );
1898
+						$value[$k] = call_user_func( $original_function, $v );
1899 1899
 					}
1900 1900
 				}
1901 1901
 			}
@@ -1920,7 +1920,7 @@  discard block
 block discarded – undo
1920 1920
 				$return = array_merge( $return, self::array_flatten( $value, $keys ) );
1921 1921
 			} else {
1922 1922
 				if ( $keys === 'keep' ) {
1923
-					$return[ $key ] = $value;
1923
+					$return[$key] = $value;
1924 1924
 				} else {
1925 1925
 					$return[] = $value;
1926 1926
 				}
@@ -1973,11 +1973,11 @@  discard block
 block discarded – undo
1973 1973
 		}
1974 1974
 
1975 1975
 		$ver = $default;
1976
-		if ( ! isset( $wp_scripts->registered[ $handle ] ) ) {
1976
+		if ( ! isset( $wp_scripts->registered[$handle] ) ) {
1977 1977
 			return $ver;
1978 1978
 		}
1979 1979
 
1980
-		$query = $wp_scripts->registered[ $handle ];
1980
+		$query = $wp_scripts->registered[$handle];
1981 1981
 		if ( is_object( $query ) && ! empty( $query->ver ) ) {
1982 1982
 			$ver = $query->ver;
1983 1983
 		}
@@ -2083,7 +2083,7 @@  discard block
 block discarded – undo
2083 2083
 			$suffix = 2;
2084 2084
 			do {
2085 2085
 				$key_check = $key . $separator . $suffix;
2086
-				++$suffix;
2086
+				++ $suffix;
2087 2087
 			} while ( in_array( $key_check, $similar_keys, true ) );
2088 2088
 
2089 2089
 			$key = $key_check;
@@ -2184,7 +2184,7 @@  discard block
 block discarded – undo
2184 2184
 
2185 2185
 		foreach ( array( 'name', 'description' ) as $var ) {
2186 2186
 			$default_val    = isset( $record->{$var} ) ? $record->{$var} : '';
2187
-			$values[ $var ] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' );
2187
+			$values[$var] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' );
2188 2188
 			unset( $var, $default_val );
2189 2189
 		}
2190 2190
 
@@ -2242,9 +2242,9 @@  discard block
 block discarded – undo
2242 2242
 			}
2243 2243
 		}
2244 2244
 
2245
-		$field_type = isset( $post_values['field_options'][ 'type_' . $field->id ] ) ? $post_values['field_options'][ 'type_' . $field->id ] : $field->type;
2246
-		if ( isset( $post_values['item_meta'][ $field->id ] ) ) {
2247
-			$new_value = $post_values['item_meta'][ $field->id ];
2245
+		$field_type = isset( $post_values['field_options']['type_' . $field->id] ) ? $post_values['field_options']['type_' . $field->id] : $field->type;
2246
+		if ( isset( $post_values['item_meta'][$field->id] ) ) {
2247
+			$new_value = $post_values['item_meta'][$field->id];
2248 2248
 			self::unserialize_or_decode( $new_value );
2249 2249
 		} else {
2250 2250
 			$new_value = $meta_value;
@@ -2265,7 +2265,7 @@  discard block
 block discarded – undo
2265 2265
 
2266 2266
 		$field_array = array_merge( (array) $field->field_options, $field_array );
2267 2267
 
2268
-		$values['fields'][ $field->id ] = $field_array;
2268
+		$values['fields'][$field->id] = $field_array;
2269 2269
 	}
2270 2270
 
2271 2271
 	/**
@@ -2312,11 +2312,11 @@  discard block
 block discarded – undo
2312 2312
 		}
2313 2313
 
2314 2314
 		foreach ( $form->options as $opt => $value ) {
2315
-			if ( isset( $post_values[ $opt ] ) ) {
2316
-				$values[ $opt ] = $post_values[ $opt ];
2317
-				self::unserialize_or_decode( $values[ $opt ] );
2315
+			if ( isset( $post_values[$opt] ) ) {
2316
+				$values[$opt] = $post_values[$opt];
2317
+				self::unserialize_or_decode( $values[$opt] );
2318 2318
 			} else {
2319
-				$values[ $opt ] = $value;
2319
+				$values[$opt] = $value;
2320 2320
 			}
2321 2321
 		}
2322 2322
 
@@ -2330,8 +2330,8 @@  discard block
 block discarded – undo
2330 2330
 		$form_defaults = FrmFormsHelper::get_default_opts();
2331 2331
 
2332 2332
 		foreach ( $form_defaults as $opt => $default ) {
2333
-			if ( ! isset( $values[ $opt ] ) || $values[ $opt ] == '' ) {
2334
-				$values[ $opt ] = ( $post_values && isset( $post_values['options'][ $opt ] ) ) ? $post_values['options'][ $opt ] : $default;
2333
+			if ( ! isset( $values[$opt] ) || $values[$opt] == '' ) {
2334
+				$values[$opt] = ( $post_values && isset( $post_values['options'][$opt] ) ) ? $post_values['options'][$opt] : $default;
2335 2335
 			}
2336 2336
 
2337 2337
 			unset( $opt, $default );
@@ -2342,8 +2342,8 @@  discard block
 block discarded – undo
2342 2342
 		}
2343 2343
 
2344 2344
 		foreach ( array( 'before', 'after', 'submit' ) as $h ) {
2345
-			if ( ! isset( $values[ $h . '_html' ] ) ) {
2346
-				$values[ $h . '_html' ] = ( isset( $post_values['options'][ $h . '_html' ] ) ? $post_values['options'][ $h . '_html' ] : FrmFormsHelper::get_default_html( $h ) );
2345
+			if ( ! isset( $values[$h . '_html'] ) ) {
2346
+				$values[$h . '_html'] = ( isset( $post_values['options'][$h . '_html'] ) ? $post_values['options'][$h . '_html'] : FrmFormsHelper::get_default_html( $h ) );
2347 2347
 			}
2348 2348
 			unset( $h );
2349 2349
 		}
@@ -2521,25 +2521,25 @@  discard block
 block discarded – undo
2521 2521
 		if ( ! is_numeric( $levels ) ) {
2522 2522
 			// Show time in specified unit.
2523 2523
 			$levels = self::get_unit( $levels );
2524
-			if ( isset( $time_strings[ $levels ] ) ) {
2524
+			if ( isset( $time_strings[$levels] ) ) {
2525 2525
 				$diff = array(
2526 2526
 					$levels => self::time_format( $levels, $diff ),
2527 2527
 				);
2528 2528
 				$time_strings = array(
2529
-					$levels => $time_strings[ $levels ],
2529
+					$levels => $time_strings[$levels],
2530 2530
 				);
2531 2531
 			}
2532 2532
 			$levels = 1;
2533 2533
 		}
2534 2534
 
2535 2535
 		foreach ( $time_strings as $k => $v ) {
2536
-			if ( isset( $diff[ $k ] ) && $diff[ $k ] ) {
2537
-				$time_strings[ $k ] = $diff[ $k ] . ' ' . ( $diff[ $k ] > 1 ? $v[1] : $v[0] );
2538
-			} elseif ( isset( $diff[ $k ] ) && count( $time_strings ) === 1 ) {
2536
+			if ( isset( $diff[$k] ) && $diff[$k] ) {
2537
+				$time_strings[$k] = $diff[$k] . ' ' . ( $diff[$k] > 1 ? $v[1] : $v[0] );
2538
+			} elseif ( isset( $diff[$k] ) && count( $time_strings ) === 1 ) {
2539 2539
 				// Account for 0.
2540
-				$time_strings[ $k ] = $diff[ $k ] . ' ' . $v[1];
2540
+				$time_strings[$k] = $diff[$k] . ' ' . $v[1];
2541 2541
 			} else {
2542
-				unset( $time_strings[ $k ] );
2542
+				unset( $time_strings[$k] );
2543 2543
 			}
2544 2544
 		}
2545 2545
 
@@ -2558,8 +2558,8 @@  discard block
 block discarded – undo
2558 2558
 			'y' => 'y',
2559 2559
 			'd' => 'days',
2560 2560
 		);
2561
-		if ( isset( $return[ $unit ] ) ) {
2562
-			return $diff[ $return[ $unit ] ];
2561
+		if ( isset( $return[$unit] ) ) {
2562
+			return $diff[$return[$unit]];
2563 2563
 		}
2564 2564
 
2565 2565
 		$total = $diff['days'] * self::convert_time( 'd', $unit );
@@ -2567,11 +2567,11 @@  discard block
 block discarded – undo
2567 2567
 		$times = array( 'h', 'i', 's' );
2568 2568
 
2569 2569
 		foreach ( $times as $time ) {
2570
-			if ( ! isset( $diff[ $time ] ) ) {
2570
+			if ( ! isset( $diff[$time] ) ) {
2571 2571
 				continue;
2572 2572
 			}
2573 2573
 
2574
-			$total += $diff[ $time ] * self::convert_time( $time, $unit );
2574
+			$total += $diff[$time] * self::convert_time( $time, $unit );
2575 2575
 		}
2576 2576
 
2577 2577
 		return floor( $total );
@@ -2591,7 +2591,7 @@  discard block
 block discarded – undo
2591 2591
 			'y' => DAY_IN_SECONDS * 365.25,
2592 2592
 		);
2593 2593
 
2594
-		return $convert[ $from ] / $convert[ $to ];
2594
+		return $convert[$from] / $convert[$to];
2595 2595
 	}
2596 2596
 
2597 2597
 	/**
@@ -2599,7 +2599,7 @@  discard block
 block discarded – undo
2599 2599
 	 */
2600 2600
 	private static function get_unit( $unit ) {
2601 2601
 		$units = self::get_time_strings();
2602
-		if ( isset( $units[ $unit ] ) || is_numeric( $unit ) ) {
2602
+		if ( isset( $units[$unit] ) || is_numeric( $unit ) ) {
2603 2603
 			return $unit;
2604 2604
 		}
2605 2605
 
@@ -2710,17 +2710,17 @@  discard block
 block discarded – undo
2710 2710
 
2711 2711
 					case 1:
2712 2712
 						$l2 = $name;
2713
-						self::add_value_to_array( $name, $l2, $this_val, $vars[ $l1 ] );
2713
+						self::add_value_to_array( $name, $l2, $this_val, $vars[$l1] );
2714 2714
 						break;
2715 2715
 
2716 2716
 					case 2:
2717 2717
 						$l3 = $name;
2718
-						self::add_value_to_array( $name, $l3, $this_val, $vars[ $l1 ][ $l2 ] );
2718
+						self::add_value_to_array( $name, $l3, $this_val, $vars[$l1][$l2] );
2719 2719
 						break;
2720 2720
 
2721 2721
 					case 3:
2722 2722
 						$l4 = $name;
2723
-						self::add_value_to_array( $name, $l4, $this_val, $vars[ $l1 ][ $l2 ][ $l3 ] );
2723
+						self::add_value_to_array( $name, $l4, $this_val, $vars[$l1][$l2][$l3] );
2724 2724
 				}
2725 2725
 
2726 2726
 				unset( $this_val, $n );
@@ -2739,8 +2739,8 @@  discard block
 block discarded – undo
2739 2739
 	public static function add_value_to_array( $name, $l1, $val, &$vars ) {
2740 2740
 		if ( $name == '' ) {
2741 2741
 			$vars[] = $val;
2742
-		} elseif ( ! isset( $vars[ $l1 ] ) ) {
2743
-			$vars[ $l1 ] = $val;
2742
+		} elseif ( ! isset( $vars[$l1] ) ) {
2743
+			$vars[$l1] = $val;
2744 2744
 		}
2745 2745
 	}
2746 2746
 
@@ -2757,7 +2757,7 @@  discard block
 block discarded – undo
2757 2757
 			'new_tab'       => __( 'This option will open the link in a new browser tab. Please note that some popup blockers may prevent this from happening, in which case the link will be displayed.', 'formidable' ),
2758 2758
 		);
2759 2759
 
2760
-		if ( ! isset( $tooltips[ $name ] ) ) {
2760
+		if ( ! isset( $tooltips[$name] ) ) {
2761 2761
 			return;
2762 2762
 		}
2763 2763
 
@@ -2767,7 +2767,7 @@  discard block
 block discarded – undo
2767 2767
 			echo ' class="frm_help"';
2768 2768
 		}
2769 2769
 
2770
-		echo ' title="' . esc_attr( $tooltips[ $name ] );
2770
+		echo ' title="' . esc_attr( $tooltips[$name] );
2771 2771
 
2772 2772
 		if ( 'open' != $class ) {
2773 2773
 			echo '"';
@@ -2826,13 +2826,13 @@  discard block
 block discarded – undo
2826 2826
 	}
2827 2827
 
2828 2828
 	private static function prepare_action_slashes( $val, $key, &$post_content ) {
2829
-		if ( ! isset( $post_content[ $key ] ) || is_numeric( $val ) ) {
2829
+		if ( ! isset( $post_content[$key] ) || is_numeric( $val ) ) {
2830 2830
 			return;
2831 2831
 		}
2832 2832
 
2833 2833
 		if ( is_array( $val ) ) {
2834 2834
 			foreach ( $val as $k1 => $v1 ) {
2835
-				self::prepare_action_slashes( $v1, $k1, $post_content[ $key ] );
2835
+				self::prepare_action_slashes( $v1, $k1, $post_content[$key] );
2836 2836
 				unset( $k1, $v1 );
2837 2837
 			}
2838 2838
 		} else {
@@ -2840,7 +2840,7 @@  discard block
 block discarded – undo
2840 2840
 			$val = stripslashes( $val );
2841 2841
 
2842 2842
 			// Add backslashes before double quotes and forward slashes only
2843
-			$post_content[ $key ] = addcslashes( $val, '"\\/' );
2843
+			$post_content[$key] = addcslashes( $val, '"\\/' );
2844 2844
 		}
2845 2845
 	}
2846 2846
 
@@ -2961,14 +2961,14 @@  discard block
 block discarded – undo
2961 2961
 				continue;
2962 2962
 			}
2963 2963
 			$key = $input['name'];
2964
-			if ( isset( $formatted[ $key ] ) ) {
2965
-				if ( is_array( $formatted[ $key ] ) ) {
2966
-					$formatted[ $key ][] = $input['value'];
2964
+			if ( isset( $formatted[$key] ) ) {
2965
+				if ( is_array( $formatted[$key] ) ) {
2966
+					$formatted[$key][] = $input['value'];
2967 2967
 				} else {
2968
-					$formatted[ $key ] = array( $formatted[ $key ], $input['value'] );
2968
+					$formatted[$key] = array( $formatted[$key], $input['value'] );
2969 2969
 				}
2970 2970
 			} else {
2971
-				$formatted[ $key ] = $input['value'];
2971
+				$formatted[$key] = $input['value'];
2972 2972
 			}
2973 2973
 		}
2974 2974
 
@@ -3648,8 +3648,8 @@  discard block
 block discarded – undo
3648 3648
 		}
3649 3649
 
3650 3650
 		foreach ( $keys as $key ) {
3651
-			if ( isset( $values[ $key ] ) ) {
3652
-				$values[ $key ] = self::kses( $values[ $key ], 'all' );
3651
+			if ( isset( $values[$key] ) ) {
3652
+				$values[$key] = self::kses( $values[$key], 'all' );
3653 3653
 			}
3654 3654
 		}
3655 3655
 
@@ -3808,7 +3808,7 @@  discard block
 block discarded – undo
3808 3808
 			return 0;
3809 3809
 		}
3810 3810
 
3811
-		return strlen( $parts[ count( $parts ) - 1 ] );
3811
+		return strlen( $parts[count( $parts ) - 1] );
3812 3812
 	}
3813 3813
 
3814 3814
 	/**
Please login to merge, or discard this patch.
stripe/controllers/FrmStrpLiteEventsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -464,8 +464,8 @@
 block discarded – undo
464 464
 			'charge.refunded'               => 'refunded',
465 465
 		);
466 466
 
467
-		if ( isset( $events[ $this->event->type ] ) ) {
468
-			$this->status = $events[ $this->event->type ];
467
+		if ( isset( $events[$this->event->type] ) ) {
468
+			$this->status = $events[$this->event->type];
469 469
 			$this->set_payment_status();
470 470
 		} elseif ( $this->event->type === 'customer.deleted' ) {
471 471
 			$this->reset_customer();
Please login to merge, or discard this patch.
stripe/controllers/FrmTransLiteListsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
 			'sort'   => '',
101 101
 			'sdir'   => '',
102 102
 		) as $var => $default ) {
103
-			$values[ $var ] = FrmAppHelper::get_param( $var, $default );
103
+			$values[$var] = FrmAppHelper::get_param( $var, $default );
104 104
 		}
105 105
 
106 106
 		return $values;
Please login to merge, or discard this patch.
stripe/controllers/FrmStrpLiteActionsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 			$gateway   = $payment_action->post_content['gateway'];
48 48
 			$is_stripe = $gateway === 'stripe' || ( is_array( $gateway ) && in_array( 'stripe', $gateway, true ) );
49 49
 			if ( ! $is_stripe || empty( $payment_action->post_content['amount'] ) ) {
50
-				unset( $payment_actions[ $k ] );
50
+				unset( $payment_actions[$k] );
51 51
 			}
52 52
 		}
53 53
 		return $payment_actions;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 			'run_triggers' => false,
88 88
 			'show_errors'  => true,
89 89
 		);
90
-		$atts     = compact( 'action', 'entry', 'form' );
90
+		$atts = compact( 'action', 'entry', 'form' );
91 91
 
92 92
 		$amount = self::prepare_amount( $action->post_content['amount'], $atts );
93 93
 		if ( empty( $amount ) || $amount == 000 ) {
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 		$disallowed = array( ';', ':', '!important' );
509 509
 		foreach ( $settings as $k => $s ) {
510 510
 			if ( is_string( $s ) ) {
511
-				$settings[ $k ] = str_replace( $disallowed, '', $s );
511
+				$settings[$k] = str_replace( $disallowed, '', $s );
512 512
 			}
513 513
 		}
514 514
 
Please login to merge, or discard this patch.
stripe/models/FrmStrpLiteSettings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,8 @@
 block discarded – undo
84 84
 		$settings = $this->default_options();
85 85
 
86 86
 		foreach ( $settings as $setting => $default ) {
87
-			if ( isset( $params[ 'frm_' . $this->param() . '_' . $setting ] ) ) {
88
-				$this->settings->{$setting} = trim( sanitize_text_field( $params[ 'frm_' . $this->param() . '_' . $setting ] ) );
87
+			if ( isset( $params['frm_' . $this->param() . '_' . $setting] ) ) {
88
+				$this->settings->{$setting} = trim( sanitize_text_field( $params['frm_' . $this->param() . '_' . $setting] ) );
89 89
 			}
90 90
 		}
91 91
 
Please login to merge, or discard this patch.
stripe/models/FrmTransLiteAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
 				$has_field  = true;
166 166
 				$key_exists = array_key_exists( $field_atts['name'], $form_atts['form_action']->post_content );
167 167
 				?>
168
-				<option value="<?php echo esc_attr( $field->id ); ?>" <?php selected( $key_exists ? $form_atts['form_action']->post_content[ $field_atts['name'] ] : 0, $field->id ); ?>>
168
+				<option value="<?php echo esc_attr( $field->id ); ?>" <?php selected( $key_exists ? $form_atts['form_action']->post_content[$field_atts['name']] : 0, $field->id ); ?>>
169 169
 					<?php echo esc_attr( FrmAppHelper::truncate( $field->name, 50, 1 ) ); ?>
170 170
 				</option>
171 171
 				<?php
Please login to merge, or discard this patch.
stripe/models/FrmStrpLitePaymentTypeHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@
 block discarded – undo
34 34
 	 * @return string[] An empty array is treated as automatic.
35 35
 	 */
36 36
 	public static function get_payment_method_types( $action ) {
37
-		if ( ! isset( self::$types_by_action_id[ $action->ID ] ) ) {
38
-			self::$types_by_action_id[ $action->ID ] = self::get_filtered_payment_method_types( $action );
37
+		if ( ! isset( self::$types_by_action_id[$action->ID] ) ) {
38
+			self::$types_by_action_id[$action->ID] = self::get_filtered_payment_method_types( $action );
39 39
 		}
40
-		return self::$types_by_action_id[ $action->ID ];
40
+		return self::$types_by_action_id[$action->ID];
41 41
 	}
42 42
 
43 43
 	/**
Please login to merge, or discard this patch.