Completed
Push — master ( f35b27...975688 )
by Stephanie
40s queued 11s
created
classes/models/FrmValidate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 	protected function is_option_on() {
39 39
 		$form = $this->get_form();
40 40
 		$key  = $this->get_option_key();
41
-		return ! empty( $form->options[ $key ] ) && 'off' !== $form->options[ $key ];
41
+		return ! empty( $form->options[$key] ) && 'off' !== $form->options[$key];
42 42
 	}
43 43
 
44 44
 	/**
Please login to merge, or discard this patch.
classes/models/fields/FrmFieldName.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -46,19 +46,19 @@  discard block
 block discarded – undo
46 46
 		$result = array();
47 47
 
48 48
 		foreach ( $names as $name ) {
49
-			if ( empty( $this->sub_fields[ $name ] ) ) {
49
+			if ( empty( $this->sub_fields[$name] ) ) {
50 50
 				continue;
51 51
 			}
52 52
 
53
-			if ( ! isset( $this->sub_fields[ $name ]['wrapper_classes'] ) ) {
54
-				$this->sub_fields[ $name ]['wrapper_classes'] = $col_class;
55
-			} elseif ( is_array( $this->sub_fields[ $name ]['wrapper_classes'] ) ) {
56
-				$this->sub_fields[ $name ]['wrapper_classes'] = implode( ' ', $this->sub_fields[ $name ]['wrapper_classes'] ) . ' ' . $col_class;
53
+			if ( ! isset( $this->sub_fields[$name]['wrapper_classes'] ) ) {
54
+				$this->sub_fields[$name]['wrapper_classes'] = $col_class;
55
+			} elseif ( is_array( $this->sub_fields[$name]['wrapper_classes'] ) ) {
56
+				$this->sub_fields[$name]['wrapper_classes'] = implode( ' ', $this->sub_fields[$name]['wrapper_classes'] ) . ' ' . $col_class;
57 57
 			} else {
58
-				$this->sub_fields[ $name ]['wrapper_classes'] .= ' ' . $col_class;
58
+				$this->sub_fields[$name]['wrapper_classes'] .= ' ' . $col_class;
59 59
 			}
60 60
 
61
-			$result[ $name ] = $this->sub_fields[ $name ];
61
+			$result[$name] = $this->sub_fields[$name];
62 62
 		}
63 63
 
64 64
 		return $result;
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
 		// Default desc.
91 91
 		foreach ( $this->sub_fields as $name => $sub_field ) {
92
-			$extra_options[ $name . '_desc' ] = $sub_field['label'];
92
+			$extra_options[$name . '_desc'] = $sub_field['label'];
93 93
 		}
94 94
 
95 95
 		return $extra_options;
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 		$name_layout = $this->get_name_layout();
126 126
 
127 127
 		if ( ! empty( $atts['show'] ) ) {
128
-			return isset( $value[ $atts['show'] ] ) ? $value[ $atts['show'] ] : '';
128
+			return isset( $value[$atts['show']] ) ? $value[$atts['show']] : '';
129 129
 		}
130 130
 
131 131
 		$value = wp_parse_args(
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 			$args['sub_fields'] = $this->sub_fields;
199 199
 
200 200
 			foreach ( $hidden_fields as $name => $hidden_field ) {
201
-				$args['sub_fields'][ $name ]['wrapper_classes'] .= ' frm_hidden';
201
+				$args['sub_fields'][$name]['wrapper_classes'] .= ' frm_hidden';
202 202
 			}
203 203
 		}
204 204
 	}
Please login to merge, or discard this patch.
classes/helpers/FrmAppHelper.php 1 patch
Spacing   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 			'fill'   => '#4d4d4d',
158 158
 			'orange' => '#f05a24',
159 159
 		);
160
-		$atts     = array_merge( $defaults, $atts );
160
+		$atts = array_merge( $defaults, $atts );
161 161
 
162 162
 		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'] ) . '">
163 163
 			<path fill="' . esc_attr( $atts['orange'] ) . '" d="M289.6 384h140v76h-140z"/>
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 	 * @return string
365 365
 	 */
366 366
 	public static function get_server_value( $value ) {
367
-		return isset( $_SERVER[ $value ] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[ $value ] ) ) : '';
367
+		return isset( $_SERVER[$value] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[$value] ) ) : '';
368 368
 	}
369 369
 
