Completed
Push — master ( 67005e...6d6fde )
by
unknown
18s
created
classes/views/frm-fields/front-end/checkbox-field.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,6 +87,6 @@
 block discarded – undo
87 87
 
88 88
 		?></div>
89 89
 <?php
90
-		++$option_index;
90
+		++ $option_index;
91 91
 	}//end foreach
92 92
 }//end if
Please login to merge, or discard this patch.
classes/controllers/FrmFormsController.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1616,7 +1616,8 @@  discard block
 block discarded – undo
1616 1616
 		$vars   = array();
1617 1617
 		FrmAppHelper::include_svg();
1618 1618
 
1619
-		if ( isset( $_POST['frm_compact_fields'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1619
+		if ( isset( $_POST['frm_compact_fields'] ) ) {
1620
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
1620 1621
 			FrmAppHelper::permission_check( 'frm_edit_forms' );
1621 1622
 
1622 1623
 			// Javascript needs to be allowed in some field settings.
@@ -2046,7 +2047,8 @@  discard block
 block discarded – undo
2046 2047
 	private static function get_saved_errors( $form, $params ) {
2047 2048
 		global $frm_vars;
2048 2049
 
2049
-		if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
2050
+		if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) {
2051
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
2050 2052
 			$errors = $frm_vars['created_entries'][ $form->id ]['errors'];
2051 2053
 		} else {
2052 2054
 			$errors = array();
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
 			 *
789 789
 			 * @return string
790 790
 			 */
791
-			function ( $src ) {
791
+			function( $src ) {
792 792
 				if ( is_null( $src ) ) {
793 793
 					$src = '';
794 794
 				}
@@ -854,11 +854,11 @@  discard block
 block discarded – undo
854 854
 			),
855 855
 		);
856 856
 
857
-		if ( ! isset( $available_status[ $status ] ) ) {
857
+		if ( ! isset( $available_status[$status] ) ) {
858 858
 			return;
859 859
 		}
860 860
 
861
-		FrmAppHelper::permission_check( $available_status[ $status ]['permission'] );
861
+		FrmAppHelper::permission_check( $available_status[$status]['permission'] );
862 862
 
863 863
 		$params = FrmForm::list_page_params();
864 864
 
@@ -867,8 +867,8 @@  discard block
 block discarded – undo
867 867
 
868 868
 		$count = 0;
869 869
 
870
-		if ( FrmForm::set_status( $params['id'], $available_status[ $status ]['new_status'] ) ) {
871
-			++$count;
870
+		if ( FrmForm::set_status( $params['id'], $available_status[$status]['new_status'] ) ) {
871
+			++ $count;
872 872
 		}
873 873
 
874 874
 		$form_type = FrmAppHelper::get_simple_request(
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
 		/* translators: %1$s: Number of forms, %2$s: Start link HTML, %3$s: End link HTML */
885 885
 		$available_status['trash']['message'] = sprintf( _n( '%1$s form moved to the Trash. %2$sUndo%3$s', '%1$s forms moved to the Trash. %2$sUndo%3$s', $count, 'formidable' ), $count, '<a href="' . esc_url( wp_nonce_url( '?page=formidable&frm_action=untrash&form_type=' . $form_type . '&id=' . $params['id'], 'untrash_form_' . $params['id'] ) ) . '">', '</a>' );
886 886
 
887
-		$message = $available_status[ $status ]['message'];
887
+		$message = $available_status[$status]['message'];
888 888
 
889 889
 		self::display_forms_list( $params, $message );
890 890
 	}
@@ -901,7 +901,7 @@  discard block
 block discarded – undo
901 901
 
902 902
 		foreach ( $ids as $id ) {
903 903
 			if ( FrmForm::trash( $id ) ) {
904
-				++$count;
904
+				++ $count;
905 905
 			}
906 906
 		}
907 907
 
@@ -915,7 +915,7 @@  discard block
 block discarded – undo
915 915
 				'type'  => 'request',
916 916
 			)
917 917
 		);
918
-		$message      = sprintf(
918
+		$message = sprintf(
919 919
 			/* translators: %1$s: Number of forms, %2$s: Start link HTML, %3$s: End link HTML */
920 920
 			_n( '%1$s form moved to the Trash. %2$sUndo%3$s', '%1$s forms moved to the Trash. %2$sUndo%3$s', $count, 'formidable' ),
921 921
 			$count,
@@ -937,7 +937,7 @@  discard block
 block discarded – undo
937 937
 		$count = 0;
938 938
 
939 939
 		if ( FrmForm::destroy( $params['id'] ) ) {
940
-			++$count;
940
+			++ $count;
941 941
 		}
942 942
 
943 943
 		/* translators: %1$s: Number of forms */
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
 			$d = FrmForm::destroy( $id );
961 961
 
962 962
 			if ( $d ) {
963
-				++$count;
963
+				++ $count;
964 964
 			}
965 965
 		}
966 966
 
@@ -1488,7 +1488,7 @@  discard block
 block discarded – undo
1488 1488
 
1489 1489
 		add_action(
1490 1490
 			'wp_enqueue_editor',
1491
-			function () {
1491
+			function() {
1492 1492
 				wp_print_media_templates();
1493 1493
 			}
1494 1494
 		);
@@ -1628,7 +1628,7 @@  discard block
 block discarded – undo
1628 1628
 				$section['id'] = $section['anchor'];
1629 1629
 			}
1630 1630
 
1631
-			$sections[ $key ] = $section;
1631
+			$sections[$key] = $section;
1632 1632
 		}//end foreach
1633 1633
 
1634 1634
 		return $sections;
@@ -1763,7 +1763,7 @@  discard block
 block discarded – undo
1763 1763
 			$user_helpers = array();
1764 1764
 
1765 1765
 			foreach ( $user_fields as $uk => $uf ) {
1766
-				$user_helpers[ '|user_id| show="' . $uk . '"' ] = $uf;
1766
+				$user_helpers['|user_id| show="' . $uk . '"'] = $uf;
1767 1767
 				unset( $uk, $uf );
1768 1768
 			}
1769 1769
 
@@ -1911,7 +1911,7 @@  discard block
 block discarded – undo
1911 1911
 		if ( ! isset( $frm_vars['js_validate_forms'] ) ) {
1912 1912
 			$frm_vars['js_validate_forms'] = array();
1913 1913
 		}
1914
-		$frm_vars['js_validate_forms'][ $form->id ] = $form;
1914
+		$frm_vars['js_validate_forms'][$form->id] = $form;
1915 1915
 	}
1916 1916
 
1917 1917
 	public static function get_email_html() {
@@ -2114,7 +2114,7 @@  discard block
 block discarded – undo
2114 2114
 				add_filter( 'frm_validate_form', 'FrmFormsController::json_error' );
2115 2115
 			} else {
2116 2116
 				$vars   = FrmAppHelper::json_to_array( $json_vars );
2117
-				$action = $vars[ $action ];
2117
+				$action = $vars[$action];
2118 2118
 				unset( $_REQUEST['frm_compact_fields'], $_POST['frm_compact_fields'] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
2119 2119
 				$_REQUEST = array_merge( $_REQUEST, $vars ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
2120 2120
 				$_POST    = array_merge( $_POST, $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
@@ -2314,7 +2314,7 @@  discard block
 block discarded – undo
2314 2314
 
2315 2315
 		foreach ( $frm_vars['forms_loaded'] as $form ) {
2316 2316
 			if ( is_object( $form ) ) {
2317
-				$actions[ $form->id ] = $form->name;
2317
+				$actions[$form->id] = $form->name;
2318 2318
 			}
2319 2319
 			unset( $form );
2320 2320
 		}
@@ -2601,8 +2601,8 @@  discard block
 block discarded – undo
2601 2601
 	private static function get_saved_errors( $form, $params ) {
2602 2602
 		global $frm_vars;
2603 2603
 
2604
-		if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
2605
-			$errors = $frm_vars['created_entries'][ $form->id ]['errors'];
2604
+		if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][$form->id] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
2605
+			$errors = $frm_vars['created_entries'][$form->id]['errors'];
2606 2606
 		} else {
2607 2607
 			$errors = array();
2608 2608
 		}
@@ -2628,7 +2628,7 @@  discard block
 block discarded – undo
2628 2628
 	public static function just_created_entry( $form_id ) {
2629 2629
 		global $frm_vars;
2630 2630
 
2631
-		return isset( $frm_vars['created_entries'] ) && isset( $frm_vars['created_entries'][ $form_id ] ) && isset( $frm_vars['created_entries'][ $form_id ]['entry_id'] ) ? $frm_vars['created_entries'][ $form_id ]['entry_id'] : 0;
2631
+		return isset( $frm_vars['created_entries'] ) && isset( $frm_vars['created_entries'][$form_id] ) && isset( $frm_vars['created_entries'][$form_id]['entry_id'] ) ? $frm_vars['created_entries'][$form_id]['entry_id'] : 0;
2632 2632
 	}
2633 2633
 
2634 2634
 	/**
@@ -2649,7 +2649,7 @@  discard block
 block discarded – undo
2649 2649
 	private static function get_confirmation_method( $atts ) {
2650 2650
 		$action = FrmOnSubmitHelper::current_event( $atts );
2651 2651
 		$opt    = 'update' === $action ? 'edit_action' : 'success_action';
2652
-		$method = ! empty( $atts['form']->options[ $opt ] ) ? $atts['form']->options[ $opt ] : 'message';
2652
+		$method = ! empty( $atts['form']->options[$opt] ) ? $atts['form']->options[$opt] : 'message';
2653 2653
 
2654 2654
 		if ( ! empty( $atts['entry_id'] ) ) {
2655 2655
 			$met_actions = self::get_met_on_submit_actions( $atts, $action );
@@ -2678,7 +2678,7 @@  discard block
 block discarded – undo
2678 2678
 	public static function maybe_trigger_redirect( $form, $params, $args ) {
2679 2679
 		if ( ! isset( $params['id'] ) ) {
2680 2680
 			global $frm_vars;
2681
-			$params['id'] = $frm_vars['created_entries'][ $form->id ]['entry_id'];
2681
+			$params['id'] = $frm_vars['created_entries'][$form->id]['entry_id'];
2682 2682
 		}
2683 2683
 
2684 2684
 		$conf_method = self::get_confirmation_method(
@@ -2767,7 +2767,7 @@  discard block
 block discarded – undo
2767 2767
 		$args['success_opt'] = $opt;
2768 2768
 		$args['ajax']        = ! empty( $frm_vars['ajax'] );
2769 2769
 
2770
-		if ( $args['conf_method'] === 'page' && is_numeric( $args['form']->options[ $opt . '_page_id' ] ) ) {
2770
+		if ( $args['conf_method'] === 'page' && is_numeric( $args['form']->options[$opt . '_page_id'] ) ) {
2771 2771
 			self::load_page_after_submit( $args );
2772 2772
 		} elseif ( $args['conf_method'] === 'redirect' ) {
2773 2773
 			self::redirect_after_submit( $args );
@@ -2792,7 +2792,7 @@  discard block
 block discarded – undo
2792 2792
 		}
2793 2793
 
2794 2794
 		// If a redirect action has already opened the URL in a new tab, we show the default message in the current tab.
2795
-		if ( ! empty( self::$redirected_in_new_tab[ $args['form']->id ] ) ) {
2795
+		if ( ! empty( self::$redirected_in_new_tab[$args['form']->id] ) ) {
2796 2796
 			return array( FrmOnSubmitHelper::get_fallback_action_after_open_in_new_tab( $event ) );
2797 2797
 		}
2798 2798
 
@@ -2985,7 +2985,7 @@  discard block
 block discarded – undo
2985 2985
 
2986 2986
 		$opt = 'update' === $args['action'] ? 'edit_' : 'success_';
2987 2987
 
2988
-		$new_args['conf_method'] = $new_args['form']->options[ $opt . 'action' ];
2988
+		$new_args['conf_method'] = $new_args['form']->options[$opt . 'action'];
2989 2989
 
2990 2990
 		/**
2991 2991
 		 * Filters the run success action args.
@@ -3010,8 +3010,8 @@  discard block
 block discarded – undo
3010 3010
 		global $post;
3011 3011
 		$opt = $args['success_opt'];
3012 3012
 
3013
-		if ( ! $post || $args['form']->options[ $opt . '_page_id' ] != $post->ID ) {
3014
-			$page     = get_post( $args['form']->options[ $opt . '_page_id' ] );
3013
+		if ( ! $post || $args['form']->options[$opt . '_page_id'] != $post->ID ) {
3014
+			$page     = get_post( $args['form']->options[$opt . '_page_id'] );
3015 3015
 			$old_post = $post;
3016 3016
 			$post     = $page;
3017 3017
 			$content  = apply_filters( 'frm_content', $page->post_content, $args['form'], $args['entry_id'] );
@@ -3042,7 +3042,7 @@  discard block
 block discarded – undo
3042 3042
 		add_filter( 'frm_use_wpautop', '__return_false' );
3043 3043
 
3044 3044
 		$opt         = $args['success_opt'];
3045
-		$success_url = trim( $args['form']->options[ $opt . '_url' ] );
3045
+		$success_url = trim( $args['form']->options[$opt . '_url'] );
3046 3046
 		$success_url = apply_filters( 'frm_content', $success_url, $args['form'], $args['entry_id'] );
3047 3047
 		$success_url = do_shortcode( $success_url );
3048 3048
 
@@ -3064,7 +3064,7 @@  discard block
 block discarded – undo
3064 3064
 			// Not AJAX submit, no headers sent, and there is just one Redirect action runs.
3065 3065
 			if ( ! empty( $args['form']->options['open_in_new_tab'] ) ) {
3066 3066
 				self::print_open_in_new_tab_js_with_fallback_handler( $success_url, $args );
3067
-				self::$redirected_in_new_tab[ $args['form']->id ] = 1;
3067
+				self::$redirected_in_new_tab[$args['form']->id] = 1;
3068 3068
 				return;
3069 3069
 			}
3070 3070
 
@@ -3374,7 +3374,7 @@  discard block
 block discarded – undo
3374 3374
 			'description' => false,
3375 3375
 			'reset'       => false,
3376 3376
 		);
3377
-		$args     = wp_parse_args( $args, $defaults );
3377
+		$args = wp_parse_args( $args, $defaults );
3378 3378
 	}
3379 3379
 
3380 3380
 	/**
@@ -3417,7 +3417,7 @@  discard block
 block discarded – undo
3417 3417
 		$opt          = $args['success_opt'] ?? 'success';
3418 3418
 
3419 3419
 		if ( $entry_id && is_numeric( $entry_id ) ) {
3420
-			$message = $form->options[ $opt . '_msg' ] ?? $frm_settings->success_msg;
3420
+			$message = $form->options[$opt . '_msg'] ?? $frm_settings->success_msg;
3421 3421
 			$class   = 'frm_message';
3422 3422
 		} else {
3423 3423
 			$message = $frm_settings->failed_msg;
@@ -3675,8 +3675,8 @@  discard block
 block discarded – undo
3675 3675
 
3676 3676
 		check_ajax_referer( 'frm_ajax', 'nonce' );
3677 3677
 
3678
-		$html             = FrmAppHelper::clip(
3679
-			function () {
3678
+		$html = FrmAppHelper::clip(
3679
+			function() {
3680 3680
 				FrmAppHelper::maybe_autocomplete_pages_options(
3681 3681
 					array(
3682 3682
 						'field_name'  => 'frm_page_dropdown',
Please login to merge, or discard this patch.
classes/models/FrmEntryValidate.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,7 +145,8 @@
 block discarded – undo
145 145
 
146 146
 		if ( $posted_field->required == '1' && FrmAppHelper::is_empty_value( $value ) ) {
147 147
 			$errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $posted_field, 'blank' );
148
-		} elseif ( ! isset( $_POST['item_name'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
148
+		} elseif ( ! isset( $_POST['item_name'] ) ) {
149
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
149 150
 			self::maybe_add_item_name( $value, $posted_field );
150 151
 		}
151 152
 
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 			return $errors;
29 29
 		}
30 30
 
31
-		if ( FrmAppHelper::is_admin() && is_user_logged_in() && ( ! isset( $values[ 'frm_submit_entry_' . $values['form_id'] ] ) || ! wp_verify_nonce( $values[ 'frm_submit_entry_' . $values['form_id'] ], 'frm_submit_entry_nonce' ) ) ) {
31
+		if ( FrmAppHelper::is_admin() && is_user_logged_in() && ( ! isset( $values['frm_submit_entry_' . $values['form_id']] ) || ! wp_verify_nonce( $values['frm_submit_entry_' . $values['form_id']], 'frm_submit_entry_nonce' ) ) ) {
32 32
 			$frm_settings   = FrmAppHelper::get_settings();
33 33
 			$errors['form'] = $frm_settings->admin_permission;
34 34
 		}
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 		$args = wp_parse_args( $args, $defaults );
151 151
 
152 152
 		if ( empty( $args['parent_field_id'] ) ) {
153
-			$value = $values['item_meta'][ $args['id'] ] ?? '';
153
+			$value = $values['item_meta'][$args['id']] ?? '';
154 154
 		} else {
155 155
 			// value is from a nested form
156 156
 			$value = $values;
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 		}
173 173
 
174 174
 		if ( $posted_field->required == '1' && FrmAppHelper::is_empty_value( $value ) ) {
175
-			$errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $posted_field, 'blank' );
175
+			$errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $posted_field, 'blank' );
176 176
 		} elseif ( ! isset( $_POST['item_name'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
177 177
 			self::maybe_add_item_name( $value, $posted_field );
178 178
 		}
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 		$option_is_valid = (bool) apply_filters( 'frm_option_is_valid', $option_is_valid, $value, $posted_field );
226 226
 
227 227
 		if ( ! $option_is_valid ) {
228
-			$errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $posted_field, 'invalid' );
228
+			$errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $posted_field, 'invalid' );
229 229
 		}
230 230
 	}
231 231
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 		FrmFieldsHelper::prepare_new_front_field( $values, $field_object );
363 363
 
364 364
 		$separate_value = FrmField::get_option( $field_object, 'separate_value' );
365
-		$map_callback   = function ( $option ) use ( $separate_value ) {
365
+		$map_callback   = function( $option ) use ( $separate_value ) {
366 366
 			if ( is_array( $option ) ) {
367 367
 				$option_value = $separate_value ? $option['value'] : $option['label'];
368 368
 			} else {
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 			$pattern = self::phone_format( $field );
461 461
 
462 462
 			if ( ! preg_match( $pattern, $value ) ) {
463
-				$errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $field, 'invalid' );
463
+				$errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $field, 'invalid' );
464 464
 			}
465 465
 		}
466 466
 	}
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
 	 */
597 597
 	private static function form_is_in_progress( $values ) {
598 598
 		return FrmAppHelper::pro_is_installed() &&
599
-			( isset( $values[ 'frm_page_order_' . $values['form_id'] ] ) || FrmAppHelper::get_post_param( 'frm_next_page' ) ) &&
599
+			( isset( $values['frm_page_order_' . $values['form_id']] ) || FrmAppHelper::get_post_param( 'frm_next_page' ) ) &&
600 600
 			FrmField::get_all_types_in_form( $values['form_id'], 'break' );
601 601
 	}
602 602
 
@@ -833,9 +833,9 @@  discard block
 block discarded – undo
833 833
 				$found = self::is_akismet_guest_info_value( $key, $value, $field_id, $datas['name_field_ids'], $values );
834 834
 
835 835
 				if ( $found ) {
836
-					$datas[ $key ]             = $value;
836
+					$datas[$key]             = $value;
837 837
 					$datas['frm_duplicated'][] = $field_id;
838
-					unset( $datas['missing_keys'][ $key_index ] );
838
+					unset( $datas['missing_keys'][$key_index] );
839 839
 				}
840 840
 			}
841 841
 		}//end foreach
@@ -880,12 +880,12 @@  discard block
 block discarded – undo
880 880
 						continue;
881 881
 					}
882 882
 
883
-					if ( isset( $fields[ $index + 1 ] ) && 'Last' === $fields[ $index + 1 ]->name ) {
884
-						if ( empty( $values[ absint( $fields[ $index + 1 ]->id ) ] ) ) {
883
+					if ( isset( $fields[$index + 1] ) && 'Last' === $fields[$index + 1]->name ) {
884
+						if ( empty( $values[absint( $fields[$index + 1]->id )] ) ) {
885 885
 							continue;
886 886
 						}
887 887
 
888
-						$value .= ' ' . $values[ $fields[ $index + 1 ]->id ];
888
+						$value .= ' ' . $values[$fields[$index + 1]->id];
889 889
 						return true;
890 890
 					}
891 891
 				}
@@ -906,14 +906,14 @@  discard block
 block discarded – undo
906 906
 	private static function get_name_text_fields( $form_id ) {
907 907
 		$name_text_fields_is_initialized = is_array( self::$name_text_fields );
908 908
 
909
-		if ( $name_text_fields_is_initialized && isset( self::$name_text_fields[ $form_id ] ) ) {
910
-			return self::$name_text_fields[ $form_id ];
909
+		if ( $name_text_fields_is_initialized && isset( self::$name_text_fields[$form_id] ) ) {
910
+			return self::$name_text_fields[$form_id];
911 911
 		}
912 912
 
913 913
 		if ( ! $name_text_fields_is_initialized ) {
914 914
 			self::$name_text_fields = array();
915 915
 		}
916
-		self::$name_text_fields[ $form_id ] = FrmDb::get_results(
916
+		self::$name_text_fields[$form_id] = FrmDb::get_results(
917 917
 			'frm_fields',
918 918
 			array(
919 919
 				'form_id' => $form_id,
@@ -924,7 +924,7 @@  discard block
 block discarded – undo
924 924
 			array( 'order_by' => 'field_order ASC' )
925 925
 		);
926 926
 
927
-		return self::$name_text_fields[ $form_id ];
927
+		return self::$name_text_fields[$form_id];
928 928
 	}
929 929
 
930 930
 	/**
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
 
939 939
 			// Send any potentially useful $_SERVER vars, but avoid sending junk we don't need.
940 940
 			if ( $include_value ) {
941
-				$datas[ $key ] = $value;
941
+				$datas[$key] = $value;
942 942
 			}
943 943
 			unset( $key, $value );
944 944
 		}
@@ -957,10 +957,10 @@  discard block
 block discarded – undo
957 957
 	private static function add_comment_content_to_akismet( &$datas, $values ) {
958 958
 		if ( isset( $datas['frm_duplicated'] ) ) {
959 959
 			foreach ( $datas['frm_duplicated'] as $index ) {
960
-				if ( isset( $values['item_meta'][ $index ] ) ) {
961
-					unset( $values['item_meta'][ $index ] );
960
+				if ( isset( $values['item_meta'][$index] ) ) {
961
+					unset( $values['item_meta'][$index] );
962 962
 				} else {
963
-					unset( $values[ $index ] );
963
+					unset( $values[$index] );
964 964
 				}
965 965
 			}
966 966
 			unset( $datas['frm_duplicated'] );
@@ -982,15 +982,15 @@  discard block
 block discarded – undo
982 982
 		$skipped_fields = self::get_akismet_skipped_field_ids( $values );
983 983
 
984 984
 		foreach ( $skipped_fields as $skipped_field ) {
985
-			if ( ! isset( $values['item_meta'][ $skipped_field->id ] ) ) {
985
+			if ( ! isset( $values['item_meta'][$skipped_field->id] ) ) {
986 986
 				continue;
987 987
 			}
988 988
 
989 989
 			if ( self::should_really_skip_field( $skipped_field, $values ) ) {
990
-				unset( $values['item_meta'][ $skipped_field->id ] );
990
+				unset( $values['item_meta'][$skipped_field->id] );
991 991
 
992
-				if ( isset( $values['item_meta']['other'][ $skipped_field->id ] ) ) {
993
-					unset( $values['item_meta']['other'][ $skipped_field->id ] );
992
+				if ( isset( $values['item_meta']['other'][$skipped_field->id] ) ) {
993
+					unset( $values['item_meta']['other'][$skipped_field->id] );
994 994
 				}
995 995
 			}
996 996
 		}
@@ -1028,7 +1028,7 @@  discard block
 block discarded – undo
1028 1028
 		}
1029 1029
 
1030 1030
 		// If a choice field has Other option, but Other is not selected.
1031
-		if ( empty( $values['item_meta']['other'][ $field_data->id ] ) ) {
1031
+		if ( empty( $values['item_meta']['other'][$field_data->id] ) ) {
1032 1032
 			return true;
1033 1033
 		}
1034 1034
 
@@ -1036,7 +1036,7 @@  discard block
 block discarded – undo
1036 1036
 		foreach ( $field_data->options as $option ) {
1037 1037
 			$option_value = ! is_array( $option ) ? $option : ( $option['value'] ?? '' );
1038 1038
 
1039
-			if ( $values['item_meta']['other'][ $field_data->id ] === $option_value ) {
1039
+			if ( $values['item_meta']['other'][$field_data->id] === $option_value ) {
1040 1040
 				return true;
1041 1041
 			}
1042 1042
 		}
@@ -1113,7 +1113,7 @@  discard block
 block discarded – undo
1113 1113
 
1114 1114
 			// Convert name array to string.
1115 1115
 			if ( isset( $value['first'] ) && isset( $value['last'] ) ) {
1116
-				$values['item_meta'][ $field_id ] = trim( implode( ' ', $value ) );
1116
+				$values['item_meta'][$field_id] = trim( implode( ' ', $value ) );
1117 1117
 				$values['name_field_ids'][]       = $field_id;
1118 1118
 				continue;
1119 1119
 			}
@@ -1134,8 +1134,8 @@  discard block
 block discarded – undo
1134 1134
 						continue;
1135 1135
 					}
1136 1136
 
1137
-					if ( ! isset( $values['item_meta'][ $subsubindex ] ) ) {
1138
-						$values['item_meta'][ $subsubindex ] = array();
1137
+					if ( ! isset( $values['item_meta'][$subsubindex] ) ) {
1138
+						$values['item_meta'][$subsubindex] = array();
1139 1139
 					}
1140 1140
 
1141 1141
 					// Convert name array to string.
@@ -1145,13 +1145,13 @@  discard block
 block discarded – undo
1145 1145
 						$values['name_field_ids'][] = $subsubindex;
1146 1146
 					}
1147 1147
 
1148
-					if ( is_array( $values['item_meta'][ $subsubindex ] ) ) {
1149
-						$values['item_meta'][ $subsubindex ][] = $subsubvalue;
1148
+					if ( is_array( $values['item_meta'][$subsubindex] ) ) {
1149
+						$values['item_meta'][$subsubindex][] = $subsubvalue;
1150 1150
 					}
1151 1151
 				}
1152 1152
 			}//end foreach
1153 1153
 
1154
-			unset( $values['item_meta'][ $field_id ] );
1154
+			unset( $values['item_meta'][$field_id] );
1155 1155
 		}//end foreach
1156 1156
 
1157 1157
 		return $form_ids;
Please login to merge, or discard this patch.
classes/factories/FrmCaptchaFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@
 block discarded – undo
33 33
 			'turnstile' => 'FrmTurnstileSettings',
34 34
 		);
35 35
 
36
-		if ( ! isset( $settings_classes[ $active_captcha ] ) ) {
36
+		if ( ! isset( $settings_classes[$active_captcha] ) ) {
37 37
 			$active_captcha = 'recaptcha';
38 38
 		}
39 39
 
40
-		return $settings_classes[ $active_captcha ];
40
+		return $settings_classes[$active_captcha];
41 41
 	}
42 42
 }
Please login to merge, or discard this patch.
classes/controllers/FrmOnboardingWizardController.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,8 @@
 block discarded – undo
138 138
 		}
139 139
 
140 140
 		// Only do this for single site installs.
141
-		if ( is_network_admin() ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
141
+		if ( is_network_admin() ) {
142
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
142 143
 			self::mark_onboarding_as_skipped();
143 144
 			return;
144 145
 		}
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -368,8 +368,8 @@  discard block
 block discarded – undo
368 368
 		);
369 369
 
370 370
 		foreach ( $fields_to_update as $field => $sanitize_callback ) {
371
-			if ( isset( $_POST[ $field ] ) ) {
372
-				$usage_data[ $field ] = FrmAppHelper::get_post_param( $field, '', $sanitize_callback );
371
+			if ( isset( $_POST[$field] ) ) {
372
+				$usage_data[$field] = FrmAppHelper::get_post_param( $field, '', $sanitize_callback );
373 373
 			}
374 374
 		}
375 375
 
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
 				'is-disabled' => true,
589 589
 				'help-text'   => esc_html__( 'Customize form appearance with an intuitive styling interface.', 'formidable' ),
590 590
 			);
591
-			self::$available_addons['save-entries']  = array(
591
+			self::$available_addons['save-entries'] = array(
592 592
 				'title'       => esc_html__( 'Save Entries', 'formidable' ),
593 593
 				'is-checked'  => true,
594 594
 				'is-disabled' => true,
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
 				if ( ! is_plugin_active( $plugin_file ) && isset( $addon['url'] ) ) {
658 658
 					$is_installed = array_key_exists( $plugin_file, $plugins );
659 659
 
660
-					self::$available_addons[ $key ] = array(
660
+					self::$available_addons[$key] = array(
661 661
 						'title'        => $data['title'],
662 662
 						'rel'          => $is_installed ? $plugin_file : $addon['url'],
663 663
 						'is-checked'   => false,
Please login to merge, or discard this patch.
classes/controllers/FrmEntriesAJAXSubmitController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 			foreach ( $errors as $field => $error ) {
89 89
 				$field_id         = str_replace( 'field', '', $field );
90 90
 				$error            = self::maybe_modify_ajax_error( $error, $field_id, $form, $errors );
91
-				$obj[ $field_id ] = $error;
91
+				$obj[$field_id] = $error;
92 92
 			}
93 93
 
94 94
 			$response['errors']        = $obj;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	private static function fix_woocommerce_conflict() {
120 120
 		add_action(
121 121
 			'wp_print_footer_scripts',
122
-			function () {
122
+			function() {
123 123
 				if ( ! function_exists( 'get_current_screen' ) ) {
124 124
 					require_once ABSPATH . 'wp-admin/includes/screen.php';
125 125
 				}
Please login to merge, or discard this patch.
classes/controllers/FrmElementorController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 		if ( is_admin() ) {
19 19
 			add_action(
20 20
 				'elementor/editor/after_enqueue_styles',
21
-				function () {
21
+				function() {
22 22
 					wp_enqueue_style( 'font_icons', FrmAppHelper::plugin_url() . '/css/font_icons.css', array(), FrmAppHelper::plugin_version() );
23 23
 				}
24 24
 			);
Please login to merge, or discard this patch.
classes/controllers/FrmApplicationsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@
 block discarded – undo
154 154
 	private static function sort_templates( $applications ) {
155 155
 		usort(
156 156
 			$applications,
157
-			function ( $a, $b ) {
157
+			function( $a, $b ) {
158 158
 				return strcmp( $a['name'], $b['name'] );
159 159
 			}
160 160
 		);
Please login to merge, or discard this patch.
classes/views/xml/xml.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,17 +18,17 @@  discard block
 block discarded – undo
18 18
 
19 19
 foreach ( $type as $tb_type ) {
20 20
 
21
-	if ( ! isset( $tables[ $tb_type ] ) ) {
21
+	if ( ! isset( $tables[$tb_type] ) ) {
22 22
 		do_action( 'frm_xml_import_' . $tb_type, $args );
23 23
 		continue;
24 24
 	}
25 25
 
26
-	if ( ! isset( $records[ $tb_type ] ) ) {
26
+	if ( ! isset( $records[$tb_type] ) ) {
27 27
 		// No records.
28 28
 		continue;
29 29
 	}
30 30
 
31
-	$item_ids = $records[ $tb_type ];
31
+	$item_ids = $records[$tb_type];
32 32
 
33 33
 	if ( in_array( $tb_type, array( 'styles', 'actions' ), true ) ) {
34 34
 		include __DIR__ . '/posts_xml.php';
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 		include FrmProAppHelper::plugin_path() . '/classes/views/xml/' . $tb_type . '_xml.php';
39 39
 	}
40 40
 
41
-	unset( $item_ids, $records[ $tb_type ], $tb_type );
41
+	unset( $item_ids, $records[$tb_type], $tb_type );
42 42
 }//end foreach
43 43
 
44 44
 /**
Please login to merge, or discard this patch.