Completed
Branch 4.0Builder (9ef7e0)
by Stephanie
03:43
created
classes/models/fields/FrmFieldType.php 2 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -299,6 +299,9 @@  discard block
 block discarded – undo
299 299
 		return $this->alter_builder_classes( $classes );
300 300
 	}
301 301
 
302
+	/**
303
+	 * @param string $classes
304
+	 */
302 305
 	protected function alter_builder_classes( $classes ) {
303 306
 		return $classes;
304 307
 	}
@@ -493,6 +496,11 @@  discard block
 block discarded – undo
493 496
 		return $html;
494 497
 	}
495 498
 
499
+	/**
500
+	 * @param string $html
501
+	 *
502
+	 * @return string
503
+	 */
496 504
 	protected function after_replace_html_shortcodes( $args, $html ) {
497 505
 		return $html;
498 506
 	}
@@ -788,6 +796,7 @@  discard block
 block discarded – undo
788 796
 	 * Link input to field description for screen readers
789 797
 	 *
790 798
 	 * @since 3.0
799
+	 * @param string $input_html
791 800
 	 */
792 801
 	protected function add_aria_description( $args, &$input_html ) {
793 802
 		$describedby = '';
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 		$field_val = '';
106 106
 		if ( is_object( $this->field ) ) {
107 107
 			$field_val = $this->field->{$column};
108
-		} elseif ( is_array( $this->field ) && isset( $this->field[ $column ] ) ) {
109
-			$field_val = $this->field[ $column ];
108
+		} elseif ( is_array( $this->field ) && isset( $this->field[$column] ) ) {
109
+			$field_val = $this->field[$column];
110 110
 		}
111 111
 
112 112
 		return $field_val;
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 		if ( is_object( $this->field ) ) {
121 121
 			$this->field->{$column} = $value;
122 122
 		} elseif ( is_array( $this->field ) ) {
123
-			$this->field[ $column ] = $value;
123
+			$this->field[$column] = $value;
124 124
 		}
125 125
 	}
126 126
 
@@ -430,8 +430,8 @@  discard block
 block discarded – undo
430 430
 		$fields = FrmField::field_selection();
431 431
 		$fields = array_merge( $fields, FrmField::pro_field_selection() );
432 432
 
433
-		if ( isset( $fields[ $this->type ] ) ) {
434
-			$name = is_array( $fields[ $this->type ] ) ? $fields[ $this->type ]['name'] : $fields[ $this->type ];
433
+		if ( isset( $fields[$this->type] ) ) {
434
+			$name = is_array( $fields[$this->type] ) ? $fields[$this->type]['name'] : $fields[$this->type];
435 435
 		}
436 436
 
437 437
 		return $name;
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 	}
443 443
 
