Completed
Push — master ( 039ccc...41d4a3 )
by
unknown
18s
created
classes/controllers/FrmFormActionsController.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -113,19 +113,19 @@  discard block
 block discarded – undo
113 113
 		}
114 114
 
115 115
 		foreach ( $action_controls as $action ) {
116
-			if ( isset( $groups[ $action->id_base ] ) || in_array( $action->id_base, $grouped ) ) {
116
+			if ( isset( $groups[$action->id_base] ) || in_array( $action->id_base, $grouped ) ) {
117 117
 				continue;
118 118
 			}
119 119
 
120 120
 			$this_group = $action->action_options['group'];
121
-			if ( ! isset( $groups[ $this_group ] ) ) {
121
+			if ( ! isset( $groups[$this_group] ) ) {
122 122
 				$this_group = 'misc';
123 123
 			}
124 124
 
125
-			if ( ! isset( $groups[ $this_group ]['actions'] ) ) {
126
-				$groups[ $this_group ]['actions'] = array();
125
+			if ( ! isset( $groups[$this_group]['actions'] ) ) {
126
+				$groups[$this_group]['actions'] = array();
127 127
 			}
128
-			$groups[ $this_group ]['actions'][] = $action->id_base;
128
+			$groups[$this_group]['actions'][] = $action->id_base;
129 129
 
130 130
 			unset( $action );
131 131
 		}
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 				return $a;
280 280
 			}
281 281
 
282
-			$actions[ $a->id_base ] = $a;
282
+			$actions[$a->id_base] = $a;
283 283
 		}
284 284
 
285 285
 		return $actions;
@@ -313,18 +313,18 @@  discard block
 block discarded – undo
313 313
 		$action_map = array();
314 314
 
315 315
 		foreach ( $action_controls as $key => $control ) {
316
-			$action_map[ $control->id_base ] = $key;
316
+			$action_map[$control->id_base] = $key;
317 317
 		}
318 318
 
319 319
 		self::maybe_show_limit_warning( $form->id, $form_actions );
320 320
 
321 321
 		foreach ( $form_actions as $action ) {
322
-			if ( ! isset( $action_map[ $action->post_excerpt ] ) ) {
322
+			if ( ! isset( $action_map[$action->post_excerpt] ) ) {
323 323
 				// don't try and show settings if action no longer exists
324 324
 				continue;
325 325
 			}
326 326
 
327
-			self::action_control( $action, $form, $action->ID, $action_controls[ $action_map[ $action->post_excerpt ] ], $values );
327
+			self::action_control( $action, $form, $action->ID, $action_controls[$action_map[$action->post_excerpt]], $values );
328 328
 		}
329 329
 	}
330 330
 
@@ -592,8 +592,8 @@  discard block
 block discarded – undo
592 592
 			}
593 593
 
594 594
 			// Store actions so they can be triggered with the correct priority.
595
-			$stored_actions[ $action->ID ]  = $action;
596
-			$action_priority[ $action->ID ] = $link_settings[ $action->post_excerpt ]->action_options['priority'];
595
+			$stored_actions[$action->ID]  = $action;
596
+			$action_priority[$action->ID] = $link_settings[$action->post_excerpt]->action_options['priority'];
597 597
 
598 598
 			unset( $action );
599 599
 		}//end foreach
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
 			new FrmNotification();
606 606
 