370 370
 	/**
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 		);
388 388
 		$ip = '';
389 389
 		foreach ( $ip_options as $key ) {
390
-			if ( ! isset( $_SERVER[ $key ] ) ) {
390
+			if ( ! isset( $_SERVER[$key] ) ) {
391 391
 				continue;
392 392
 			}
393 393
 
@@ -412,10 +412,10 @@  discard block
 block discarded – undo
412 412
 
413 413
 		if ( $src == 'get' ) {
414 414
 			// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
415
-			$value = isset( $_POST[ $param ] ) ? wp_unslash( $_POST[ $param ] ) : ( isset( $_GET[ $param ] ) ? wp_unslash( $_GET[ $param ] ) : $default );
416
-			if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) {
415
+			$value = isset( $_POST[$param] ) ? wp_unslash( $_POST[$param] ) : ( isset( $_GET[$param] ) ? wp_unslash( $_GET[$param] ) : $default );
416
+			if ( ! isset( $_POST[$param] ) && isset( $_GET[$param] ) && ! is_array( $value ) ) {
417 417
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
418
-				$value = htmlspecialchars_decode( wp_unslash( $_GET[ $param ] ) );
418
+				$value = htmlspecialchars_decode( wp_unslash( $_GET[$param] ) );
419 419
 			}
420 420
 			self::sanitize_value( $sanitize, $value );
421 421
 		} else {
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 				}
437 437
 
438 438
 				$p     = trim( $p, ']' );
439
-				$value = isset( $value[ $p ] ) ? $value[ $p ] : $default;
439
+				$value = isset( $value[$p] ) ? $value[$p] : $default;
440 440
 			}
441 441
 		}
442 442
 
@@ -492,26 +492,26 @@  discard block
 block discarded – undo
492 492
 			'sanitize' => 'sanitize_text_field',
493 493
 			'serialized' => false,
494 494
 		);
495
-		$args     = wp_parse_args( $args, $defaults );
495
+		$args = wp_parse_args( $args, $defaults );
496 496
 
497 497
 		$value = $args['default'];
498 498
 		if ( $args['type'] == 'get' ) {
499
-			if ( $_GET && isset( $_GET[ $args['param'] ] ) ) {
499
+			if ( $_GET && isset( $_GET[$args['param']] ) ) {
500 500
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
501
-				$value = wp_unslash( $_GET[ $args['param'] ] );
501
+				$value = wp_unslash( $_GET[$args['param']] );
502 502
 			}
503 503
 		} elseif ( $args['type'] == 'post' ) {
504
-			if ( isset( $_POST[ $args['param'] ] ) ) {
504
+			if ( isset( $_POST[$args['param']] ) ) {
505 505
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
506
-				$value = wp_unslash( $_POST[ $args['param'] ] );
506
+				$value = wp_unslash( $_POST[$args['param']] );
507 507
 				if ( $args['serialized'] === true && is_serialized_string( $value ) && is_serialized( $value ) ) {
508 508
 					self::unserialize_or_decode( $value );
509 509
 				}
510 510
 			}
511 511
 		} else {
512
-			if ( isset( $_REQUEST[ $args['param'] ] ) ) {
512
+			if ( isset( $_REQUEST[$args['param']] ) ) {
513 513
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
514
-				$value = wp_unslash( $_REQUEST[ $args['param'] ] );
514
+				$value = wp_unslash( $_REQUEST[$args['param']] );
515 515
 			}
516 516
 		}
517 517
 
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
 			if ( is_array( $value ) ) {
544 544
 				$temp_values = $value;
545 545
 				foreach ( $temp_values as $k => $v ) {
546
-					self::sanitize_value( $sanitize, $value[ $k ] );
546
+					self::sanitize_value( $sanitize, $value[$k] );
547 547
 				}
548 548
 			} else {
549 549
 				$value = call_user_func( $sanitize, $value );
@@ -554,8 +554,8 @@  discard block
 block discarded – undo
554 554
 	public static function sanitize_request( $sanitize_method, &$values ) {
555 555
 		$temp_values = $values;
556 556
 		foreach ( $temp_values as $k => $val ) {
557
-			if ( isset( $sanitize_method[ $k ] ) ) {
558
-				$values[ $k ] = call_user_func( $sanitize_method[ $k ], $val );
557
+			if ( isset( $sanitize_method[$k] ) ) {
558
+				$values[$k] = call_user_func( $sanitize_method[$k], $val );
559 559
 			}
560 560
 		}
561 561
 	}
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
 		if ( is_array( $value ) ) {
579 579
 			$temp_values = $value;
580 580
 			foreach ( $temp_values as $k => $v ) {
581
-				self::decode_specialchars( $value[ $k ] );
581
+				self::decode_specialchars( $value[$k] );
582 582
 			}
583 583
 		} else {
584 584
 			self::decode_amp( $value );
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
 			$allowed_html = $html;
656 656
 		} elseif ( ! empty( $allowed ) ) {
657 657
 			foreach ( (array) $allowed as $a ) {
658
-				$allowed_html[ $a ] = isset( $html[ $a ] ) ? $html[ $a ] : array();
658
+				$allowed_html[$a] = isset( $html[$a] ) ? $html[$a] : array();
659 659
 			}
660 660
 		}
661 661
 
@@ -817,8 +817,8 @@  discard block
 block discarded – undo
817 817
 		}
818 818
 
819 819
 		global $wp_query;
820
-		if ( isset( $wp_query->query_vars[ $param ] ) ) {
821
-			$value = $wp_query->query_vars[ $param ];
820
+		if ( isset( $wp_query->query_vars[$param] ) ) {
821
+			$value = $wp_query->query_vars[$param];
822 822
 		}
823 823
 
824 824
 		return $value;
@@ -996,7 +996,7 @@  discard block
 block discarded – undo
996 996
 				'new_file_path' => self::plugin_path() . '/js',
997 997
 			)
998 998
 		);
999
-		$new_file  = new FrmCreateFile( $file_atts );
999
+		$new_file = new FrmCreateFile( $file_atts );
1000 1000
 
1001 1001
 		$files = array(
1002 1002
 			self::plugin_path() . '/js/jquery/jquery.placeholder.min.js',
@@ -1388,8 +1388,8 @@  discard block
 block discarded – undo
1388 1388
 			return $error;
1389 1389
 		}
1390 1390
 
1391
-		$nonce_value = ( $_REQUEST && isset( $_REQUEST[ $nonce_name ] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST[ $nonce_name ] ) ) : '';
1392
-		if ( $_REQUEST && ( ! isset( $_REQUEST[ $nonce_name ] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) {
1391
+		$nonce_value = ( $_REQUEST && isset( $_REQUEST[$nonce_name] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST[$nonce_name] ) ) : '';
1392
+		if ( $_REQUEST && ( ! isset( $_REQUEST[$nonce_name] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) {
1393 1393
 			$frm_settings = self::get_settings();
1394 1394
 			$error        = $frm_settings->admin_permission;
1395 1395
 		}
@@ -1424,7 +1424,7 @@  discard block
 block discarded – undo
1424 1424
 			} else {
1425 1425
 				foreach ( $value as $k => $v ) {
1426 1426
 					if ( ! is_array( $v ) ) {
1427
-						$value[ $k ] = call_user_func( $original_function, $v );
1427
+						$value[$k] = call_user_func( $original_function, $v );
1428 1428
 					}
1429 1429
 				}
1430 1430
 			}
@@ -1449,7 +1449,7 @@  discard block
 block discarded – undo
1449 1449
 				$return = array_merge( $return, self::array_flatten( $value, $keys ) );
1450 1450
 			} else {
1451 1451
 				if ( $keys == 'keep' ) {
1452
-					$return[ $key ] = $value;
1452
+					$return[$key] = $value;
1453 1453
 				} else {
1454 1454
 					$return[] = $value;
1455 1455
 				}
@@ -1513,11 +1513,11 @@  discard block
 block discarded – undo
1513 1513
 		}
1514 1514
 
1515 1515
 		$ver = $default;
1516
-		if ( ! isset( $wp_scripts->registered[ $handle ] ) ) {
1516
+		if ( ! isset( $wp_scripts->registered[$handle] ) ) {
1517 1517
 			return $ver;
1518 1518
 		}
1519 1519
 
1520
-		$query = $wp_scripts->registered[ $handle ];
1520
+		$query = $wp_scripts->registered[$handle];
1521 1521
 		if ( is_object( $query ) && ! empty( $query->ver ) ) {
1522 1522
 			$ver = $query->ver;
1523 1523
 		}
@@ -1675,7 +1675,7 @@  discard block
 block discarded – undo
1675 1675
 
1676 1676
 		foreach ( array( 'name', 'description' ) as $var ) {
1677 1677
 			$default_val    = isset( $record->{$var} ) ? $record->{$var} : '';
1678
-			$values[ $var ] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' );
1678
+			$values[$var] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' );
1679 1679
 			unset( $var, $default_val );
1680 1680
 		}
1681 1681
 
@@ -1733,9 +1733,9 @@  discard block
 block discarded – undo
1733 1733
 			}
1734 1734
 		}
1735 1735
 
1736
-		$field_type = isset( $post_values['field_options'][ 'type_' . $field->id ] ) ? $post_values['field_options'][ 'type_' . $field->id ] : $field->type;
1737
-		if ( isset( $post_values['item_meta'][ $field->id ] ) ) {
1738
-			$new_value = $post_values['item_meta'][ $field->id ];
1736
+		$field_type = isset( $post_values['field_options']['type_' . $field->id] ) ? $post_values['field_options']['type_' . $field->id] : $field->type;
1737
+		if ( isset( $post_values['item_meta'][$field->id] ) ) {
1738
+			$new_value = $post_values['item_meta'][$field->id];
1739 1739
 			self::unserialize_or_decode( $new_value );
1740 1740
 		} else {
1741 1741
 			$new_value = $meta_value;
@@ -1756,7 +1756,7 @@  discard block
 block discarded – undo
1756 1756
 
1757 1757
 		$field_array = array_merge( (array) $field->field_options, $field_array );
1758 1758
 
1759
-		$values['fields'][ $field->id ] = $field_array;
1759
+		$values['fields'][$field->id] = $field_array;
1760 1760
 	}
1761 1761
 
1762 1762
 	/**
@@ -1803,11 +1803,11 @@  discard block
 block discarded – undo
1803 1803
 		}
1804 1804
 
1805 1805
 		foreach ( $form->options as $opt => $value ) {
1806
-			if ( isset( $post_values[ $opt ] ) ) {
1807
-				$values[ $opt ] = $post_values[ $opt ];
1808
-				self::unserialize_or_decode( $values[ $opt ] );
1806
+			if ( isset( $post_values[$opt] ) ) {
1807
+				$values[$opt] = $post_values[$opt];
1808
+				self::unserialize_or_decode( $values[$opt] );
1809 1809
 			} else {
1810
-				$values[ $opt ] = $value;
1810
+				$values[$opt] = $value;
1811 1811
 			}
1812 1812
 		}
1813 1813
 
@@ -1821,8 +1821,8 @@  discard block
 block discarded – undo
1821 1821
 		$form_defaults = FrmFormsHelper::get_default_opts();
1822 1822
 
1823 1823
 		foreach ( $form_defaults as $opt => $default ) {
1824
-			if ( ! isset( $values[ $opt ] ) || $values[ $opt ] == '' ) {
1825
-				$values[ $opt ] = ( $post_values && isset( $post_values['options'][ $opt ] ) ) ? $post_values['options'][ $opt ] : $default;
1824
+			if ( ! isset( $values[$opt] ) || $values[$opt] == '' ) {
1825
+				$values[$opt] = ( $post_values && isset( $post_values['options'][$opt] ) ) ? $post_values['options'][$opt] : $default;
1826 1826
 			}
1827 1827
 
1828 1828
 			unset( $opt, $default );
@@ -1833,8 +1833,8 @@  discard block
 block discarded – undo
1833 1833
 		}
1834 1834
 
1835 1835
 		foreach ( array( 'before', 'after', 'submit' ) as $h ) {
1836
-			if ( ! isset( $values[ $h . '_html' ] ) ) {
1837
-				$values[ $h . '_html' ] = ( isset( $post_values['options'][ $h . '_html' ] ) ? $post_values['options'][ $h . '_html' ] : FrmFormsHelper::get_default_html( $h ) );
1836
+			if ( ! isset( $values[$h . '_html'] ) ) {
1837
+				$values[$h . '_html'] = ( isset( $post_values['options'][$h . '_html'] ) ? $post_values['options'][$h . '_html'] : FrmFormsHelper::get_default_html( $h ) );
1838 1838
 			}
1839 1839
 			unset( $h );
1840 1840
 		}
@@ -1986,25 +1986,25 @@  discard block
 block discarded – undo
1986 1986
 		if ( ! is_numeric( $levels ) ) {
1987 1987
 			// Show time in specified unit.
1988 1988
 			$levels = self::get_unit( $levels );
1989
-			if ( isset( $time_strings[ $levels ] ) ) {
1989
+			if ( isset( $time_strings[$levels] ) ) {
1990 1990
 				$diff = array(
1991 1991
 					$levels => self::time_format( $levels, $diff ),
1992 1992
 				);
1993 1993
 				$time_strings = array(
1994
-					$levels => $time_strings[ $levels ],
1994
+					$levels => $time_strings[$levels],
1995 1995
 				);
1996 1996
 			}
1997 1997
 			$levels = 1;
1998 1998
 		}
1999 1999
 
2000 2000
 		foreach ( $time_strings as $k => $v ) {
2001
-			if ( isset( $diff[ $k ] ) && $diff[ $k ] ) {
2002
-				$time_strings[ $k ] = $diff[ $k ] . ' ' . ( $diff[ $k ] > 1 ? $v[1] : $v[0] );
2003
-			} elseif ( isset( $diff[ $k ] ) && count( $time_strings ) === 1 ) {
2001
+			if ( isset( $diff[$k] ) && $diff[$k] ) {
2002
+				$time_strings[$k] = $diff[$k] . ' ' . ( $diff[$k] > 1 ? $v[1] : $v[0] );
2003
+			} elseif ( isset( $diff[$k] ) && count( $time_strings ) === 1 ) {
2004 2004
 				// Account for 0.
2005
-				$time_strings[ $k ] = $diff[ $k ] . ' ' . $v[1];
2005
+				$time_strings[$k] = $diff[$k] . ' ' . $v[1];
2006 2006
 			} else {
2007
-				unset( $time_strings[ $k ] );
2007
+				unset( $time_strings[$k] );
2008 2008
 			}
2009 2009
 		}
2010 2010
 
@@ -2023,8 +2023,8 @@  discard block
 block discarded – undo
2023 2023
 			'y' => 'y',
2024 2024
 			'd' => 'days',
2025 2025
 		);
2026
-		if ( isset( $return[ $unit ] ) ) {
2027
-			return $diff[ $return[ $unit ] ];
2026
+		if ( isset( $return[$unit] ) ) {
2027
+			return $diff[$return[$unit]];
2028 2028
 		}
2029 2029
 
2030 2030
 		$total = $diff['days'] * self::convert_time( 'd', $unit );
@@ -2032,11 +2032,11 @@  discard block
 block discarded – undo
2032 2032
 		$times = array( 'h', 'i', 's' );
2033 2033
 
2034 2034
 		foreach ( $times as $time ) {
2035
-			if ( ! isset( $diff[ $time ] ) ) {
2035
+			if ( ! isset( $diff[$time] ) ) {
2036 2036
 				continue;
2037 2037
 			}
2038 2038
 
2039
-			$total += $diff[ $time ] * self::convert_time( $time, $unit );
2039
+			$total += $diff[$time] * self::convert_time( $time, $unit );
2040 2040
 		}
2041 2041
 
2042 2042
 		return floor( $total );
@@ -2056,7 +2056,7 @@  discard block
 block discarded – undo
2056 2056
 			'y' => DAY_IN_SECONDS * 365.25,
2057 2057
 		);
2058 2058
 
2059
-		return $convert[ $from ] / $convert[ $to ];
2059
+		return $convert[$from] / $convert[$to];
2060 2060
 	}
2061 2061
 
2062 2062
 	/**
@@ -2064,7 +2064,7 @@  discard block
 block discarded – undo
2064 2064
 	 */