444 444
 	public function get_default_field_options() {
445
-		$opts       = array(
445
+		$opts = array(
446 446
 			'size'               => '',
447 447
 			'max'                => '',
448 448
 			'label'              => '',
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
 			}
767 767
 		} else {
768 768
 			$args['save_array'] = $this->is_readonly_array();
769
-			$hidden             .= $this->show_single_hidden( $selected_value, $args );
769
+			$hidden .= $this->show_single_hidden( $selected_value, $args );
770 770
 		}
771 771
 
772 772
 		return $hidden;
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
 	protected function show_single_hidden( $selected, $args ) {
776 776
 		if ( $args['save_array'] ) {
777 777
 			$args['field_name'] .= '[]';
778
-			$id                 = '';
778
+			$id = '';
779 779
 		} else {
780 780
 			$id = ' id="' . esc_attr( $args['html_id'] ) . '"';
781 781
 		}
@@ -791,8 +791,8 @@  discard block
 block discarded – undo
791 791
 		$selected = $values['field_value'];
792 792
 
793 793
 		if ( isset( $values['combo_name'] ) ) {
794
-			$options  = $options[ $values['combo_name'] ];
795
-			$selected = ( is_array( $selected ) && isset( $selected[ $values['combo_name'] ] ) ) ? $selected[ $values['combo_name'] ] : '';
794
+			$options  = $options[$values['combo_name']];
795
+			$selected = ( is_array( $selected ) && isset( $selected[$values['combo_name']] ) ) ? $selected[$values['combo_name']] : '';
796 796
 		}
797 797
 
798 798
 		$input = $this->select_tag( $values );
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 	}
847 847
 
848 848
 	protected function fill_display_field_values( $args = array() ) {
849
-		$defaults        = array(
849
+		$defaults = array(
850 850
 			'field_name'    => 'item_meta[' . $this->get_field_column( 'id' ) . ']',
851 851
 			'field_id'      => $this->get_field_column( 'id' ),
852 852
 			'field_plus_id' => '',
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
 			$describedby = 'frm_desc_' . $args['html_id'];
885 885
 		}
886 886
 
887
-		if ( isset( $args['errors'][ 'field' . $args['field_id'] ] ) ) {
887
+		if ( isset( $args['errors']['field' . $args['field_id']] ) ) {
888 888
 			$describedby .= ' frm_error_' . $args['html_id'];
889 889
 		}
890 890
 
@@ -940,8 +940,8 @@  discard block
 block discarded – undo
940 940
 		$value = $this->prepare_display_value( $value, $atts );
941 941
 
942 942
 		if ( is_array( $value ) ) {
943
-			if ( isset( $atts['show'] ) && $atts['show'] && isset( $value[ $atts['show'] ] ) ) {
944
-				$value = $value[ $atts['show'] ];
943
+			if ( isset( $atts['show'] ) && $atts['show'] && isset( $value[$atts['show']] ) ) {
944
+				$value = $value[$atts['show']];
945 945
 			} elseif ( ! isset( $atts['return_array'] ) || ! $atts['return_array'] ) {
946 946
 				$sep   = isset( $atts['sep'] ) ? $atts['sep'] : ', ';
947 947
 				$value = implode( $sep, $value );
@@ -1010,8 +1010,8 @@  discard block
 block discarded – undo
1010 1010
 		$saved_entries = $atts['ids'];
1011 1011
 		$new_value     = array();
1012 1012
 		foreach ( (array) $value as $old_child_id ) {
1013
-			if ( isset( $saved_entries[ $old_child_id ] ) ) {
1014
-				$new_value[] = $saved_entries[ $old_child_id ];
1013
+			if ( isset( $saved_entries[$old_child_id] ) ) {
1014
+				$new_value[] = $saved_entries[$old_child_id];
1015 1015
 			}
1016 1016
 		}
1017 1017
 
Please login to merge, or discard this patch.
classes/controllers/FrmAddonsController.php 2 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -300,7 +300,6 @@  discard block
 block discarded – undo
300 300
 	 * Get the action link for an addon that isn't active.
301 301
 	 *
302 302
 	 * @since 3.06.03
303
-	 * @param string $addon The plugin slug
304 303
 	 * @return array
305 304
 	 */
306 305
 	public static function install_link( $plugin ) {
@@ -403,6 +402,7 @@  discard block
 block discarded – undo
403 402
 
404 403
 	/**
405 404
 	 * @since 3.04.02
405
+	 * @param string $link
406 406
 	 */
407 407
 	private static function prepare_addon_link( &$link ) {
408 408
 		$site_url = 'https://formidableforms.com/';
@@ -736,6 +736,7 @@  discard block
 block discarded – undo
736 736
 	 * so let's install the plugin.
737 737
 	 *
738 738
 	 * @since 3.04.02
739
+	 * @return string
739 740
 	 */
740 741
 	private static function install_addon() {
741 742
 		require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 		} else {
64 64
 			foreach ( $addons as $k => $addon ) {
65 65
 				if ( empty( $addon['excerpt'] ) && $k !== 'error' ) {
66
-					unset( $addons[ $k ] );
66
+					unset( $addons[$k] );
67 67
 				}
68 68
 			}
69 69
 		}
@@ -222,16 +222,16 @@  discard block
 block discarded – undo
222 222
 				continue;
223 223
 			}
224 224
 
225
-			$wp_plugin  = isset( $wp_plugins[ $folder ] ) ? $wp_plugins[ $folder ] : array();
225
+			$wp_plugin  = isset( $wp_plugins[$folder] ) ? $wp_plugins[$folder] : array();
226 226
 			$wp_version = isset( $wp_plugin['Version'] ) ? $wp_plugin['Version'] : '1.0';
227 227
 
228 228
 			if ( version_compare( $wp_version, $plugin->new_version, '<' ) ) {
229 229
 				$slug                           = explode( '/', $folder );
230 230
 				$plugin->slug                   = $slug[0];
231
-				$transient->response[ $folder ] = $plugin;
231
+				$transient->response[$folder] = $plugin;
232 232
 			}
233 233
 
234
-			$transient->checked[ $folder ] = $wp_version;
234
+			$transient->checked[$folder] = $wp_version;
235 235
 
236 236
 		}
237 237
 
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 
255 255
 		$all_plugins = get_plugins();
256 256
 
257
-		return isset( $all_plugins[ $plugin ] );
257
+		return isset( $all_plugins[$plugin] );
258 258
 	}
259 259
 
260 260
 	/**
@@ -293,13 +293,13 @@  discard block
 block discarded – undo
293 293
 			}
294 294
 
295 295
 			$download_id = isset( $plugin['id'] ) ? $plugin['id'] : 0;
296
-			if ( ! empty( $download_id ) && ! isset( $version_info[ $download_id ]['package'] ) ) {
296
+			if ( ! empty( $download_id ) && ! isset( $version_info[$download_id]['package'] ) ) {
297 297
 				// if this addon is using its own license, get the update url
298 298
 				$addon_info = $api->get_api_info();
299 299
 
300
-				$version_info[ $download_id ] = $addon_info[ $download_id ];
300
+				$version_info[$download_id] = $addon_info[$download_id];
301 301
 				if ( isset( $addon_info['error'] ) ) {
302
-					$version_info[ $download_id ]['error'] = array(
302
+					$version_info[$download_id]['error'] = array(
303 303
 						'message' => $addon_info['error']['message'],
304 304
 						'code'    => $addon_info['error']['code'],
305 305
 					);
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 	 * @return array
319 319
 	 */
320 320
 	public static function install_link( $plugin ) {
321
-		$link    = array();
321
+		$link = array();
322 322
 		$addons = self::get_api_addons();
323 323
 		self::prepare_addons( $addons );
324 324
 
@@ -365,8 +365,8 @@  discard block
 block discarded – undo
365 365
 					return $addon;
366 366
 				}
367 367
 			}
368
-		} elseif ( isset( $addons[ $download_id ] ) ) {
369
-			$plugin = $addons[ $download_id ];
368
+		} elseif ( isset( $addons[$download_id] ) ) {
369
+			$plugin = $addons[$download_id];
370 370
 		}
371 371
 
372 372
 		return $plugin;
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
 			self::prepare_addon_link( $addon['link'] );
418 418
 
419 419
 			self::set_addon_status( $addon );
420
-			$addons[ $id ] = $addon;
420
+			$addons[$id] = $addon;
421 421
 		}
422 422
 	}
423 423
 
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 			'utm_medium'   => 'addons',
436 436
 			'utm_campaign' => 'liteplugin',
437 437
 		);
438
-		$link       = add_query_arg( $query_args, $link );
438
+		$link = add_query_arg( $query_args, $link );
439 439
 	}
440 440
 
441 441
 	/**
Please login to merge, or discard this patch.
classes/models/FrmUsage.php 2 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -147,6 +147,7 @@  discard block
 block discarded – undo
147 147
 	 * Include the permissions settings for each capability.
148 148
 	 *
149 149
 	 * @since 3.06.04
150
+	 * @param FrmSettings $settings_list
150 151
 	 * @return array
151 152
 	 */
152 153
 	private function messages( $settings_list ) {
@@ -173,6 +174,7 @@  discard block
 block discarded – undo
173 174
 	 * Include the permissions settings for each capability.
174 175
 	 *
175 176
 	 * @since 3.06.04
177
+	 * @param FrmSettings $settings_list
176 178
 	 * @return array
177 179
 	 */
178 180
 	private function permissions( $settings_list ) {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
 		foreach ( $pass_settings as $setting ) {
140 140
 			if ( isset( $settings_list->$setting ) ) {
141
-				$settings[ $setting ] = $this->maybe_json( $settings_list->$setting );
141
+				$settings[$setting] = $this->maybe_json( $settings_list->$setting );
142 142
 			}
143 143
 		}
144 144
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
 		$message_settings = array();
172 172
 		foreach ( $messages as $message ) {
173
-			$message_settings[ $message ] = $settings_list->$message;
173
+			$message_settings[$message] = $settings_list->$message;
174 174
 		}
175 175
 
176 176
 		return $message_settings;
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
 		foreach ( $frm_roles as $frm_role => $frm_role_description ) {
190 190
 			if ( isset( $settings_list->$frm_role ) ) {
191
-				$permissions[ $frm_role ] = $settings_list->$frm_role;
191
+				$permissions[$frm_role] = $settings_list->$frm_role;
192 192
 			}
193 193
 		}
194 194
 
@@ -255,8 +255,8 @@  discard block
 block discarded – undo
255 255
 			);
256 256
 
257 257
 			foreach ( $settings as $setting ) {
258
-				if ( isset( $form->options[ $setting ] ) ) {
259
-					$new_form[ $setting ] = $this->maybe_json( $form->options[ $setting ] );
258
+				if ( isset( $form->options[$setting] ) ) {
259
+					$new_form[$setting] = $this->maybe_json( $form->options[$setting] );
260 260
 				}
261 261
 			}
262 262
 
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 	 * @return array
308 308
 	 */
309 309
 	private function fields() {
310
-		$args   = array(
310
+		$args = array(
311 311
 			'limit'    => 100,
312 312
 			'order_by' => 'id DESC',
313 313
 		);
Please login to merge, or discard this patch.
classes/controllers/FrmXMLController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 	 *
81 81
 	 * @since 3.06
82 82
 	 *
83
-	 * @param object $xml The values included in the XML.
83
+	 * @param SimpleXMLElement $xml The values included in the XML.
84 84
 	 */
85 85
 	private static function set_new_form_name( &$xml ) {
86 86
 		if ( ! isset( $xml->form ) ) {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 		$export_format = apply_filters( 'frm_export_formats', $export_format );
192 192
 
193 193
 		$file_type = strtolower( pathinfo( $_FILES['frm_import_file']['name'], PATHINFO_EXTENSION ) );
194
-		if ( 'xml' !== $file_type && isset( $export_format[ $file_type ] ) ) {
194
+		if ( 'xml' !== $file_type && isset( $export_format[$file_type] ) ) {
195 195
 			// allow other file types to be imported
196 196
 			do_action( 'frm_before_import_' . $file_type );
197 197
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 		foreach ( $type as $tb_type ) {
275 275
 			$where = array();
276 276
 			$join  = '';
277
-			$table = $tables[ $tb_type ];
277
+			$table = $tables[$tb_type];
278 278
 
279 279
 			$select     = $table . '.id';
280 280
 			$query_vars = array();
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 							$table . '.parent_form_id' => $args['ids'],
290 290
 						);
291 291
 					} else {
292
-						$where[ $table . '.status !' ] = 'draft';
292
+						$where[$table . '.status !'] = 'draft';
293 293
 					}
294 294
 					break;
295 295
 				case 'actions':
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 				case 'items':
303 303
 					// $join = "INNER JOIN {$wpdb->prefix}frm_item_metas im ON ($table.id = im.item_id)";
304 304
 					if ( $args['ids'] ) {
305
-						$where[ $table . '.form_id' ] = $args['ids'];
305
+						$where[$table . '.form_id'] = $args['ids'];
306 306
 					}
307 307
 					break;
308 308
 				case 'styles':
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 					}
344 344
 			}
345 345
 
346
-			$records[ $tb_type ] = FrmDb::get_col( $table . $join, $where, $select );
346
+			$records[$tb_type] = FrmDb::get_col( $table . $join, $where, $select );
347 347
 			unset( $tb_type );
348 348
 		}
349 349
 
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 		$no_export_fields = FrmField::no_save_fields();
487 487
 		foreach ( $csv_fields as $k => $f ) {
488 488
 			if ( in_array( $f->type, $no_export_fields ) ) {
489
-				unset( $csv_fields[ $k ] );
489
+				unset( $csv_fields[$k] );
490 490
 			}
491 491
 		}
492 492
 
Please login to merge, or discard this patch.
classes/helpers/FrmAppHelper.php 2 patches
Doc Comments   +24 added lines patch added patch discarded remove patch
@@ -69,6 +69,9 @@  discard block
 block discarded – undo
69 69
 		return $url;
70 70
 	}
71 71
 
72
+	/**
73
+	 * @return string
74
+	 */
72 75
 	public static function get_affiliate() {
73 76
 		return absint( apply_filters( 'frm_affiliate_id', 0 ) );
74 77
 	}
@@ -129,6 +132,9 @@  discard block
 block discarded – undo
129 132
 		return $frm_settings;
130 133
 	}
131 134
 
135
+	/**
136
+	 * @return string
137
+	 */
132 138
 	public static function get_menu_name() {
133 139
 		$frm_settings = self::get_settings();
134 140
 
@@ -400,6 +406,9 @@  discard block
 block discarded – undo
400 406
 		return $value;
401 407
 	}
402 408
 
409
+	/**
410
+	 * @param string $param
411
+	 */
403 412
 	public static function get_post_param( $param, $default = '', $sanitize = '' ) {
404 413
 		return self::get_simple_request(
405 414
 			array(
@@ -1062,6 +1071,9 @@  discard block
 block discarded – undo
1062 1071
 		return ( is_array( $values ) && in_array( $current, $values ) ) || ( ! is_array( $values ) && $values == $current );
1063 1072
 	}
1064 1073
 
1074
+	/**
1075
+	 * @param string $function
1076
+	 */
1065 1077
 	public static function recursive_function_map( $value, $function ) {
1066 1078
 		if ( is_array( $value ) ) {
1067 1079
 			$original_function = $function;
@@ -1110,6 +1122,9 @@  discard block
 block discarded – undo
1110 1122
 		return $return;
1111 1123
 	}
1112 1124
 
1125
+	/**
1126
+	 * @return string
1127
+	 */
1113 1128
 	public static function esc_textarea( $text, $is_rich_text = false ) {
1114 1129
 		$safe_text = str_replace( '&quot;', '"', $text );
1115 1130
 		if ( ! $is_rich_text ) {
@@ -1322,6 +1337,9 @@  discard block
 block discarded – undo
1322 1337
 		return $values;
1323 1338
 	}
1324 1339
 
1340
+	/**
1341
+	 * @param string $fields
1342
+	 */
1325 1343
 	private static function prepare_field_arrays( $fields, $record, array &$values, $args ) {
1326 1344
 		if ( ! empty( $fields ) ) {
1327 1345
 			foreach ( (array) $fields as $field ) {
@@ -1515,6 +1533,9 @@  discard block
 block discarded – undo
1515 1533
 		return $sub . ( ( $len < $original_len ) ? $continue : '' );
1516 1534
 	}
1517 1535
 
1536
+	/**
1537
+	 * @param string[] $function_names
1538
+	 */
1518 1539
 	public static function mb_function( $function_names, $args ) {
1519 1540
 		$mb_function_name = $function_names[0];
1520 1541
 		$function_name    = $function_names[1];
@@ -1549,6 +1570,9 @@  discard block
 block discarded – undo
1549 1570
 		return $formatted;
1550 1571
 	}
1551 1572
 
1573
+	/**
1574
+	 * @param string $time_format
1575
+	 */
1552 1576
 	private static function add_time_to_date( $time_format, $date ) {
1553 1577
 		if ( empty( $time_format ) ) {
1554 1578
 			$time_format = get_option( 'time_format' );
Please login to merge, or discard this patch.
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 			'fill'   => '#4d4d4d',
146 146
 			'orange' => '#f05a24',
147 147
 		);
148
-		$atts     = array_merge( $defaults, $atts );
148
+		$atts = array_merge( $defaults, $atts );
149 149
 
150 150
 		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'] ) . '">
151 151
 				<defs />
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 	 * @return string
324 324
 	 */
325 325
 	public static function get_server_value( $value ) {
326
-		return isset( $_SERVER[ $value ] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[ $value ] ) ) : '';
326
+		return isset( $_SERVER[$value] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[$value] ) ) : '';
327 327
 	}
328 328
 
329 329
 	/**
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 		);
347 347
 		$ip = '';
348 348
 		foreach ( $ip_options as $key ) {
349
-			if ( ! isset( $_SERVER[ $key ] ) ) {
349
+			if ( ! isset( $_SERVER[$key] ) ) {
350 350
 				continue;
351 351
 			}
352 352
 
@@ -370,9 +370,9 @@  discard block
 block discarded – undo
370 370
 		}
371 371
 
372 372
 		if ( $src == 'get' ) {
373
-			$value = isset( $_POST[ $param ] ) ? wp_unslash( $_POST[ $param ] ) : ( isset( $_GET[ $param ] ) ? wp_unslash( $_GET[ $param ] ) : $default );
374
-			if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) {
375
-				$value = htmlspecialchars_decode( wp_unslash( $_GET[ $param ] ) );
373
+			$value = isset( $_POST[$param] ) ? wp_unslash( $_POST[$param] ) : ( isset( $_GET[$param] ) ? wp_unslash( $_GET[$param] ) : $default );
374
+			if ( ! isset( $_POST[$param] ) && isset( $_GET[$param] ) && ! is_array( $value ) ) {
375
+				$value = htmlspecialchars_decode( wp_unslash( $_GET[$param] ) );
376 376
 			}
377 377
 			self::sanitize_value( $sanitize, $value );
378 378
 		} else {
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 				}
394 394
 
395 395
 				$p     = trim( $p, ']' );
396
-				$value = isset( $value[ $p ] ) ? $value[ $p ] : $default;
396
+				$value = isset( $value[$p] ) ? $value[$p] : $default;
397 397
 			}
398 398
 		}
399 399
 
@@ -447,20 +447,20 @@  discard block
 block discarded – undo
447 447
 			'type'     => 'get',
448 448
 			'sanitize' => 'sanitize_text_field',
449 449
 		);
450
-		$args     = wp_parse_args( $args, $defaults );
450
+		$args = wp_parse_args( $args, $defaults );
451 451
 
452 452
 		$value = $args['default'];
453 453
 		if ( $args['type'] == 'get' ) {
454
-			if ( $_GET && isset( $_GET[ $args['param'] ] ) ) {
455
-				$value = wp_unslash( $_GET[ $args['param'] ] );
454
+			if ( $_GET && isset( $_GET[$args['param']] ) ) {
455
+				$value = wp_unslash( $_GET[$args['param']] );
456 456
 			}
457 457
 		} elseif ( $args['type'] == 'post' ) {
458
-			if ( isset( $_POST[ $args['param'] ] ) ) {
459
-				$value = maybe_unserialize( wp_unslash( $_POST[ $args['param'] ] ) );
458
+			if ( isset( $_POST[$args['param']] ) ) {
459
+				$value = maybe_unserialize( wp_unslash( $_POST[$args['param']] ) );
460 460
 			}
461 461
 		} else {
462
-			if ( isset( $_REQUEST[ $args['param'] ] ) ) {
463
-				$value = wp_unslash( $_REQUEST[ $args['param'] ] );
462
+			if ( isset( $_REQUEST[$args['param']] ) ) {
463
+				$value = wp_unslash( $_REQUEST[$args['param']] );
464 464
 			}
465 465
 		}
466 466
 
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 			if ( is_array( $value ) ) {
493 493
 				$temp_values = $value;
494 494
 				foreach ( $temp_values as $k => $v ) {
495
-					self::sanitize_value( $sanitize, $value[ $k ] );
495
+					self::sanitize_value( $sanitize, $value[$k] );
496 496
 				}
497 497
 			} else {
498 498
 				$value = call_user_func( $sanitize, $value );
@@ -503,8 +503,8 @@  discard block
 block discarded – undo
503 503
 	public static function sanitize_request( $sanitize_method, &$values ) {
504 504
 		$temp_values = $values;
505 505
 		foreach ( $temp_values as $k => $val ) {
506
-			if ( isset( $sanitize_method[ $k ] ) ) {
507
-				$values[ $k ] = call_user_func( $sanitize_method[ $k ], $val );
506
+			if ( isset( $sanitize_method[$k] ) ) {
507
+				$values[$k] = call_user_func( $sanitize_method[$k], $val );
508 508
 			}
509 509
 		}
510 510
 	}
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
 			$allowed_html = $html;
536 536
 		} elseif ( ! empty( $allowed ) ) {
537 537
 			foreach ( (array) $allowed as $a ) {
538
-				$allowed_html[ $a ] = isset( $html[ $a ] ) ? $html[ $a ] : array();
538
+				$allowed_html[$a] = isset( $html[$a] ) ? $html[$a] : array();
539 539
 			}
540 540
 		}
541 541
 
@@ -679,8 +679,8 @@  discard block
 block discarded – undo
679 679
 		}
680 680
 
681 681
 		global $wp_query;
682
-		if ( isset( $wp_query->query_vars[ $param ] ) ) {
683
-			$value = $wp_query->query_vars[ $param ];
682
+		if ( isset( $wp_query->query_vars[$param] ) ) {
683
+			$value = $wp_query->query_vars[$param];
684 684
 		}
685 685
 
686 686
 		return $value;
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
 				'new_file_path' => self::plugin_path() . '/js',
782 782
 			)
783 783
 		);
784
-		$new_file  = new FrmCreateFile( $file_atts );
784
+		$new_file = new FrmCreateFile( $file_atts );
785 785
 
786 786
 		$files = array(
787 787
 			self::plugin_path() . '/js/jquery/jquery.placeholder.min.js',
@@ -1039,8 +1039,8 @@  discard block
 block discarded – undo
1039 1039
 			return $error;
1040 1040
 		}
1041 1041
 
1042
-		$nonce_value = ( $_REQUEST && isset( $_REQUEST[ $nonce_name ] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST[ $nonce_name ] ) ) : '';
1043
-		if ( $_REQUEST && ( ! isset( $_REQUEST[ $nonce_name ] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) {
1042
+		$nonce_value = ( $_REQUEST && isset( $_REQUEST[$nonce_name] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST[$nonce_name] ) ) : '';
1043
+		if ( $_REQUEST && ( ! isset( $_REQUEST[$nonce_name] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) {
1044 1044
 			$frm_settings = self::get_settings();
1045 1045
 			$error        = $frm_settings->admin_permission;
1046 1046
 		}
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
 			} else {
1076 1076
 				foreach ( $value as $k => $v ) {
1077 1077
 					if ( ! is_array( $v ) ) {
1078
-						$value[ $k ] = call_user_func( $original_function, $v );
1078
+						$value[$k] = call_user_func( $original_function, $v );
1079 1079
 					}
1080 1080
 				}
1081 1081
 			}
@@ -1100,7 +1100,7 @@  discard block
 block discarded – undo
1100 1100
 				$return = array_merge( $return, self::array_flatten( $value, $keys ) );
1101 1101
 			} else {
1102 1102
 				if ( $keys == 'keep' ) {
1103
-					$return[ $key ] = $value;
1103
+					$return[$key] = $value;
1104 1104
 				} else {
1105 1105
 					$return[] = $value;
1106 1106
 				}
@@ -1164,11 +1164,11 @@  discard block
 block discarded – undo
1164 1164
 		}
1165 1165
 
1166 1166
 		$ver = $default;
1167
-		if ( ! isset( $wp_scripts->registered[ $handle ] ) ) {
1167
+		if ( ! isset( $wp_scripts->registered[$handle] ) ) {
1168 1168
 			return $ver;
1169 1169
 		}
1170 1170
 
1171
-		$query = $wp_scripts->registered[ $handle ];
1171
+		$query = $wp_scripts->registered[$handle];
1172 1172
 		if ( is_object( $query ) && ! empty( $query->ver ) ) {
1173 1173
 			$ver = $query->ver;
1174 1174
 		}
@@ -1303,7 +1303,7 @@  discard block
 block discarded – undo
1303 1303
 
1304 1304
 		foreach ( array( 'name', 'description' ) as $var ) {
1305 1305
 			$default_val    = isset( $record->{$var} ) ? $record->{$var} : '';
1306
-			$values[ $var ] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' );
1306
+			$values[$var] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' );
1307 1307
 			unset( $var, $default_val );
1308 1308
 		}
1309 1309
 
@@ -1358,8 +1358,8 @@  discard block
 block discarded – undo
1358 1358
 			}
1359 1359
 		}
1360 1360
 
1361
-		$field_type = isset( $post_values['field_options'][ 'type_' . $field->id ] ) ? $post_values['field_options'][ 'type_' . $field->id ] : $field->type;
1362
-		$new_value  = isset( $post_values['item_meta'][ $field->id ] ) ? maybe_unserialize( $post_values['item_meta'][ $field->id ] ) : $meta_value;
1361
+		$field_type = isset( $post_values['field_options']['type_' . $field->id] ) ? $post_values['field_options']['type_' . $field->id] : $field->type;
1362
+		$new_value  = isset( $post_values['item_meta'][$field->id] ) ? maybe_unserialize( $post_values['item_meta'][$field->id] ) : $meta_value;
1363 1363
 
1364 1364
 		$field_array                   = self::start_field_array( $field );
1365 1365
 		$field_array['value']          = $new_value;
@@ -1376,7 +1376,7 @@  discard block
 block discarded – undo
1376 1376
 
1377 1377
 		$field_array = array_merge( $field->field_options, $field_array );
1378 1378
 
1379
-		$values['fields'][ $field->id ] = $field_array;
1379
+		$values['fields'][$field->id] = $field_array;
1380 1380
 	}
1381 1381
 
1382 1382
 	/**
@@ -1423,7 +1423,7 @@  discard block
 block discarded – undo
1423 1423
 		}
1424 1424
 
1425 1425
 		foreach ( $form->options as $opt => $value ) {
1426
-			$values[ $opt ] = isset( $post_values[ $opt ] ) ? maybe_unserialize( $post_values[ $opt ] ) : $value;
1426
+			$values[$opt] = isset( $post_values[$opt] ) ? maybe_unserialize( $post_values[$opt] ) : $value;
1427 1427
 		}
1428 1428
 
1429 1429
 		self::fill_form_defaults( $post_values, $values );
@@ -1436,8 +1436,8 @@  discard block
 block discarded – undo
1436 1436
 		$form_defaults = FrmFormsHelper::get_default_opts();
1437 1437
 
1438 1438
 		foreach ( $form_defaults as $opt => $default ) {
1439
-			if ( ! isset( $values[ $opt ] ) || $values[ $opt ] == '' ) {
1440
-				$values[ $opt ] = ( $post_values && isset( $post_values['options'][ $opt ] ) ) ? $post_values['options'][ $opt ] : $default;
1439
+			if ( ! isset( $values[$opt] ) || $values[$opt] == '' ) {
1440
+				$values[$opt] = ( $post_values && isset( $post_values['options'][$opt] ) ) ? $post_values['options'][$opt] : $default;
1441 1441
 			}
1442 1442
 
1443 1443
 			unset( $opt, $default );
@@ -1448,8 +1448,8 @@  discard block
 block discarded – undo
1448 1448
 		}
1449 1449
 
1450 1450
 		foreach ( array( 'before', 'after', 'submit' ) as $h ) {
1451
-			if ( ! isset( $values[ $h . '_html' ] ) ) {
1452
-				$values[ $h . '_html' ] = ( isset( $post_values['options'][ $h . '_html' ] ) ? $post_values['options'][ $h . '_html' ] : FrmFormsHelper::get_default_html( $h ) );
1451
+			if ( ! isset( $values[$h . '_html'] ) ) {
1452
+				$values[$h . '_html'] = ( isset( $post_values['options'][$h . '_html'] ) ? $post_values['options'][$h . '_html'] : FrmFormsHelper::get_default_html( $h ) );
1453 1453
 			}
1454 1454
 			unset( $h );
1455 1455
 		}
@@ -1599,10 +1599,10 @@  discard block
 block discarded – undo
1599 1599
 		$time_strings = self::get_time_strings();
1600 1600
 
1601 1601
 		foreach ( $time_strings as $k => $v ) {
1602
-			if ( $diff[ $k ] ) {
1603
-				$time_strings[ $k ] = $diff[ $k ] . ' ' . ( $diff[ $k ] > 1 ? $v[1] : $v[0] );
1602
+			if ( $diff[$k] ) {
1603
+				$time_strings[$k] = $diff[$k] . ' ' . ( $diff[$k] > 1 ? $v[1] : $v[0] );
1604 1604
 			} else {
1605
-				unset( $time_strings[ $k ] );
1605
+				unset( $time_strings[$k] );
1606 1606
 			}
1607 1607
 		}
1608 1608
 
@@ -1683,17 +1683,17 @@  discard block
 block discarded – undo
1683 1683
 
1684 1684
 					case 1:
1685 1685
 						$l2 = $name;
1686
-						self::add_value_to_array( $name, $l2, $this_val, $vars[ $l1 ] );
1686
+						self::add_value_to_array( $name, $l2, $this_val, $vars[$l1] );
1687 1687
 						break;
1688 1688
 
1689 1689
 					case 2:
1690 1690
 						$l3 = $name;
1691
-						self::add_value_to_array( $name, $l3, $this_val, $vars[ $l1 ][ $l2 ] );
1691
+						self::add_value_to_array( $name, $l3, $this_val, $vars[$l1][$l2] );
1692 1692
 						break;
1693 1693
 
1694 1694
 					case 3:
1695 1695
 						$l4 = $name;
1696
-						self::add_value_to_array( $name, $l4, $this_val, $vars[ $l1 ][ $l2 ][ $l3 ] );
1696
+						self::add_value_to_array( $name, $l4, $this_val, $vars[$l1][$l2][$l3] );
1697 1697
 				}
1698 1698
 
1699 1699
 				unset( $this_val, $n );
@@ -1712,8 +1712,8 @@  discard block
 block discarded – undo
1712 1712
 	public static function add_value_to_array( $name, $l1, $val, &$vars ) {
1713 1713
 		if ( $name == '' ) {
1714 1714
 			$vars[] = $val;
1715
-		} elseif ( ! isset( $vars[ $l1 ] ) ) {
1716
-			$vars[ $l1 ] = $val;
1715
+		} elseif ( ! isset( $vars[$l1] ) ) {
1716
+			$vars[$l1] = $val;
1717 1717
 		}
1718 1718
 	}
1719 1719
 
@@ -1729,7 +1729,7 @@  discard block
 block discarded – undo
1729 1729
 			'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() ) ),
1730 1730
 		);
1731 1731
 
1732
-		if ( ! isset( $tooltips[ $name ] ) ) {
1732
+		if ( ! isset( $tooltips[$name] ) ) {
1733 1733
 			return;
1734 1734
 		}
1735 1735
 
@@ -1739,7 +1739,7 @@  discard block
 block discarded – undo
1739 1739
 			echo ' class="frm_help"';
1740 1740
 		}
1741 1741
 
1742
-		echo ' title="' . esc_attr( $tooltips[ $name ] );
1742
+		echo ' title="' . esc_attr( $tooltips[$name] );
1743 1743
 
1744 1744
 		if ( 'open' != $class ) {
1745 1745
 			echo '"';
@@ -1792,13 +1792,13 @@  discard block
 block discarded – undo
1792 1792
 	}
1793 1793
 
1794 1794
 	private static function prepare_action_slashes( $val, $key, &$post_content ) {
1795
-		if ( ! isset( $post_content[ $key ] ) ) {
1795
+		if ( ! isset( $post_content[$key] ) ) {
1796 1796
 			return;
1797 1797
 		}
1798 1798
 
1799 1799
 		if ( is_array( $val ) ) {
1800 1800
 			foreach ( $val as $k1 => $v1 ) {
1801
-				self::prepare_action_slashes( $v1, $k1, $post_content[ $key ] );
1801
+				self::prepare_action_slashes( $v1, $k1, $post_content[$key] );
1802 1802
 				unset( $k1, $v1 );
1803 1803
 			}
1804 1804
 		} else {
@@ -1806,7 +1806,7 @@  discard block
 block discarded – undo
1806 1806
 			$val = stripslashes( $val );
1807 1807
 
1808 1808
 			// Add backslashes before double quotes and forward slashes only
1809
-			$post_content[ $key ] = addcslashes( $val, '"\\/' );
1809
+			$post_content[$key] = addcslashes( $val, '"\\/' );
1810 1810
 		}
1811 1811
 	}
1812 1812
 
Please login to merge, or discard this patch.
classes/helpers/FrmFieldsHelper.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 *
110 110
 	 * @param string $type
111 111
 	 *
112
-	 * @return array
112
+	 * @return string
113 113
 	 */
114 114
 	public static function get_default_field_options( $type ) {
115 115
 		$field_type = FrmFieldFactory::get_field_type( $type );
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 	 *
213 213
 	 * @param object $field
214 214
 	 *
215
-	 * @return array
215
+	 * @return stdClass
216 216
 	 */
217 217
 	private static function get_original_field( $field ) {
218 218
 		$original_type = FrmField::get_option( $field, 'original_type' );
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 	 *
241 241
 	 * @param string $type
242 242
 	 *
243
-	 * @return array
243
+	 * @return string
244 244
 	 */
245 245
 	public static function get_default_field( $type ) {
246 246
 		$field_type = FrmFieldFactory::get_field_type( $type );
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	 * @since 2.0
266 266
 	 *
267 267
 	 * @param $field
268
-	 * @param $error
268
+	 * @param string $error
269 269
 	 *
270 270
 	 * @return string
271 271
 	 */
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 			if ( in_array( $type, array( 'data', 'lookup' ) ) ) {
27 27
 				$values['field_options']['data_type'] = $setting;
28 28
 			} else {
29
-				$values['field_options'][ $setting ] = 1;
29
+				$values['field_options'][$setting] = 1;
30 30
 			}
31 31
 		}
32 32
 
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
 		}
134 134
 
135 135
 		foreach ( $defaults as $opt => $default ) {
136
-			$values[ $opt ] = isset( $field->field_options[ $opt ] ) ? $field->field_options[ $opt ] : $default;
136
+			$values[$opt] = isset( $field->field_options[$opt] ) ? $field->field_options[$opt] : $default;
137 137
 
138 138
 			if ( $check_post ) {
139
-				self::get_posted_field_setting( $opt . '_' . $field->id, $values[ $opt ] );
139
+				self::get_posted_field_setting( $opt . '_' . $field->id, $values[$opt] );
140 140
 			}
141 141
 
142 142
 			unset( $opt, $default );
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
 	 * @param mixed $value
181 181
 	 */
182 182
 	private static function get_posted_field_setting( $setting, &$value ) {
183
-		if ( isset( $_POST['field_options'][ $setting ] ) ) {
184
-			$value = maybe_unserialize( $_POST['field_options'][ $setting ] );
183
+		if ( isset( $_POST['field_options'][$setting] ) ) {
184
+			$value = maybe_unserialize( $_POST['field_options'][$setting] );
185 185
 			if ( strpos( $setting, 'html' ) !== false ) {
186 186
 				// strip slashes from HTML but not regex
187 187
 				$value = stripslashes_deep( $value );
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 		$values['default_value'] = maybe_serialize( $field->default_value );
258 258
 
259 259
 		foreach ( array( 'name', 'description', 'type', 'field_order', 'field_options', 'required' ) as $col ) {
260
-			$values[ $col ] = $field->{$col};
260
+			$values[$col] = $field->{$col};
261 261
 		}
262 262
 	}
263 263
 
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 		);
298 298
 
299 299
 		$msg = FrmField::get_option( $field, $error );
300
-		$msg = empty( $msg ) ? $defaults[ $error ]['part'] : $msg;
300
+		$msg = empty( $msg ) ? $defaults[$error]['part'] : $msg;
301 301
 		$msg = do_shortcode( $msg );
302 302
 
303 303
 		return $msg;
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 		}
406 406
 
407 407
 		$base_name = 'default_value_' . $field['id'];
408
-		$html_id    = isset( $field['html_id'] ) ? $field['html_id'] : self::get_html_id( $field );
408
+		$html_id = isset( $field['html_id'] ) ? $field['html_id'] : self::get_html_id( $field );
409 409
 
410 410
 		$default_type = self::get_default_value_type( $field );
411 411
 
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
 				continue;
702 702
 			}
703 703
 
704
-			$atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[3][ $short_key ] );
704
+			$atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[3][$short_key] );
705 705
 			$tag  = FrmShortcodeHelper::get_shortcode_tag( $shortcodes, $short_key );
706 706
 
707 707
 			$atts['entry'] = $entry;
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
 
711 711
 			if ( $replace_with !== null ) {
712 712
 				self::sanitize_embedded_shortcodes( compact( 'entry' ), $replace_with );
713
-				$content = str_replace( $shortcodes[0][ $short_key ], $replace_with, $content );
713
+				$content = str_replace( $shortcodes[0][$short_key], $replace_with, $content );
714 714
 			}
715 715
 
716 716
 			unset( $atts, $replace_with );
@@ -753,8 +753,8 @@  discard block
 block discarded – undo
753 753
 
754 754
 		$dynamic_default = array( 'admin_email', 'siteurl', 'frmurl', 'sitename', 'get' );
755 755
 
756
-		if ( isset( $shortcode_values[ $atts['tag'] ] ) ) {
757
-			$replace_with = $shortcode_values[ $atts['tag'] ];
756
+		if ( isset( $shortcode_values[$atts['tag']] ) ) {
757
+			$replace_with = $shortcode_values[$atts['tag']];
758 758
 		} elseif ( in_array( $atts['tag'], $dynamic_default ) ) {
759 759
 			$replace_with = self::dynamic_default_values( $atts['tag'], $atts );
760 760
 		} elseif ( $clean_tag == 'user_agent' ) {
@@ -963,8 +963,8 @@  discard block
 block discarded – undo
963 963
 			self::field_types_for_input( $single_input, $field_selection, $field_types );
964 964
 		} elseif ( in_array( $type, $multiple_input ) ) {
965 965
 			self::field_types_for_input( $multiple_input, $field_selection, $field_types );
966
-		} elseif ( isset( $field_selection[ $type ] ) ) {
967
-			$field_types[ $type ] = $field_selection[ $type ];
966
+		} elseif ( isset( $field_selection[$type] ) ) {
967
+			$field_types[$type] = $field_selection[$type];
968 968
 		}
969 969
 
970 970
 		$field_types = apply_filters( 'frm_switch_field_types', $field_types, compact( 'type' ) );
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
 
998 998
 	private static function field_types_for_input( $inputs, $fields, &$field_types ) {
999 999
 		foreach ( $inputs as $input ) {
1000
-			$field_types[ $input ] = $fields[ $input ];
1000
+			$field_types[$input] = $fields[$input];
1001 1001
 			unset( $input );
1002 1002
 		}
1003 1003
 	}
@@ -1029,7 +1029,7 @@  discard block
 block discarded – undo
1029 1029
 			'parent'  => false,
1030 1030
 			'pointer' => false,
1031 1031
 		);
1032
-		$args     = wp_parse_args( $args, $defaults );
1032
+		$args = wp_parse_args( $args, $defaults );
1033 1033
 
1034 1034
 		$opt_key   = $args['opt_key'];
1035 1035
 		$field     = $args['field'];
@@ -1046,22 +1046,22 @@  discard block
 block discarded – undo
1046 1046
 		// Check posted vals before checking saved values
1047 1047
 
1048 1048
 		// For fields inside repeating sections - note, don't check if $pointer is true because it will often be zero
1049
-		if ( $parent && isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ) {
1049
+		if ( $parent && isset( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']] ) ) {
1050 1050
 			if ( FrmField::is_field_with_multiple_values( $field ) ) {
1051
-				$other_val = isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ][ $opt_key ] ) ? sanitize_text_field( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ][ $opt_key ] ) : '';
1051
+				$other_val = isset( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']][$opt_key] ) ? sanitize_text_field( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']][$opt_key] ) : '';
1052 1052
 			} else {
1053
-				$other_val = sanitize_text_field( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] );
1053
+				$other_val = sanitize_text_field( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']] );
1054 1054
 			}
1055 1055
 
1056 1056
 			return $other_val;
1057 1057
 
1058
-		} elseif ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][ $field['id'] ] ) ) {
1058
+		} elseif ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][$field['id']] ) ) {
1059 1059
 			// For normal fields
1060 1060
 
1061 1061
 			if ( FrmField::is_field_with_multiple_values( $field ) ) {
1062
-				$other_val = isset( $_POST['item_meta']['other'][ $field['id'] ][ $opt_key ] ) ? sanitize_text_field( $_POST['item_meta']['other'][ $field['id'] ][ $opt_key ] ) : '';
1062
+				$other_val = isset( $_POST['item_meta']['other'][$field['id']][$opt_key] ) ? sanitize_text_field( $_POST['item_meta']['other'][$field['id']][$opt_key] ) : '';
1063 1063
 			} else {
1064
-				$other_val = sanitize_text_field( $_POST['item_meta']['other'][ $field['id'] ] );
1064
+				$other_val = sanitize_text_field( $_POST['item_meta']['other'][$field['id']] );
1065 1065
 			}
1066 1066
 
1067 1067
 			return $other_val;
@@ -1071,8 +1071,8 @@  discard block
 block discarded – undo
1071 1071
 		if ( $field['type'] == 'checkbox' && is_array( $field['value'] ) ) {
1072 1072
 			// Check if there is an "other" val in saved value and make sure the
1073 1073
 			// "other" val is not equal to the Other checkbox option
1074
-			if ( isset( $field['value'][ $opt_key ] ) && $field['options'][ $opt_key ] != $field['value'][ $opt_key ] ) {
1075
-				$other_val = $field['value'][ $opt_key ];
1074
+			if ( isset( $field['value'][$opt_key] ) && $field['options'][$opt_key] != $field['value'][$opt_key] ) {
1075
+				$other_val = $field['value'][$opt_key];
1076 1076
 			}
1077 1077
 		} else {
1078 1078
 			/**
@@ -1084,8 +1084,8 @@  discard block
 block discarded – undo
1084 1084
 				// Multi-select dropdowns - key is not preserved
1085 1085
 				if ( is_array( $field['value'] ) ) {
1086 1086
 					$o_key = array_search( $temp_val, $field['value'] );
1087
-					if ( isset( $field['value'][ $o_key ] ) ) {
1088
-						unset( $field['value'][ $o_key ], $o_key );
1087
+					if ( isset( $field['value'][$o_key] ) ) {
1088
+						unset( $field['value'][$o_key], $o_key );
1089 1089
 					}
1090 1090
 				} elseif ( $temp_val == $field['value'] ) {
1091 1091
 					// For radio and regular dropdowns
@@ -1272,7 +1272,7 @@  discard block
 block discarded – undo
1272 1272
 		}
1273 1273
 		if ( is_array( $val ) ) {
1274 1274
 			foreach ( $val as $k => $v ) {
1275
-				$val[ $k ] = str_replace( $replace, $replace_with, $v );
1275
+				$val[$k] = str_replace( $replace, $replace_with, $v );
1276 1276
 				unset( $k, $v );
1277 1277
 			}
1278 1278
 		} else {
@@ -1570,19 +1570,19 @@  discard block
 block discarded – undo
1570 1570
 	}
1571 1571
 
1572 1572
 	public static function get_bulk_prefilled_opts( array &$prepop ) {
1573
-		$prepop[ __( 'Countries', 'formidable' ) ] = self::get_countries();
1573
+		$prepop[__( 'Countries', 'formidable' )] = self::get_countries();
1574 1574
 
1575 1575
 		$states    = self::get_us_states();
1576 1576
 		$state_abv = array_keys( $states );
1577 1577
 		sort( $state_abv );
1578
-		$prepop[ __( 'U.S. State Abbreviations', 'formidable' ) ] = $state_abv;
1578
+		$prepop[__( 'U.S. State Abbreviations', 'formidable' )] = $state_abv;
1579 1579
 
1580 1580
 		$states = array_values( $states );
1581 1581
 		sort( $states );
1582
-		$prepop[ __( 'U.S. States', 'formidable' ) ] = $states;
1582
+		$prepop[__( 'U.S. States', 'formidable' )] = $states;
1583 1583
 		unset( $state_abv, $states );
1584 1584
 
1585
-		$prepop[ __( 'Age', 'formidable' ) ] = array(
1585
+		$prepop[__( 'Age', 'formidable' )] = array(
1586 1586
 			__( 'Under 18', 'formidable' ),
1587 1587
 			__( '18-24', 'formidable' ),
1588 1588
 			__( '25-34', 'formidable' ),
@@ -1593,7 +1593,7 @@  discard block
 block discarded – undo
1593 1593
 			__( 'Prefer Not to Answer', 'formidable' ),
1594 1594
 		);
1595 1595
 
1596
-		$prepop[ __( 'Satisfaction', 'formidable' ) ] = array(
1596
+		$prepop[__( 'Satisfaction', 'formidable' )] = array(
1597 1597
 			__( 'Very Satisfied', 'formidable' ),
1598 1598
 			__( 'Satisfied', 'formidable' ),
1599 1599
 			__( 'Neutral', 'formidable' ),
@@ -1602,7 +1602,7 @@  discard block
 block discarded – undo
1602 1602
 			__( 'N/A', 'formidable' ),
1603 1603
 		);
1604 1604
 
1605
-		$prepop[ __( 'Importance', 'formidable' ) ] = array(
1605
+		$prepop[__( 'Importance', 'formidable' )] = array(
1606 1606
 			__( 'Very Important', 'formidable' ),
1607 1607
 			__( 'Important', 'formidable' ),
1608 1608
 			__( 'Neutral', 'formidable' ),
@@ -1611,7 +1611,7 @@  discard block
 block discarded – undo
1611 1611
 			__( 'N/A', 'formidable' ),
1612 1612
 		);
1613 1613
 
1614
-		$prepop[ __( 'Agreement', 'formidable' ) ] = array(
1614
+		$prepop[__( 'Agreement', 'formidable' )] = array(
1615 1615
 			__( 'Strongly Agree', 'formidable' ),
1616 1616
 			__( 'Agree', 'formidable' ),
1617 1617
 			__( 'Neutral', 'formidable' ),
Please login to merge, or discard this patch.
classes/helpers/FrmFormsHelper.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -658,6 +658,9 @@  discard block
 block discarded – undo
658 658
 		$reset_fields = true;
659 659
 	}
660 660
 
661
+	/**
662
+	 * @return string
663
+	 */
661 664
 	public static function replace_shortcodes( $html, $form, $title = false, $description = false, $values = array() ) {
662 665
 		$codes = array(
663 666
 			'form_name'        => $title,
@@ -818,7 +821,7 @@  discard block
 block discarded – undo
818 821
 	}
819 822
 
820 823
 	/**
821
-	 * @param object|string|boolean $form
824
+	 * @param string|boolean $form
822 825
 	 *
823 826
 	 * @return string
824 827
 	 */
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 			'class'        => '',
29 29
 			'inc_children' => 'exclude',
30 30
 		);
31
-		$args     = wp_parse_args( $args, $defaults );
31
+		$args = wp_parse_args( $args, $defaults );
32 32
 
33 33
 		if ( ! $args['field_id'] ) {
34 34
 			$args['field_id'] = $field_name;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 */
71 71
 	public static function add_html_attr( $class, $param, &$add_html ) {
72 72
 		if ( ! empty( $class ) ) {
73
-			$add_html[ $param ] = sanitize_title( $param ) . '="' . esc_attr( trim( sanitize_text_field( $class ) ) ) . '"';
73
+			$add_html[$param] = sanitize_title( $param ) . '="' . esc_attr( trim( sanitize_text_field( $class ) ) ) . '"';
74 74
 		}
75 75
 	}
76 76
 
@@ -236,8 +236,8 @@  discard block
 block discarded – undo
236 236
 			'description' => '',
237 237
 		);
238 238
 		foreach ( $defaults as $var => $default ) {
239
-			if ( ! isset( $values[ $var ] ) ) {
240
-				$values[ $var ] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' );
239
+			if ( ! isset( $values[$var] ) ) {
240
+				$values[$var] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' );
241 241
 			}
242 242
 		}
243 243
 
@@ -252,8 +252,8 @@  discard block
 block discarded – undo
252 252
 			'parent_form_id' => 0,
253 253
 		);
254 254
 		foreach ( $defaults as $var => $default ) {
255
-			if ( ! isset( $values[ $var ] ) ) {
256
-				$values[ $var ] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' );
255
+			if ( ! isset( $values[$var] ) ) {
256
+				$values[$var] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' );
257 257
 			}
258 258
 		}
259 259
 		unset( $defaults );
@@ -290,16 +290,16 @@  discard block
 block discarded – undo
290 290
 		$defaults = self::get_default_opts();
291 291
 		foreach ( $defaults as $var => $default ) {
292 292
 			if ( is_array( $default ) ) {
293
-				if ( ! isset( $values[ $var ] ) ) {
294
-					$values[ $var ] = ( $record && isset( $record->options[ $var ] ) ) ? $record->options[ $var ] : array();
293
+				if ( ! isset( $values[$var] ) ) {
294
+					$values[$var] = ( $record && isset( $record->options[$var] ) ) ? $record->options[$var] : array();
295 295
 				}
296 296
 
297 297
 				foreach ( $default as $k => $v ) {
298
-					$values[ $var ][ $k ] = ( $post_values && isset( $post_values[ $var ][ $k ] ) ) ? $post_values[ $var ][ $k ] : ( ( $record && isset( $record->options[ $var ] ) && isset( $record->options[ $var ][ $k ] ) ) ? $record->options[ $var ][ $k ] : $v );
298
+					$values[$var][$k] = ( $post_values && isset( $post_values[$var][$k] ) ) ? $post_values[$var][$k] : ( ( $record && isset( $record->options[$var] ) && isset( $record->options[$var][$k] ) ) ? $record->options[$var][$k] : $v );
299 299
 
300 300
 					if ( is_array( $v ) ) {
301 301
 						foreach ( $v as $k1 => $v1 ) {
302
-							$values[ $var ][ $k ][ $k1 ] = ( $post_values && isset( $post_values[ $var ][ $k ][ $k1 ] ) ) ? $post_values[ $var ][ $k ][ $k1 ] : ( ( $record && isset( $record->options[ $var ] ) && isset( $record->options[ $var ][ $k ] ) && isset( $record->options[ $var ][ $k ][ $k1 ] ) ) ? $record->options[ $var ][ $k ][ $k1 ] : $v1 );
302
+							$values[$var][$k][$k1] = ( $post_values && isset( $post_values[$var][$k][$k1] ) ) ? $post_values[$var][$k][$k1] : ( ( $record && isset( $record->options[$var] ) && isset( $record->options[$var][$k] ) && isset( $record->options[$var][$k][$k1] ) ) ? $record->options[$var][$k][$k1] : $v1 );
303 303
 							unset( $k1, $v1 );
304 304
 						}
305 305
 					}
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 					unset( $k, $v );
308 308
 				}
309 309
 			} else {
310
-				$values[ $var ] = ( $post_values && isset( $post_values['options'][ $var ] ) ) ? $post_values['options'][ $var ] : ( ( $record && isset( $record->options[ $var ] ) ) ? $record->options[ $var ] : $default );
310
+				$values[$var] = ( $post_values && isset( $post_values['options'][$var] ) ) ? $post_values['options'][$var] : ( ( $record && isset( $record->options[$var] ) ) ? $record->options[$var] : $default );
311 311
 			}
312 312
 
313 313
 			unset( $var, $default );
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 	public static function fill_form_options( &$options, $values ) {
346 346
 		$defaults = self::get_default_opts();
347 347
 		foreach ( $defaults as $var => $default ) {
348
-			$options[ $var ] = isset( $values['options'][ $var ] ) ? $values['options'][ $var ] : $default;
348
+			$options[$var] = isset( $values['options'][$var] ) ? $values['options'][$var] : $default;
349 349
 			unset( $var, $default );
350 350
 		}
351 351
 	}
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 	public static function insert_opt_html( $args ) {
502 502
 		$class  = isset( $args['class'] ) ? $args['class'] : '';
503 503
 		$fields = FrmField::all_field_selection();
504
-		$field  = isset( $fields[ $args['type'] ] ) ? $fields[ $args['type'] ] : array();
504
+		$field  = isset( $fields[$args['type']] ) ? $fields[$args['type']] : array();
505 505
 
506 506
 		self::prepare_field_type( $field );
507 507
 
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
 			FrmField::update( $field->id, array( 'field_order' => $field->field_order + 2 ) );
654 654
 		}
655 655
 
656
-		$add_order    += 2;
656
+		$add_order += 2;
657 657
 		$open         = false;
658 658
 		$reset_fields = true;
659 659
 	}
@@ -1005,10 +1005,10 @@  discard block
 block discarded – undo
1005 1005
 				$link .= ' onclick="return confirm(\'' . esc_attr( $link_details['confirm'] ) . '\')"';
1006 1006
 			}
1007 1007
 
1008
-			$label = ( isset( $link_details[ $length ] ) ? $link_details[ $length ] : $link_details['label'] );
1009
-			if ( $length == 'icon' && isset( $link_details[ $length ] ) ) {
1008
+			$label = ( isset( $link_details[$length] ) ? $link_details[$length] : $link_details['label'] );
1009
+			if ( $length == 'icon' && isset( $link_details[$length] ) ) {
1010 1010
 				$label = '<span class="' . $label . '" title="' . esc_attr( $link_details['label'] ) . '" aria-hidden="true"></span>';
1011
-				$link  .= ' aria-label="' . esc_attr( $link_details['label'] ) . '"';
1011
+				$link .= ' aria-label="' . esc_attr( $link_details['label'] ) . '"';
1012 1012
 			}
1013 1013
 
1014 1014
 			$link .= '>' . $label . '</a>';
@@ -1156,7 +1156,7 @@  discard block
 block discarded – undo
1156 1156
 			$status = 'publish';
1157 1157
 		}
1158 1158
 
1159
-		$name = $nice_names[ $status ];
1159
+		$name = $nice_names[$status];
1160 1160
 
1161 1161
 		return $name;
1162 1162
 	}
@@ -1194,7 +1194,7 @@  discard block
 block discarded – undo
1194 1194
 
1195 1195
 		foreach ( $item['categories'] as $k => $category ) {
1196 1196
 			if ( in_array( $category, $plans ) ) {
1197
-				unset( $item['categories'][ $k ] );
1197
+				unset( $item['categories'][$k] );
1198 1198
 				return $category;
1199 1199
 			}
1200 1200
 		}
Please login to merge, or discard this patch.
classes/helpers/FrmListHelper.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -278,6 +278,9 @@  discard block
 block discarded – undo
278 278
 		FrmAppHelper::show_search_box( compact( 'text', 'input_id' ) );
279 279
 	}
280 280
 
281
+	/**
282
+	 * @param string $param_name
283
+	 */
281 284
 	private function hidden_search_inputs( $param_name ) {
282 285
 		if ( ! empty( $_REQUEST[ $param_name ] ) ) {
283 286
 			$value = sanitize_text_field( wp_unslash( $_REQUEST[ $param_name ] ) );
@@ -418,6 +421,9 @@  discard block
 block discarded – undo
418 421
 		return $action;
419 422
 	}
420 423
 
424
+	/**
425
+	 * @param string $action_name
426
+	 */
421 427
 	private static function get_bulk_action( $action_name ) {
422 428
 		$action       = false;
423 429
 		$action_param = self::get_param(
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -230,8 +230,8 @@  discard block
 block discarded – undo
230 230
 			return $this->get_pagenum();
231 231
 		}
232 232
 
233
-		if ( isset( $this->_pagination_args[ $key ] ) ) {
234
-			return $this->_pagination_args[ $key ];
233
+		if ( isset( $this->_pagination_args[$key] ) ) {
234
+			return $this->_pagination_args[$key];
235 235
 		}
236 236
 	}
237 237
 
@@ -279,8 +279,8 @@  discard block
 block discarded – undo
279 279
 	}
280 280
 
281 281
 	private function hidden_search_inputs( $param_name ) {
282
-		if ( ! empty( $_REQUEST[ $param_name ] ) ) {
283
-			$value = sanitize_text_field( wp_unslash( $_REQUEST[ $param_name ] ) );
282
+		if ( ! empty( $_REQUEST[$param_name] ) ) {
283
+			$value = sanitize_text_field( wp_unslash( $_REQUEST[$param_name] ) );
284 284
 			echo '<input type="hidden" name="' . esc_attr( $param_name ) . '" value="' . esc_attr( $value ) . '" />';
285 285
 		}
286 286
 	}
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 
325 325
 		echo "<ul class='subsubsub'>\n";
326 326
 		foreach ( $views as $class => $view ) {
327
-			$views[ $class ] = "\t" . '<li class="' . esc_attr( $class ) . '">' . $view;
327
+			$views[$class] = "\t" . '<li class="' . esc_attr( $class ) . '">' . $view;
328 328
 		}
329 329
 		echo implode( " |</li>\n", $views ) . "</li>\n"; // WPCS: XSS ok.
330 330
 		echo '</ul>';
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
 			'next'  => __( 'Next page', 'formidable' ),
683 683
 		);
684 684
 
685
-		return $labels[ $link ];
685
+		return $labels[$link];
686 686
 	}
687 687
 
688 688
 	private function current_url() {
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
 
776 776
 		// If the primary column doesn't exist fall back to the
777 777
 		// first non-checkbox column.
778
-		if ( ! isset( $columns[ $default ] ) ) {
778
+		if ( ! isset( $columns[$default] ) ) {
779 779
 			$default = self::get_default_primary_column_name();
780 780
 		}
781 781
 
@@ -789,7 +789,7 @@  discard block
 block discarded – undo
789 789
 		 */
790 790
 		$column = apply_filters( 'list_table_primary_column', $default, $this->screen->id );
791 791
 
792
-		if ( empty( $column ) || ! isset( $columns[ $column ] ) ) {
792
+		if ( empty( $column ) || ! isset( $columns[$column] ) ) {
793 793
 			$column = $default;
794 794
 		}
795 795
 
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
 			// In 4.3, we added a fourth argument for primary column.
812 812
 			$column_headers = array( array(), array(), array(), $this->get_primary_column_name() );
813 813
 			foreach ( $this->_column_headers as $key => $value ) {
814
-				$column_headers[ $key ] = $value;
814
+				$column_headers[$key] = $value;
815 815
 			}
816 816
 
817 817
 			return $column_headers;
@@ -844,7 +844,7 @@  discard block
 block discarded – undo
844 844
 				$data[1] = false;
845 845
 			}
846 846
 
847
-			$sortable[ $id ] = $data;
847
+			$sortable[$id] = $data;
848 848
 		}
849 849
 
850 850
 		$primary = $this->get_primary_column_name();
@@ -921,8 +921,8 @@  discard block
 block discarded – undo
921 921
 				$class[] = 'column-primary';
922 922
 			}
923 923
 
924
-			if ( isset( $sortable[ $column_key ] ) ) {
925
-				list( $orderby, $desc_first ) = $sortable[ $column_key ];
924
+			if ( isset( $sortable[$column_key] ) ) {
925
+				list( $orderby, $desc_first ) = $sortable[$column_key];
926 926
 
927 927
 				if ( $current_orderby == $orderby ) {
928 928
 					$order   = 'asc' == $current_order ? 'desc' : 'asc';
Please login to merge, or discard this patch.
classes/helpers/FrmStylesHelper.php 2 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
 	/**
184 184
 	 * @since 2.0
185
-	 * @return The class for this icon
185
+	 * @return string class for this icon
186 186
 	 */
187 187
 	public static function icon_key_to_class( $key, $icon = '+', $type = 'arrow' ) {
188 188
 		if ( 'arrow' == $type && is_numeric( $key ) ) {
@@ -379,6 +379,7 @@  discard block
 block discarded – undo
379 379
 
380 380
 	/**
381 381
 	 * @since 2.3
382
+	 * @param string $default
382 383
 	 */
383 384
 	private static function get_color_output( $default, &$color ) {
384 385
 		$color = trim( $color );
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 				'-' => 'down',
192 192
 				'+' => 'up',
193 193
 			);
194
-			$class = 'frm_arrow' . $arrow[ $icon ];
194
+			$class = 'frm_arrow' . $arrow[$icon];
195 195
 		} else {
196 196
 			//frm_minus1_icon
197 197
 			$key   = str_replace( 'p', '', $key );
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 				'-' => 'minus',
200 200
 				'+' => 'plus',
201 201
 			);
202
-			$class = 'frm_' . $plus[ $icon ];
202
+			$class = 'frm_' . $plus[$icon];
203 203
 		}
204 204
 
205 205
 		if ( $key ) {
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 		<select name="<?php echo esc_attr( $frm_style->get_field_name( $name ) ); ?>"
221 221
 			id="frm_<?php echo esc_attr( $name ); ?>" class="frm_icon_font frm_multiselect hide-if-js">
222 222
 			<?php foreach ( $icons as $key => $icon ) { ?>
223
-				<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $style->post_content[ $name ], $key ); ?>>
223
+				<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $style->post_content[$name], $key ); ?>>
224 224
 					<?php echo '&#xe' . esc_html( $icon['+'] ) . '; &#xe' . esc_html( $icon['-'] ) . ';'; ?>
225 225
 				</option>
226 226
 			<?php } ?>
@@ -228,8 +228,8 @@  discard block
 block discarded – undo
228 228
 
229 229
 		<div class="btn-group hide-if-no-js" id="frm_<?php echo esc_attr( $name ); ?>_select">
230 230
 			<button class="multiselect dropdown-toggle btn btn-default" data-toggle="dropdown" type="button">
231
-				<i class="frm_icon_font <?php echo esc_attr( self::icon_key_to_class( $style->post_content[ $name ], '+', $type ) ); ?>"></i>
232
-				<i class="frm_icon_font <?php echo esc_attr( self::icon_key_to_class( $style->post_content[ $name ], '-', $type ) ); ?>"></i>
231
+				<i class="frm_icon_font <?php echo esc_attr( self::icon_key_to_class( $style->post_content[$name], '+', $type ) ); ?>"></i>
232
+				<i class="frm_icon_font <?php echo esc_attr( self::icon_key_to_class( $style->post_content[$name], '-', $type ) ); ?>"></i>
233 233
 				<b class="caret"></b>
234 234
 			</button>
235 235
 			<ul class="multiselect-container frm-dropdown-menu">
@@ -322,14 +322,14 @@  discard block
 block discarded – undo
322 322
 			$settings['style_class'] = 'frm_style_' . $style->post_name . '.';
323 323
 		}
324 324
 
325
-		$settings['style_class']   .= 'with_frm_style';
325
+		$settings['style_class'] .= 'with_frm_style';
326 326
 		$settings['font']          = stripslashes( $settings['font'] );
327 327
 		$settings['change_margin'] = self::description_margin_for_screensize( $settings['width'] );
328 328
 
329 329
 		$checkbox_opts = array( 'important_style', 'auto_width', 'submit_style', 'collapse_icon', 'center_form' );
330 330
 		foreach ( $checkbox_opts as $opt ) {
331
-			if ( ! isset( $settings[ $opt ] ) ) {
332
-				$settings[ $opt ] = 0;
331
+			if ( ! isset( $settings[$opt] ) ) {
332
+				$settings[$opt] = 0;
333 333
 			}
334 334
 		}
335 335
 
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 				$css = '';
349 349
 			}
350 350
 			foreach ( $opts as $opt ) {
351
-				self::get_color_output( $css, $settings[ $opt ] );
351
+				self::get_color_output( $css, $settings[$opt] );
352 352
 			}
353 353
 		}
354 354
 	}
Please login to merge, or discard this patch.