607 607
 			foreach ( $action_priority as $action_id => $priority ) {
608
-				$action = $stored_actions[ $action_id ];
608
+				$action = $stored_actions[$action_id];
609 609
 
610 610
 				/**
611 611
 				 * Allows custom form action trigger.
@@ -669,12 +669,12 @@  discard block
 block discarded – undo
669 669
 	}
670 670
 
671 671
 	public function register( $action_class ) {
672
-		$this->actions[ $action_class ] = new $action_class();
672
+		$this->actions[$action_class] = new $action_class();
673 673
 	}
674 674
 
675 675
 	public function unregister( $action_class ) {
676
-		if ( isset( $this->actions[ $action_class ] ) ) {
677
-			unset( $this->actions[ $action_class ] );
676
+		if ( isset( $this->actions[$action_class] ) ) {
677
+			unset( $this->actions[$action_class] );
678 678
 		}
679 679
 	}
680 680
 
@@ -683,8 +683,8 @@  discard block
 block discarded – undo
683 683
 
684 684
 		foreach ( $keys as $key ) {
685 685
 			// don't register new action if old action with the same id is already registered
686
-			if ( ! isset( $this->actions[ $key ] ) ) {
687
-				$this->actions[ $key ]->_register();
686
+			if ( ! isset( $this->actions[$key] ) ) {
687
+				$this->actions[$key]->_register();
688 688
 			}
689 689
 		}
690 690
 	}
Please login to merge, or discard this patch.
classes/models/fields/FrmFieldEmail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 		}
50 50
 		$errors = array();
51 51
 		if ( false !== strpos( $args['value'], '.@' ) || ! is_email( $args['value'] ) ) {
52
-			$errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
52
+			$errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
53 53
 		}
54 54
 		return $errors;
55 55
 	}
Please login to merge, or discard this patch.
stripe/controllers/FrmTransLiteHooksController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 	public static function load_admin_hooks() {
37 37
 		add_action(
38 38
 			'admin_init',
39
-			function () {
39
+			function() {
40 40
 				self::fix_addon_hooks();
41 41
 			}
42 42
 		);
Please login to merge, or discard this patch.
classes/helpers/FrmApiHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
 	 * @return bool
128 128
 	 */
129 129
 	private static function check_free_segments( $who ) {
130
-		$segments          = array(
130
+		$segments = array(
131 131
 			'free_first_1',
132 132
 			'free_first_2_3',
133 133
 			'free_first_4_7',
Please login to merge, or discard this patch.
classes/models/fields/FrmFieldNumber.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 		// Validate the number format.
64 64
 		if ( ! is_numeric( $args['value'] ) && '' !== $args['value'] ) {
65
-			$errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
65
+			$errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
66 66
 		}
67 67
 
68 68
 		if ( $args['value'] === '' ) {
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
 		$maxnum = FrmField::get_option( $this->field, 'maxnum' );
75 75
 
76 76
 		if ( $minnum !== '' && $value < $minnum ) {
77
-			$errors[ 'field' . $args['id'] ] = __( 'Please select a higher number', 'formidable' );
77
+			$errors['field' . $args['id']] = __( 'Please select a higher number', 'formidable' );
78 78
 		} elseif ( $maxnum !== '' && $value > $maxnum ) {
79
-			$errors[ 'field' . $args['id'] ] = __( 'Please select a lower number', 'formidable' );
79
+			$errors['field' . $args['id']] = __( 'Please select a lower number', 'formidable' );
80 80
 		}
81 81
 
82 82
 		$this->validate_step( $errors, $args );
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 * @return void
96 96
 	 */
97 97
 	protected function validate_step( &$errors, $args ) {
98
-		if ( isset( $errors[ 'field' . $args['id'] ] ) ) {
98
+		if ( isset( $errors['field' . $args['id']] ) ) {
99 99
 			// Don't need to check if value is invalid before.
100 100
 			return;
101 101
 		}
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 			return;
111 111
 		}
112 112
 
113
-		$errors[ 'field' . $args['id'] ] = sprintf(
113
+		$errors['field' . $args['id']] = sprintf(
114 114
 			// Translators: %1$s: the first nearest value; %2$s: the second nearest value.
115 115
 			__( 'Please enter a valid value. Two nearest valid values are %1$s and %2$s', 'formidable' ),
116 116
 			is_numeric( $result[0] ) ? floatval( $result[0] ) : $result[0],
Please login to merge, or discard this patch.
classes/helpers/FrmFormsListHelper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 		$page     = $this->get_pagenum();
29 29
 		$per_page = $this->get_items_per_page( 'formidable_page_formidable_per_page' );
30 30
 
31
-		$mode    = self::get_param(
31
+		$mode = self::get_param(
32 32
 			array(
33 33
 				'param'   => 'mode',
34 34
 				'default' => 'list',
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 				'default' => 'name',
41 41
 			)
42 42
 		);
43
-		$order   = self::get_param(
43
+		$order = self::get_param(
44 44
 			array(
45 45
 				'param'   => 'order',
46 46
 				'default' => 'ASC',
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 		FrmAppController::apply_saved_sort_preference( $orderby, $order );
51 51
 
52
-		$start   = self::get_param(
52
+		$start = self::get_param(
53 53
 			array(
54 54
 				'param'   => 'start',
55 55
 				'default' => ( $page - 1 ) * $per_page,
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 		$counts    = FrmForm::get_count();
182 182
 		$form_type = FrmAppHelper::simple_get( 'form_type', 'sanitize_title', 'published' );
183 183
 
184
-		if ( isset( $statuses[ $form_type ] ) ) {
184
+		if ( isset( $statuses[$form_type] ) ) {
185 185
 			$counts->$form_type = $this->total_items;
186 186
 		}
187 187
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
 			if ( $counts->{$status} || 'draft' !== $status ) {
204 204
 				/* translators: %1$s: Status, %2$s: Number of items */
205
-				$links[ $status ] = '<a href="' . esc_url( '?page=formidable&form_type=' . $status ) . '" ' . $class . '>' . sprintf( __( '%1$s <span class="count">(%2$s)</span>', 'formidable' ), $name, number_format_i18n( $counts->{$status} ) ) . '</a>';
205
+				$links[$status] = '<a href="' . esc_url( '?page=formidable&form_type=' . $status ) . '" ' . $class . '>' . sprintf( __( '%1$s <span class="count">(%2$s)</span>', 'formidable' ), $name, number_format_i18n( $counts->{$status} ) ) . '</a>';
206 206
 			}
207 207
 
208 208
 			unset( $status, $name );
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 	private function get_actions( &$actions, $item, $edit_link ) {
405 405
 		$new_actions = FrmFormsHelper::get_action_links( $item->id, $item );
406 406
 		foreach ( $new_actions as $link => $action ) {
407
-			$new_actions[ $link ] = FrmFormsHelper::format_link_html( $action, 'short' );
407
+			$new_actions[$link] = FrmFormsHelper::format_link_html( $action, 'short' );
408 408
 		}
409 409
 
410 410
 		if ( 'trash' === $this->status ) {
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
@@ -1889,7 +1889,8 @@  discard block
 block discarded – undo
1889 1889
 		$action = isset( $_REQUEST['frm_action'] ) ? 'frm_action' : 'action';
1890 1890
 		$vars   = array();
1891 1891
 		FrmAppHelper::include_svg();
1892
-		if ( isset( $_POST['frm_compact_fields'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1892
+		if ( isset( $_POST['frm_compact_fields'] ) ) {
1893
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
1893 1894
 			FrmAppHelper::permission_check( 'frm_edit_forms' );
1894 1895
 
1895 1896
 			// Javascript needs to be allowed in some field settings.
@@ -2314,7 +2315,8 @@  discard block
 block discarded – undo
2314 2315
 	private static function get_saved_errors( $form, $params ) {
2315 2316
 		global $frm_vars;
2316 2317
 
2317
-		if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
2318
+		if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) {
2319
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
2318 2320
 			$errors = $frm_vars['created_entries'][ $form->id ]['errors'];
2319 2321
 		} else {
2320 2322
 			$errors = array();
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
 			 * @param string|null $src
740 740
 			 * @return string
741 741
 			 */
742
-			function ( $src ) {
742
+			function( $src ) {
743 743
 				if ( is_null( $src ) ) {
744 744
 					$src = '';
745 745
 				}
@@ -804,11 +804,11 @@  discard block
 block discarded – undo
804 804
 			),
805 805
 		);
806 806
 
807
-		if ( ! isset( $available_status[ $status ] ) ) {
807
+		if ( ! isset( $available_status[$status] ) ) {
808 808
 			return;
809 809
 		}
810 810
 
811
-		FrmAppHelper::permission_check( $available_status[ $status ]['permission'] );
811
+		FrmAppHelper::permission_check( $available_status[$status]['permission'] );
812 812
 
813 813
 		$params = FrmForm::list_page_params();
814 814
 
@@ -816,8 +816,8 @@  discard block
 block discarded – undo
816 816
 		check_admin_referer( $status . '_form_' . $params['id'] );
817 817
 
818 818
 		$count = 0;
819
-		if ( FrmForm::set_status( $params['id'], $available_status[ $status ]['new_status'] ) ) {
820
-			++$count;
819
+		if ( FrmForm::set_status( $params['id'], $available_status[$status]['new_status'] ) ) {
820
+			++ $count;
821 821
 		}
822 822
 
823 823
 		$form_type = FrmAppHelper::get_simple_request(
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
 		/* translators: %1$s: Number of forms, %2$s: Start link HTML, %3$s: End link HTML */
834 834
 		$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>' );
835 835
 
836
-		$message = $available_status[ $status ]['message'];
836
+		$message = $available_status[$status]['message'];
837 837
 
838 838
 		self::display_forms_list( $params, $message );
839 839
 	}
@@ -848,7 +848,7 @@  discard block
 block discarded – undo
848 848
 		$count = 0;
849 849
 		foreach ( $ids as $id ) {
850 850
 			if ( FrmForm::trash( $id ) ) {
851
-				++$count;
851
+				++ $count;
852 852
 			}
853 853
 		}
854 854
 
@@ -862,7 +862,7 @@  discard block
 block discarded – undo
862 862
 				'type'  => 'request',
863 863
 			)
864 864
 		);
865
-		$message      = sprintf(
865
+		$message = sprintf(
866 866
 			/* translators: %1$s: Number of forms, %2$s: Start link HTML, %3$s: End link HTML */
867 867
 			_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' ),
868 868
 			$count,
@@ -883,7 +883,7 @@  discard block
 block discarded – undo
883 883
 
884 884
 		$count = 0;
885 885
 		if ( FrmForm::destroy( $params['id'] ) ) {
886
-			++$count;
886
+			++ $count;
887 887
 		}
888 888
 
889 889
 		/* translators: %1$s: Number of forms */
@@ -903,7 +903,7 @@  discard block
 block discarded – undo
903 903
 		foreach ( $ids as $id ) {
904 904
 			$d = FrmForm::destroy( $id );
905 905
 			if ( $d ) {
906
-				++$count;
906
+				++ $count;
907 907
 			}
908 908
 		}
909 909
 
@@ -1404,7 +1404,7 @@  discard block
 block discarded – undo
1404 1404
 
1405 1405
 		add_action(
1406 1406
 			'wp_enqueue_editor',
1407
-			function () {
1407
+			function() {
1408 1408
 				wp_print_media_templates();
1409 1409
 			}
1410 1410
 		);
@@ -1535,7 +1535,7 @@  discard block
 block discarded – undo
1535 1535
 				$section['id'] = $section['anchor'];
1536 1536
 			}
1537 1537
 
1538
-			$sections[ $key ] = $section;
1538
+			$sections[$key] = $section;
1539 1539
 		}//end foreach
1540 1540
 
1541 1541
 		return $sections;
@@ -1658,7 +1658,7 @@  discard block
 block discarded – undo
1658 1658
 		if ( $user_fields ) {
1659 1659
 			$user_helpers = array();
1660 1660
 			foreach ( $user_fields as $uk => $uf ) {
1661
-				$user_helpers[ '|user_id| show="' . $uk . '"' ] = $uf;
1661
+				$user_helpers['|user_id| show="' . $uk . '"'] = $uf;
1662 1662
 				unset( $uk, $uf );
1663 1663
 			}
1664 1664
 
@@ -1792,7 +1792,7 @@  discard block
 block discarded – undo
1792 1792
 		if ( ! isset( $frm_vars['js_validate_forms'] ) ) {
1793 1793
 			$frm_vars['js_validate_forms'] = array();
1794 1794
 		}
1795
-		$frm_vars['js_validate_forms'][ $form->id ] = $form;
1795
+		$frm_vars['js_validate_forms'][$form->id] = $form;
1796 1796
 	}
1797 1797
 
1798 1798
 	public static function get_email_html() {
@@ -1976,7 +1976,7 @@  discard block
 block discarded – undo
1976 1976
 				add_filter( 'frm_validate_form', 'FrmFormsController::json_error' );
1977 1977
 			} else {
1978 1978
 				$vars   = FrmAppHelper::json_to_array( $json_vars );
1979
-				$action = $vars[ $action ];
1979
+				$action = $vars[$action];
1980 1980
 				unset( $_REQUEST['frm_compact_fields'], $_POST['frm_compact_fields'] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
1981 1981
 				$_REQUEST = array_merge( $_REQUEST, $vars ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
1982 1982
 				$_POST    = array_merge( $_POST, $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
@@ -2159,7 +2159,7 @@  discard block
 block discarded – undo
2159 2159
 		$actions = array();
2160 2160
 		foreach ( $frm_vars['forms_loaded'] as $form ) {
2161 2161
 			if ( is_object( $form ) ) {
2162
-				$actions[ $form->id ] = $form->name;
2162
+				$actions[$form->id] = $form->name;
2163 2163
 			}
2164 2164
 			unset( $form );
2165 2165
 		}
@@ -2404,8 +2404,8 @@  discard block
 block discarded – undo
2404 2404
 	private static function get_saved_errors( $form, $params ) {
2405 2405
 		global $frm_vars;
2406 2406
 
2407
-		if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
2408
-			$errors = $frm_vars['created_entries'][ $form->id ]['errors'];
2407
+		if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][$form->id] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
2408
+			$errors = $frm_vars['created_entries'][$form->id]['errors'];
2409 2409
 		} else {
2410 2410
 			$errors = array();
2411 2411
 		}
@@ -2427,7 +2427,7 @@  discard block
 block discarded – undo
2427 2427
 	public static function just_created_entry( $form_id ) {
2428 2428
 		global $frm_vars;
2429 2429
 
2430
-		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;
2430
+		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;
2431 2431
 	}
2432 2432
 
2433 2433
 	/**
@@ -2447,7 +2447,7 @@  discard block
 block discarded – undo
2447 2447
 	private static function get_confirmation_method( $atts ) {
2448 2448
 		$action = FrmOnSubmitHelper::current_event( $atts );
2449 2449
 		$opt    = 'update' === $action ? 'edit_action' : 'success_action';
2450
-		$method = ! empty( $atts['form']->options[ $opt ] ) ? $atts['form']->options[ $opt ] : 'message';
2450
+		$method = ! empty( $atts['form']->options[$opt] ) ? $atts['form']->options[$opt] : 'message';
2451 2451
 
2452 2452
 		if ( ! empty( $atts['entry_id'] ) ) {
2453 2453
 			$met_actions = self::get_met_on_submit_actions( $atts, $action );
@@ -2468,7 +2468,7 @@  discard block
 block discarded – undo
2468 2468
 	public static function maybe_trigger_redirect( $form, $params, $args ) {
2469 2469
 		if ( ! isset( $params['id'] ) ) {
2470 2470
 			global $frm_vars;
2471
-			$params['id'] = $frm_vars['created_entries'][ $form->id ]['entry_id'];
2471
+			$params['id'] = $frm_vars['created_entries'][$form->id]['entry_id'];
2472 2472
 		}
2473 2473
 
2474 2474
 		$conf_method = self::get_confirmation_method(
@@ -2550,7 +2550,7 @@  discard block
 block discarded – undo
2550 2550
 		$args['success_opt'] = $opt;
2551 2551
 		$args['ajax']        = ! empty( $frm_vars['ajax'] );
2552 2552
 
2553
-		if ( $args['conf_method'] === 'page' && is_numeric( $args['form']->options[ $opt . '_page_id' ] ) ) {
2553
+		if ( $args['conf_method'] === 'page' && is_numeric( $args['form']->options[$opt . '_page_id'] ) ) {
2554 2554
 			self::load_page_after_submit( $args );
2555 2555
 		} elseif ( $args['conf_method'] === 'redirect' ) {
2556 2556
 			self::redirect_after_submit( $args );
@@ -2574,7 +2574,7 @@  discard block
 block discarded – undo
2574 2574
 		}
2575 2575
 
2576 2576
 		// If a redirect action has already opened the URL in a new tab, we show the default message in the current tab.
2577
-		if ( ! empty( self::$redirected_in_new_tab[ $args['form']->id ] ) ) {
2577
+		if ( ! empty( self::$redirected_in_new_tab[$args['form']->id] ) ) {
2578 2578
 			return array( FrmOnSubmitHelper::get_fallback_action_after_open_in_new_tab( $event ) );
2579 2579
 		}
2580 2580
 
@@ -2762,7 +2762,7 @@  discard block
 block discarded – undo
2762 2762
 
2763 2763
 		$opt = 'update' === $args['action'] ? 'edit_' : 'success_';
2764 2764
 
2765
-		$new_args['conf_method'] = $new_args['form']->options[ $opt . 'action' ];
2765
+		$new_args['conf_method'] = $new_args['form']->options[$opt . 'action'];
2766 2766
 
2767 2767
 		/**
2768 2768
 		 * Filters the run success action args.
@@ -2782,8 +2782,8 @@  discard block
 block discarded – undo
2782 2782
 	private static function load_page_after_submit( $args ) {
2783 2783
 		global $post;
2784 2784
 		$opt = $args['success_opt'];
2785
-		if ( ! $post || $args['form']->options[ $opt . '_page_id' ] != $post->ID ) {
2786
-			$page     = get_post( $args['form']->options[ $opt . '_page_id' ] );
2785
+		if ( ! $post || $args['form']->options[$opt . '_page_id'] != $post->ID ) {
2786
+			$page     = get_post( $args['form']->options[$opt . '_page_id'] );
2787 2787
 			$old_post = $post;
2788 2788
 			$post     = $page;
2789 2789
 			$content  = apply_filters( 'frm_content', $page->post_content, $args['form'], $args['entry_id'] );
@@ -2813,7 +2813,7 @@  discard block
 block discarded – undo
2813 2813
 		add_filter( 'frm_use_wpautop', '__return_false' );
2814 2814
 
2815 2815
 		$opt         = $args['success_opt'];
2816
-		$success_url = trim( $args['form']->options[ $opt . '_url' ] );
2816
+		$success_url = trim( $args['form']->options[$opt . '_url'] );
2817 2817
 		$success_url = apply_filters( 'frm_content', $success_url, $args['form'], $args['entry_id'] );
2818 2818
 		$success_url = do_shortcode( $success_url );
2819 2819
 
@@ -2835,7 +2835,7 @@  discard block
 block discarded – undo
2835 2835
 			// Not AJAX submit, no headers sent, and there is just one Redirect action runs.
2836 2836
 			if ( ! empty( $args['form']->options['open_in_new_tab'] ) ) {
2837 2837
 				self::print_open_in_new_tab_js_with_fallback_handler( $success_url, $args );
2838
-				self::$redirected_in_new_tab[ $args['form']->id ] = 1;
2838
+				self::$redirected_in_new_tab[$args['form']->id] = 1;
2839 2839
 				return;
2840 2840
 			}
2841 2841
 
@@ -3115,7 +3115,7 @@  discard block
 block discarded – undo
3115 3115
 			'description' => false,
3116 3116
 			'reset'       => false,
3117 3117
 		);
3118
-		$args     = wp_parse_args( $args, $defaults );
3118
+		$args = wp_parse_args( $args, $defaults );
3119 3119
 	}
3120 3120
 
3121 3121
 	/**
@@ -3153,7 +3153,7 @@  discard block
 block discarded – undo
3153 3153
 		$opt          = $args['success_opt'] ?? 'success';
3154 3154
 
3155 3155
 		if ( $entry_id && is_numeric( $entry_id ) ) {
3156
-			$message = $form->options[ $opt . '_msg' ] ?? $frm_settings->success_msg;
3156
+			$message = $form->options[$opt . '_msg'] ?? $frm_settings->success_msg;
3157 3157
 			$class   = 'frm_message';
3158 3158
 		} else {
3159 3159
 			$message = $frm_settings->failed_msg;
@@ -3378,8 +3378,8 @@  discard block
 block discarded – undo
3378 3378
 
3379 3379
 		check_ajax_referer( 'frm_ajax', 'nonce' );
3380 3380
 
3381
-		$html             = FrmAppHelper::clip(
3382
-			function () {
3381
+		$html = FrmAppHelper::clip(
3382
+			function() {
3383 3383
 				FrmAppHelper::maybe_autocomplete_pages_options(
3384 3384
 					array(
3385 3385
 						'field_name'  => 'frm_page_dropdown',
Please login to merge, or discard this patch.
classes/helpers/FrmFieldGdprHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 	 * @return array
54 54
 	 */
55 55
 	public static function add_gdpr_field( $fields ) {
56
-		$fields[ self::FIELD_TYPE ] = array(
56
+		$fields[self::FIELD_TYPE] = array(
57 57
 			'name' => __( 'GDPR', 'formidable' ),
58 58
 			'icon' => 'frm_icon_font frm-gdpr-icon',
59 59
 		);
Please login to merge, or discard this patch.
classes/views/frm-forms/add_field_links.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,10 +76,10 @@
 block discarded – undo
76 76
 								foreach ( $pro_fields as $field_key => $field_type ) {
77 77
 
78 78
 									if ( isset( $field_type['section'] ) ) {
79
-										if ( ! isset( $field_sections[ $field_type['section'] ] ) ) {
80
-											$field_sections[ $field_type['section'] ] = array();
79
+										if ( ! isset( $field_sections[$field_type['section']] ) ) {
80
+											$field_sections[$field_type['section']] = array();
81 81
 										}
82
-										$field_sections[ $field_type['section'] ][ $field_key ] = $field_type;
82
+										$field_sections[$field_type['section']][$field_key] = $field_type;
83 83
 										continue;
84 84
 									}
85 85
 
Please login to merge, or discard this patch.