2065 2065
 	private static function get_unit( $unit ) {
2066 2066
 		$units = self::get_time_strings();
2067
-		if ( isset( $units[ $unit ] ) || is_numeric( $unit ) ) {
2067
+		if ( isset( $units[$unit] ) || is_numeric( $unit ) ) {
2068 2068
 			return $unit;
2069 2069
 		}
2070 2070
 
@@ -2175,17 +2175,17 @@  discard block
 block discarded – undo
2175 2175
 
2176 2176
 					case 1:
2177 2177
 						$l2 = $name;
2178
-						self::add_value_to_array( $name, $l2, $this_val, $vars[ $l1 ] );
2178
+						self::add_value_to_array( $name, $l2, $this_val, $vars[$l1] );
2179 2179
 						break;
2180 2180
 
2181 2181
 					case 2:
2182 2182
 						$l3 = $name;
2183
-						self::add_value_to_array( $name, $l3, $this_val, $vars[ $l1 ][ $l2 ] );
2183
+						self::add_value_to_array( $name, $l3, $this_val, $vars[$l1][$l2] );
2184 2184
 						break;
2185 2185
 
2186 2186
 					case 3:
2187 2187
 						$l4 = $name;
2188
-						self::add_value_to_array( $name, $l4, $this_val, $vars[ $l1 ][ $l2 ][ $l3 ] );
2188
+						self::add_value_to_array( $name, $l4, $this_val, $vars[$l1][$l2][$l3] );
2189 2189
 				}
2190 2190
 
2191 2191
 				unset( $this_val, $n );
@@ -2204,8 +2204,8 @@  discard block
 block discarded – undo
2204 2204
 	public static function add_value_to_array( $name, $l1, $val, &$vars ) {
2205 2205
 		if ( $name == '' ) {
2206 2206
 			$vars[] = $val;
2207
-		} elseif ( ! isset( $vars[ $l1 ] ) ) {
2208
-			$vars[ $l1 ] = $val;
2207
+		} elseif ( ! isset( $vars[$l1] ) ) {
2208
+			$vars[$l1] = $val;
2209 2209
 		}
2210 2210
 	}
2211 2211
 
@@ -2221,7 +2221,7 @@  discard block
 block discarded – undo
2221 2221
 			'email_subject' => esc_attr( sprintf( __( 'If you leave the subject blank, the default will be used: %1$s Form submitted on %2$s', 'formidable' ), $form_name, self::site_name() ) ),
2222 2222
 		);
2223 2223
 
2224
-		if ( ! isset( $tooltips[ $name ] ) ) {
2224
+		if ( ! isset( $tooltips[$name] ) ) {
2225 2225
 			return;
2226 2226
 		}
2227 2227
 
@@ -2231,7 +2231,7 @@  discard block
 block discarded – undo
2231 2231
 			echo ' class="frm_help"';
2232 2232
 		}
2233 2233
 
2234
-		echo ' title="' . esc_attr( $tooltips[ $name ] );
2234
+		echo ' title="' . esc_attr( $tooltips[$name] );
2235 2235
 
2236 2236
 		if ( 'open' != $class ) {
2237 2237
 			echo '"';
@@ -2286,13 +2286,13 @@  discard block
 block discarded – undo
2286 2286
 	}
2287 2287
 
2288 2288
 	private static function prepare_action_slashes( $val, $key, &$post_content ) {
2289
-		if ( ! isset( $post_content[ $key ] ) || is_numeric( $val ) ) {
2289
+		if ( ! isset( $post_content[$key] ) || is_numeric( $val ) ) {
2290 2290
 			return;
2291 2291
 		}
2292 2292
 
2293 2293
 		if ( is_array( $val ) ) {
2294 2294
 			foreach ( $val as $k1 => $v1 ) {
2295
-				self::prepare_action_slashes( $v1, $k1, $post_content[ $key ] );
2295
+				self::prepare_action_slashes( $v1, $k1, $post_content[$key] );
2296 2296
 				unset( $k1, $v1 );
2297 2297
 			}
2298 2298
 		} else {
@@ -2300,7 +2300,7 @@  discard block
 block discarded – undo
2300 2300
 			$val = stripslashes( $val );
2301 2301
 
2302 2302
 			// Add backslashes before double quotes and forward slashes only
2303
-			$post_content[ $key ] = addcslashes( $val, '"\\/' );
2303
+			$post_content[$key] = addcslashes( $val, '"\\/' );
2304 2304
 		}
2305 2305
 	}
2306 2306
 
@@ -2359,14 +2359,14 @@  discard block
 block discarded – undo
2359 2359
 				continue;
2360 2360
 			}
2361 2361
 			$key = $input['name'];
2362
-			if ( isset( $formatted[ $key ] ) ) {
2363
-				if ( is_array( $formatted[ $key ] ) ) {
2364
-					$formatted[ $key ][] = $input['value'];
2362
+			if ( isset( $formatted[$key] ) ) {
2363
+				if ( is_array( $formatted[$key] ) ) {
2364
+					$formatted[$key][] = $input['value'];
2365 2365
 				} else {
2366
-					$formatted[ $key ] = array( $formatted[ $key ], $input['value'] );
2366
+					$formatted[$key] = array( $formatted[$key], $input['value'] );
2367 2367
 				}
2368 2368
 			} else {
2369
-				$formatted[ $key ] = $input['value'];
2369
+				$formatted[$key] = $input['value'];
2370 2370
 			}
2371 2371
 		}
2372 2372
 
Please login to merge, or discard this patch.
classes/models/FrmPluginSearch.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -75,16 +75,16 @@  discard block
 block discarded – undo
75 75
 			'name'                => sprintf(
76 76
 				/* translators: Formidable addon name */
77 77
 				esc_html_x( 'Formidable %s', 'Formidable Addon Name', 'formidable' ),
78
-				$addon_list[ $matching_addon ]['name']
78
+				$addon_list[$matching_addon]['name']
79 79
 			),
80
-			'addon'               => $addon_list[ $matching_addon ]['slug'],
81
-			'short_description'   => $addon_list[ $matching_addon ]['excerpt'],
80
+			'addon'               => $addon_list[$matching_addon]['slug'],
81
+			'short_description'   => $addon_list[$matching_addon]['excerpt'],
82 82
 			'slug'                => self::$slug,
83
-			'version'             => $addon_list[ $matching_addon ]['version'],
83
+			'version'             => $addon_list[$matching_addon]['version'],
84 84
 		);
85 85
 
86 86
 		// Splice in the base addon data.
87
-		$inject = array_merge( $inject, $addon_list[ $matching_addon ], $overrides );
87
+		$inject = array_merge( $inject, $addon_list[$matching_addon], $overrides );
88 88
 
89 89
 		// Add it to the top of the list.
90 90
 		array_unshift( $result->plugins, $inject );
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	 * @return array
137 137
 	 */
138 138
 	private function get_addons() {
139
-		$api    = new FrmFormApi();
139
+		$api = new FrmFormApi();
140 140
 		return $api->get_api_info();
141 141
 	}
142 142
 
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 
342 342
 		$all_plugins = get_plugins();
343 343
 
344
-		return isset( $all_plugins[ $plugin ] );
344
+		return isset( $all_plugins[$plugin] );
345 345
 	}
346 346
 
347 347
 	/**
Please login to merge, or discard this patch.
classes/views/frm-forms/form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 			$grid_helper     = new FrmFieldGridHelper();
31 31
 			$values['count'] = 0;
32 32
 			foreach ( $values['fields'] as $field ) {
33
-				$values['count']++;
33
+				$values['count'] ++;
34 34
 				$grid_helper->set_field( $field );
35 35
 				$grid_helper->maybe_begin_field_wrapper();
36 36
 				FrmFieldsController::load_single_field( $field, $values );
Please login to merge, or discard this patch.
classes/widgets/FrmElementorWidget.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 
87 87
 			foreach ( $forms as $form ) {
88 88
 				$form_title           = '' === $form->name ? __( '(no title)', 'formidable' ) : FrmAppHelper::truncate( $form->name, 50 );
89
-				$options[ $form->id ] = esc_html( $form_title );
89
+				$options[$form->id] = esc_html( $form_title );
90 90
 			}
91 91
 
92 92
 			return $options;
Please login to merge, or discard this patch.
classes/controllers/FrmFieldsController.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
 		$_GET['page'] = 'formidable';
20 20
 
21
-		$values     = array(
21
+		$values = array(
22 22
 			'id'         => FrmAppHelper::get_post_param( 'form_id', '', 'absint' ),
23 23
 			'doing_ajax' => true,
24 24
 		);
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
 			ob_start();
43 43
 			self::load_single_field( $field, $values );
44
-			$field_html[ absint( $field->id ) ] = ob_get_contents();
44
+			$field_html[absint( $field->id )] = ob_get_contents();
45 45
 			ob_end_clean();
46 46
 		}
47 47
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 			foreach ( $opts as $opt_key => $opt ) {
257 257
 				if ( strpos( $opt, '|' ) !== false ) {
258 258
 					$vals = explode( '|', $opt );
259
-					$opts[ $opt_key ] = array(
259
+					$opts[$opt_key] = array(
260 260
 						'label' => trim( $vals[0] ),
261 261
 						'value' => trim( $vals[1] ),
262 262
 					);
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 			$other_array = array();
272 272
 			foreach ( $field['options'] as $opt_key => $opt ) {
273 273
 				if ( FrmFieldsHelper::is_other_opt( $opt_key ) ) {
274
-					$other_array[ $opt_key ] = $opt;
274
+					$other_array[$opt_key] = $opt;
275 275
 				}
276 276
 				unset( $opt_key, $opt );
277 277
 			}
@@ -313,18 +313,18 @@  discard block
 block discarded – undo
313 313
 		$disabled_fields     = FrmAppHelper::pro_is_installed() ? array() : $pro_field_selection;
314 314
 		$frm_settings        = FrmAppHelper::get_settings();
315 315
 
316
-		if ( ! isset( $all_field_types[ $field['type'] ] ) ) {
316
+		if ( ! isset( $all_field_types[$field['type']] ) ) {
317 317
 			// Add fallback for an add-on field type that has been deactivated.
318
-			$all_field_types[ $field['type'] ] = array(
318
+			$all_field_types[$field['type']] = array(
319 319
 				'name' => ucfirst( $field['type'] ),
320 320
 				'icon' => 'frm_icon_font frm_pencil_icon',
321 321
 			);
322
-		} elseif ( ! is_array( $all_field_types[ $field['type'] ] ) ) {
322
+		} elseif ( ! is_array( $all_field_types[$field['type']] ) ) {
323 323
 			// Fallback for fields added in a more basic way.
324
-			FrmFormsHelper::prepare_field_type( $all_field_types[ $field['type'] ] );
324
+			FrmFormsHelper::prepare_field_type( $all_field_types[$field['type']] );
325 325
 		}
326 326
 
327
-		$type_name = $all_field_types[ $field['type'] ]['name'];
327
+		$type_name = $all_field_types[$field['type']]['name'];
328 328
 		if ( $field['type'] === 'divider' && FrmField::is_option_true( $field, 'repeat' ) ) {
329 329
 			$type_name = $all_field_types['divider|repeat']['name'];
330 330
 		}
@@ -387,13 +387,13 @@  discard block
 block discarded – undo
387 387
 		$active   = 'default_value';
388 388
 
389 389
 		foreach ( $settings as $type ) {
390
-			if ( ! empty( $field[ $type ] ) ) {
390
+			if ( ! empty( $field[$type] ) ) {
391 391
 				$active = $type;
392 392
 			}
393 393
 		}
394 394
 
395
-		$types[ $active ]['class']  .= ' current';
396
-		$types[ $active ]['current'] = true;
395
+		$types[$active]['class']  .= ' current';
396
+		$types[$active]['current'] = true;
397 397
 
398 398
 		return $types;
399 399
 	}
@@ -407,8 +407,8 @@  discard block
 block discarded – undo
407 407
 			'website' => 'url',
408 408
 			'image'   => 'url',
409 409
 		);
410
-		if ( isset( $type_switch[ $type ] ) ) {
411
-			$type = $type_switch[ $type ];
410
+		if ( isset( $type_switch[$type] ) ) {
411
+			$type = $type_switch[$type];
412 412
 		}
413 413
 
414 414
 		$pro_fields = FrmField::pro_field_selection();
@@ -532,11 +532,11 @@  discard block
 block discarded – undo
532 532
 		// include "col" for valid html
533 533
 		$unit = trim( preg_replace( '/[0-9]+/', '', $field['size'] ) );
534 534
 
535
-		if ( ! isset( $calc[ $unit ] ) ) {
535
+		if ( ! isset( $calc[$unit] ) ) {
536 536
 			return;
537 537
 		}
538 538
 
539
-		$size = (float) str_replace( $unit, '', $field['size'] ) / $calc[ $unit ];
539
+		$size = (float) str_replace( $unit, '', $field['size'] ) / $calc[$unit];
540 540
 
541 541
 		$add_html['cols'] = 'cols="' . absint( $size ) . '"';
542 542
 	}
@@ -729,11 +729,11 @@  discard block
 block discarded – undo
729 729
 	private static function get_form_for_js_validation( $field ) {
730 730
 		global $frm_vars;
731 731
 		if ( ! empty( $frm_vars['js_validate_forms'] ) ) {
732
-			if ( isset( $frm_vars['js_validate_forms'][ $field['form_id'] ] ) ) {
733
-				return $frm_vars['js_validate_forms'][ $field['form_id'] ];
732
+			if ( isset( $frm_vars['js_validate_forms'][$field['form_id']] ) ) {
733
+				return $frm_vars['js_validate_forms'][$field['form_id']];
734 734
 			}
735
-			if ( ! empty( $field['parent_form_id'] ) && isset( $frm_vars['js_validate_forms'][ $field['parent_form_id'] ] ) ) {
736
-				return $frm_vars['js_validate_forms'][ $field['parent_form_id'] ];
735
+			if ( ! empty( $field['parent_form_id'] ) && isset( $frm_vars['js_validate_forms'][$field['parent_form_id']] ) ) {
736
+				return $frm_vars['js_validate_forms'][$field['parent_form_id']];
737 737
 			}
738 738
 		}
739 739
 		return false;
@@ -804,10 +804,10 @@  discard block
 block discarded – undo
804 804
 
805 805
 			if ( is_numeric( $k ) && strpos( $v, '=' ) ) {
806 806
 				$add_html[] = $v;
807
-			} elseif ( ! empty( $k ) && isset( $add_html[ $k ] ) ) {
808
-				$add_html[ $k ] = str_replace( $k . '="', $k . '="' . $v, $add_html[ $k ] );
807
+			} elseif ( ! empty( $k ) && isset( $add_html[$k] ) ) {
808
+				$add_html[$k] = str_replace( $k . '="', $k . '="' . $v, $add_html[$k] );
809 809
 			} else {
810
-				$add_html[ $k ] = $k . '="' . esc_attr( $v ) . '"';
810
+				$add_html[$k] = $k . '="' . esc_attr( $v ) . '"';
811 811
 			}
812 812
 
813 813
 			unset( $k, $v );
Please login to merge, or discard this patch.
classes/models/FrmEntry.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 			$metas       = FrmEntryMeta::get_entry_meta_info( $entry_exist );
78 78
 			$field_metas = array();
79 79
 			foreach ( $metas as $meta ) {
80
-				$field_metas[ $meta->field_id ] = $meta->meta_value;
80
+				$field_metas[$meta->field_id] = $meta->meta_value;
81 81
 			}
82 82
 
83 83
 			$filtered_vals = array_filter( $values['item_meta'] );
@@ -131,10 +131,10 @@  discard block
 block discarded – undo
131 131
 		$reduced = array();
132 132
 		foreach ( $filter_vals as $field_id => $value ) {
133 133
 			$field                = FrmFieldFactory::get_field_object( $field_id );
134
-			$reduced[ $field_id ] = $field->get_value_to_save( $value, array( 'entry_id' => $entry_id ) );
135
-			$reduced[ $field_id ] = $field->set_value_before_save( $reduced[ $field_id ] );
136
-			if ( '' === $reduced[ $field_id ] || ( is_array( $reduced[ $field_id ] ) && 0 === count( $reduced[ $field_id ] ) ) ) {
137
-				unset( $reduced[ $field_id ] );
134
+			$reduced[$field_id] = $field->get_value_to_save( $value, array( 'entry_id' => $entry_id ) );
135
+			$reduced[$field_id] = $field->set_value_before_save( $reduced[$field_id] );
136
+			if ( '' === $reduced[$field_id] || ( is_array( $reduced[$field_id] ) && 0 === count( $reduced[$field_id] ) ) ) {
137
+				unset( $reduced[$field_id] );
138 138
 			}
139 139
 		}
140 140
 		return $reduced;
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 		$query = "SELECT it.*, fr.name as form_name, fr.form_key as form_key FROM {$wpdb->prefix}frm_items it
328 328
                   LEFT OUTER JOIN {$wpdb->prefix}frm_forms fr ON it.form_id=fr.id WHERE ";
329 329
 
330
-		$query      .= is_numeric( $id ) ? 'it.id=%d' : 'it.item_key=%s';
330
+		$query .= is_numeric( $id ) ? 'it.id=%d' : 'it.item_key=%s';
331 331
 		$query_args = array( $id );
332 332
 		$query      = $wpdb->prepare( $query, $query_args ); // WPCS: unprepared SQL ok.
333 333
 
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
 	private static function prepare_entries( &$entries ) {
373 373
 		foreach ( $entries as $k => $entry ) {
374 374
 			self::prepare_entry( $entry );
375
-			$entries[ $k ] = $entry;
375
+			$entries[$k] = $entry;
376 376
 		}
377 377
 	}
378 378
 
@@ -397,20 +397,20 @@  discard block
 block discarded – undo
397 397
 		foreach ( $metas as $meta_val ) {
398 398
 			if ( $meta_val->item_id == $entry->id ) {
399 399
 				FrmAppHelper::unserialize_or_decode( $meta_val->meta_value );
400
-				$entry->metas[ $meta_val->field_id ] = $meta_val->meta_value;
400
+				$entry->metas[$meta_val->field_id] = $meta_val->meta_value;
401 401
 				if ( $include_key ) {
402
-					$entry->metas[ $meta_val->field_key ] = $entry->metas[ $meta_val->field_id ];
402
+					$entry->metas[$meta_val->field_key] = $entry->metas[$meta_val->field_id];
403 403
 				}
404 404
 				continue;
405 405
 			}
406 406
 
407 407
 			// include sub entries in an array
408
-			if ( ! isset( $entry->metas[ $meta_val->field_id ] ) ) {
409
-				$entry->metas[ $meta_val->field_id ] = array();
408
+			if ( ! isset( $entry->metas[$meta_val->field_id] ) ) {
409
+				$entry->metas[$meta_val->field_id] = array();
410 410
 			}
411 411
 
412 412
 			FrmAppHelper::unserialize_or_decode( $meta_val->meta_value );
413
-			$entry->metas[ $meta_val->field_id ][] = $meta_val->meta_value;
413
+			$entry->metas[$meta_val->field_id][] = $meta_val->meta_value;
414 414
 
415 415
 			unset( $meta_val );
416 416
 		}
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 
458 458
 			if ( $inc_form ) {
459 459
 				$fields = 'it.*, fr.name as form_name,fr.form_key as form_key';
460
-				$table  .= 'LEFT OUTER JOIN ' . $wpdb->prefix . 'frm_forms fr ON it.form_id=fr.id ';
460
+				$table .= 'LEFT OUTER JOIN ' . $wpdb->prefix . 'frm_forms fr ON it.form_id=fr.id ';
461 461
 			}
462 462
 
463 463
 			if ( preg_match( '/ meta_([0-9]+)/', $order_by, $order_matches ) ) {
@@ -501,16 +501,16 @@  discard block
 block discarded – undo
501 501
 		}
502 502
 
503 503
 		foreach ( $metas as $m_key => $meta_val ) {
504
-			if ( ! isset( $entries[ $meta_val->item_id ] ) ) {
504
+			if ( ! isset( $entries[$meta_val->item_id] ) ) {
505 505
 				continue;
506 506
 			}
507 507
 
508
-			if ( ! isset( $entries[ $meta_val->item_id ]->metas ) ) {
509
-				$entries[ $meta_val->item_id ]->metas = array();
508
+			if ( ! isset( $entries[$meta_val->item_id]->metas ) ) {
509
+				$entries[$meta_val->item_id]->metas = array();
510 510
 			}
511 511
 
512 512
 			FrmAppHelper::unserialize_or_decode( $meta_val->meta_value );
513
-			$entries[ $meta_val->item_id ]->metas[ $meta_val->field_id ] = $meta_val->meta_value;
513
+			$entries[$meta_val->item_id]->metas[$meta_val->field_id] = $meta_val->meta_value;
514 514
 			unset( $m_key, $meta_val );
515 515
 		}
516 516
 
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
 	}
689 689
 
690 690
 	private static function get_entry_value( $values, $name, $default ) {
691
-		return isset( $values[ $name ] ) ? $values[ $name ] : $default;
691
+		return isset( $values[$name] ) ? $values[$name] : $default;
692 692
 	}
693 693
 
694 694
 	/**
Please login to merge, or discard this patch.
classes/controllers/FrmEntriesController.php 1 patch
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;
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
 
136 136
 		foreach ( $sub_form_cols as $k => $sub_form_col ) {
137 137
 			if ( FrmField::is_no_save_field( $sub_form_col->type ) ) {
138
-				unset( $sub_form_cols[ $k ] );
138
+				unset( $sub_form_cols[$k] );
139 139
 				continue;
140 140
 			}
141
-			$columns[ $form_id . '_' . $sub_form_col->field_key . '-_-' . $field->id ] = FrmAppHelper::truncate( $sub_form_col->name, 35 );
141
+			$columns[$form_id . '_' . $sub_form_col->field_key . '-_-' . $field->id] = FrmAppHelper::truncate( $sub_form_col->name, 35 );
142 142
 			unset( $sub_form_col );
143 143
 		}
144 144
 	}
@@ -155,15 +155,15 @@  discard block
 block discarded – undo
155 155
 		$has_separate_value = ! FrmField::is_option_empty( $field, 'separate_value' );
156 156
 		$is_post_status     = FrmField::is_option_true( $field, 'post_field' ) && $field->field_options['post_field'] == 'post_status';
157 157
 		if ( $has_separate_value && ! $is_post_status ) {
158
-			$columns[ $form_id . '_frmsep_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 );
158
+			$columns[$form_id . '_frmsep_' . $col_id] = FrmAppHelper::truncate( $field->name, 35 );
159 159
 		}
160 160
 
161
-		$columns[ $form_id . '_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 );
161
+		$columns[$form_id . '_' . $col_id] = FrmAppHelper::truncate( $field->name, 35 );
162 162
 	}
163 163
 
164 164
 	private static function maybe_add_ip_col( $form_id, &$columns ) {
165 165
 		if ( FrmAppHelper::ips_saved() ) {
166
-			$columns[ $form_id . '_ip' ] = 'IP';
166
+			$columns[$form_id . '_ip'] = 'IP';
167 167
 		}
168 168
 	}
169 169
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 		foreach ( $meta_value as $mk => $mv ) {
202 202
 			// Remove blank values.
203 203
 			if ( empty( $mv ) ) {
204
-				unset( $meta_value[ $mk ] );
204
+				unset( $meta_value[$mk] );
205 205
 			}
206 206
 		}
207 207
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 
278 278
 		foreach ( $fields as $field ) {
279 279
 			if ( self::field_supports_sorting( $field ) ) {
280
-				$columns[ $form_id . '_' . $field->field_key ] = 'meta_' . $field->id;
280
+				$columns[$form_id . '_' . $field->field_key] = 'meta_' . $field->id;
281 281
 			}
282 282
 		}
283 283
 
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 			$atts['form_id'] . '_item_key' => '',
354 354
 			$atts['form_id'] . '_id'       => '',
355 355
 		);
356
-		$cols         = $remove_first + array_reverse( $frm_vars['cols'], true );
356
+		$cols = $remove_first + array_reverse( $frm_vars['cols'], true );
357 357
 
358 358
 		$i = $atts['i'];
359 359
 
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 
365 365
 			if ( empty( $result ) || ! in_array( $col_key, $result, true ) ) {
366 366
 				$result[] = $col_key;
367
-				$i--;
367
+				$i --;
368 368
 			}
369 369
 
370 370
 			unset( $col_key, $col );
@@ -497,9 +497,9 @@  discard block
 block discarded – undo
497 497
 		if ( ! isset( $frm_vars['form_params'] ) ) {
498 498
 			$frm_vars['form_params'] = array();
499 499
 		}
500
-		$frm_vars['form_params'][ $form->id ] = $params;
500
+		$frm_vars['form_params'][$form->id] = $params;
501 501
 
502
-		if ( isset( $frm_vars['created_entries'][ $form_id ] ) ) {
502
+		if ( isset( $frm_vars['created_entries'][$form_id] ) ) {
503 503
 			return;
504 504
 		}
505 505
 
@@ -515,16 +515,16 @@  discard block
 block discarded – undo
515 515
 		 */
516 516
 		$errors = apply_filters( 'frm_entries_before_create', $errors, $form );
517 517
 
518
-		$frm_vars['created_entries'][ $form_id ] = array( 'errors' => $errors );
518
+		$frm_vars['created_entries'][$form_id] = array( 'errors' => $errors );
519 519
 
520 520
 		if ( empty( $errors ) ) {
521 521
 			$_POST['frm_skip_cookie'] = 1;
522 522
 			$do_success               = false;
523 523
 			if ( $params['action'] == 'create' ) {
524
-				if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][ $form_id ]['entry_id'] ) ) {
525
-					$frm_vars['created_entries'][ $form_id ]['entry_id'] = FrmEntry::create( $_POST );
524
+				if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][$form_id]['entry_id'] ) ) {
525
+					$frm_vars['created_entries'][$form_id]['entry_id'] = FrmEntry::create( $_POST );
526 526
 
527
-					$params['id'] = $frm_vars['created_entries'][ $form_id ]['entry_id'];
527
+					$params['id'] = $frm_vars['created_entries'][$form_id]['entry_id'];
528 528
 					$do_success   = true;
529 529
 				}
530 530
 			}
Please login to merge, or discard this patch.