Completed
Pull Request — master (#2615)
by
unknown
38s
created
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
@@ -768,7 +768,7 @@  discard block
 block discarded – undo
768 768
 			 *
769 769
 			 * @return string
770 770
 			 */
771
-			function ( $src ) {
771
+			function( $src ) {
772 772
 				if ( is_null( $src ) ) {
773 773
 					$src = '';
774 774
 				}
@@ -834,11 +834,11 @@  discard block
 block discarded – undo
834 834
 			),
835 835
 		);
836 836
 
837
-		if ( ! isset( $available_status[ $status ] ) ) {
837
+		if ( ! isset( $available_status[$status] ) ) {
838 838
 			return;
839 839
 		}
840 840
 
841
-		FrmAppHelper::permission_check( $available_status[ $status ]['permission'] );
841
+		FrmAppHelper::permission_check( $available_status[$status]['permission'] );
842 842
 
843 843
 		$params = FrmForm::list_page_params();
844 844
 
@@ -846,8 +846,8 @@  discard block
 block discarded – undo
846 846
 		check_admin_referer( $status . '_form_' . $params['id'] );
847 847
 
848 848
 		$count = 0;
849
-		if ( FrmForm::set_status( $params['id'], $available_status[ $status ]['new_status'] ) ) {
850
-			++$count;
849
+		if ( FrmForm::set_status( $params['id'], $available_status[$status]['new_status'] ) ) {
850
+			++ $count;
851 851
 		}
852 852
 
853 853
 		$form_type = FrmAppHelper::get_simple_request(
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
 		/* translators: %1$s: Number of forms, %2$s: Start link HTML, %3$s: End link HTML */
864 864
 		$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>' );
865 865
 
866
-		$message = $available_status[ $status ]['message'];
866
+		$message = $available_status[$status]['message'];
867 867
 
868 868
 		self::display_forms_list( $params, $message );
869 869
 	}
@@ -879,7 +879,7 @@  discard block
 block discarded – undo
879 879
 		$count = 0;
880 880
 		foreach ( $ids as $id ) {
881 881
 			if ( FrmForm::trash( $id ) ) {
882
-				++$count;
882
+				++ $count;
883 883
 			}
884 884
 		}
885 885
 
@@ -893,7 +893,7 @@  discard block
 block discarded – undo
893 893
 				'type'  => 'request',
894 894
 			)
895 895
 		);
896
-		$message      = sprintf(
896
+		$message = sprintf(
897 897
 			/* translators: %1$s: Number of forms, %2$s: Start link HTML, %3$s: End link HTML */
898 898
 			_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' ),
899 899
 			$count,
@@ -914,7 +914,7 @@  discard block
 block discarded – undo
914 914
 
915 915
 		$count = 0;
916 916
 		if ( FrmForm::destroy( $params['id'] ) ) {
917
-			++$count;
917
+			++ $count;
918 918
 		}
919 919
 
920 920
 		/* translators: %1$s: Number of forms */
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
 		foreach ( $ids as $id ) {
936 936
 			$d = FrmForm::destroy( $id );
937 937
 			if ( $d ) {
938
-				++$count;
938
+				++ $count;
939 939
 			}
940 940
 		}
941 941
 
@@ -1454,7 +1454,7 @@  discard block
 block discarded – undo
1454 1454
 
1455 1455
 		add_action(
1456 1456
 			'wp_enqueue_editor',
1457
-			function () {
1457
+			function() {
1458 1458
 				wp_print_media_templates();
1459 1459
 			}
1460 1460
 		);
@@ -1590,7 +1590,7 @@  discard block
 block discarded – undo
1590 1590
 				$section['id'] = $section['anchor'];
1591 1591
 			}
1592 1592
 
1593
-			$sections[ $key ] = $section;
1593
+			$sections[$key] = $section;
1594 1594
 		}//end foreach
1595 1595
 
1596 1596
 		return $sections;
@@ -1723,7 +1723,7 @@  discard block
 block discarded – undo
1723 1723
 		if ( $user_fields ) {
1724 1724
 			$user_helpers = array();
1725 1725
 			foreach ( $user_fields as $uk => $uf ) {
1726
-				$user_helpers[ '|user_id| show="' . $uk . '"' ] = $uf;
1726
+				$user_helpers['|user_id| show="' . $uk . '"'] = $uf;
1727 1727
 				unset( $uk, $uf );
1728 1728
 			}
1729 1729
 
@@ -1869,7 +1869,7 @@  discard block
 block discarded – undo
1869 1869
 		if ( ! isset( $frm_vars['js_validate_forms'] ) ) {
1870 1870
 			$frm_vars['js_validate_forms'] = array();
1871 1871
 		}
1872
-		$frm_vars['js_validate_forms'][ $form->id ] = $form;
1872
+		$frm_vars['js_validate_forms'][$form->id] = $form;
1873 1873
 	}
1874 1874
 
1875 1875
 	public static function get_email_html() {
@@ -2065,7 +2065,7 @@  discard block
 block discarded – undo
2065 2065
 				add_filter( 'frm_validate_form', 'FrmFormsController::json_error' );
2066 2066
 			} else {
2067 2067
 				$vars   = FrmAppHelper::json_to_array( $json_vars );
2068
-				$action = $vars[ $action ];
2068
+				$action = $vars[$action];
2069 2069
 				unset( $_REQUEST['frm_compact_fields'], $_POST['frm_compact_fields'] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
2070 2070
 				$_REQUEST = array_merge( $_REQUEST, $vars ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
2071 2071
 				$_POST    = array_merge( $_POST, $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
@@ -2257,7 +2257,7 @@  discard block
 block discarded – undo
2257 2257
 		$actions = array();
2258 2258
 		foreach ( $frm_vars['forms_loaded'] as $form ) {
2259 2259
 			if ( is_object( $form ) ) {
2260
-				$actions[ $form->id ] = $form->name;
2260
+				$actions[$form->id] = $form->name;
2261 2261
 			}
2262 2262
 			unset( $form );
2263 2263
 		}
@@ -2541,8 +2541,8 @@  discard block
 block discarded – undo
2541 2541
 	private static function get_saved_errors( $form, $params ) {
2542 2542
 		global $frm_vars;
2543 2543
 
2544
-		if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
2545
-			$errors = $frm_vars['created_entries'][ $form->id ]['errors'];
2544
+		if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][$form->id] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
2545
+			$errors = $frm_vars['created_entries'][$form->id]['errors'];
2546 2546
 		} else {
2547 2547
 			$errors = array();
2548 2548
 		}
@@ -2568,7 +2568,7 @@  discard block
 block discarded – undo
2568 2568
 	public static function just_created_entry( $form_id ) {
2569 2569
 		global $frm_vars;
2570 2570
 
2571
-		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;
2571
+		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;
2572 2572
 	}
2573 2573
 
2574 2574
 	/**
@@ -2589,7 +2589,7 @@  discard block
 block discarded – undo
2589 2589
 	private static function get_confirmation_method( $atts ) {
2590 2590
 		$action = FrmOnSubmitHelper::current_event( $atts );
2591 2591
 		$opt    = 'update' === $action ? 'edit_action' : 'success_action';
2592
-		$method = ! empty( $atts['form']->options[ $opt ] ) ? $atts['form']->options[ $opt ] : 'message';
2592
+		$method = ! empty( $atts['form']->options[$opt] ) ? $atts['form']->options[$opt] : 'message';
2593 2593
 
2594 2594
 		if ( ! empty( $atts['entry_id'] ) ) {
2595 2595
 			$met_actions = self::get_met_on_submit_actions( $atts, $action );
@@ -2617,7 +2617,7 @@  discard block
 block discarded – undo
2617 2617
 	public static function maybe_trigger_redirect( $form, $params, $args ) {
2618 2618
 		if ( ! isset( $params['id'] ) ) {
2619 2619
 			global $frm_vars;
2620
-			$params['id'] = $frm_vars['created_entries'][ $form->id ]['entry_id'];
2620
+			$params['id'] = $frm_vars['created_entries'][$form->id]['entry_id'];
2621 2621
 		}
2622 2622
 
2623 2623
 		$conf_method = self::get_confirmation_method(
@@ -2706,7 +2706,7 @@  discard block
 block discarded – undo
2706 2706
 		$args['success_opt'] = $opt;
2707 2707
 		$args['ajax']        = ! empty( $frm_vars['ajax'] );
2708 2708
 
2709
-		if ( $args['conf_method'] === 'page' && is_numeric( $args['form']->options[ $opt . '_page_id' ] ) ) {
2709
+		if ( $args['conf_method'] === 'page' && is_numeric( $args['form']->options[$opt . '_page_id'] ) ) {
2710 2710
 			self::load_page_after_submit( $args );
2711 2711
 		} elseif ( $args['conf_method'] === 'redirect' ) {
2712 2712
 			self::redirect_after_submit( $args );
@@ -2731,7 +2731,7 @@  discard block
 block discarded – undo
2731 2731
 		}
2732 2732
 
2733 2733
 		// If a redirect action has already opened the URL in a new tab, we show the default message in the current tab.
2734
-		if ( ! empty( self::$redirected_in_new_tab[ $args['form']->id ] ) ) {
2734
+		if ( ! empty( self::$redirected_in_new_tab[$args['form']->id] ) ) {
2735 2735
 			return array( FrmOnSubmitHelper::get_fallback_action_after_open_in_new_tab( $event ) );
2736 2736
 		}
2737 2737
 
@@ -2921,7 +2921,7 @@  discard block
 block discarded – undo
2921 2921
 
2922 2922
 		$opt = 'update' === $args['action'] ? 'edit_' : 'success_';
2923 2923
 
2924
-		$new_args['conf_method'] = $new_args['form']->options[ $opt . 'action' ];
2924
+		$new_args['conf_method'] = $new_args['form']->options[$opt . 'action'];
2925 2925
 
2926 2926
 		/**
2927 2927
 		 * Filters the run success action args.
@@ -2945,8 +2945,8 @@  discard block
 block discarded – undo
2945 2945
 	private static function load_page_after_submit( $args ) {
2946 2946
 		global $post;
2947 2947
 		$opt = $args['success_opt'];
2948
-		if ( ! $post || $args['form']->options[ $opt . '_page_id' ] != $post->ID ) {
2949
-			$page     = get_post( $args['form']->options[ $opt . '_page_id' ] );
2948
+		if ( ! $post || $args['form']->options[$opt . '_page_id'] != $post->ID ) {
2949
+			$page     = get_post( $args['form']->options[$opt . '_page_id'] );
2950 2950
 			$old_post = $post;
2951 2951
 			$post     = $page;
2952 2952
 			$content  = apply_filters( 'frm_content', $page->post_content, $args['form'], $args['entry_id'] );
@@ -2977,7 +2977,7 @@  discard block
 block discarded – undo
2977 2977
 		add_filter( 'frm_use_wpautop', '__return_false' );
2978 2978
 
2979 2979
 		$opt         = $args['success_opt'];
2980
-		$success_url = trim( $args['form']->options[ $opt . '_url' ] );
2980
+		$success_url = trim( $args['form']->options[$opt . '_url'] );
2981 2981
 		$success_url = apply_filters( 'frm_content', $success_url, $args['form'], $args['entry_id'] );
2982 2982
 		$success_url = do_shortcode( $success_url );
2983 2983
 
@@ -2999,7 +2999,7 @@  discard block
 block discarded – undo
2999 2999
 			// Not AJAX submit, no headers sent, and there is just one Redirect action runs.
3000 3000
 			if ( ! empty( $args['form']->options['open_in_new_tab'] ) ) {
3001 3001
 				self::print_open_in_new_tab_js_with_fallback_handler( $success_url, $args );
3002
-				self::$redirected_in_new_tab[ $args['form']->id ] = 1;
3002
+				self::$redirected_in_new_tab[$args['form']->id] = 1;
3003 3003
 				return;
3004 3004
 			}
3005 3005
 
@@ -3304,7 +3304,7 @@  discard block
 block discarded – undo
3304 3304
 			'description' => false,
3305 3305
 			'reset'       => false,
3306 3306
 		);
3307
-		$args     = wp_parse_args( $args, $defaults );
3307
+		$args = wp_parse_args( $args, $defaults );
3308 3308
 	}
3309 3309
 
3310 3310
 	/**
@@ -3347,7 +3347,7 @@  discard block
 block discarded – undo
3347 3347
 		$opt          = $args['success_opt'] ?? 'success';
3348 3348
 
3349 3349
 		if ( $entry_id && is_numeric( $entry_id ) ) {
3350
-			$message = $form->options[ $opt . '_msg' ] ?? $frm_settings->success_msg;
3350
+			$message = $form->options[$opt . '_msg'] ?? $frm_settings->success_msg;
3351 3351
 			$class   = 'frm_message';
3352 3352
 		} else {
3353 3353
 			$message = $frm_settings->failed_msg;
@@ -3599,8 +3599,8 @@  discard block
 block discarded – undo
3599 3599
 
3600 3600
 		check_ajax_referer( 'frm_ajax', 'nonce' );
3601 3601
 
3602
-		$html             = FrmAppHelper::clip(
3603
-			function () {
3602
+		$html = FrmAppHelper::clip(
3603
+			function() {
3604 3604
 				FrmAppHelper::maybe_autocomplete_pages_options(
3605 3605
 					array(
3606 3606
 						'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.
classes/models/fields/FrmFieldGdpr.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
 
173 173
 			if ( ! $required && empty( $args['value'] ) ) {
174 174
 				$frm_settings                    = FrmAppHelper::get_settings();
175
-				$errors[ 'field' . $args['id'] ] = str_replace( '[field_name]', is_object( $this->field ) ? $this->field->name : $this->field['name'], $frm_settings->blank_msg );
175
+				$errors['field' . $args['id']] = str_replace( '[field_name]', is_object( $this->field ) ? $this->field->name : $this->field['name'], $frm_settings->blank_msg );
176 176
 			}
177 177
 		}
178 178
 
Please login to merge, or discard this patch.
classes/models/FrmUsage.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 		);
127 127
 
128 128
 		foreach ( $skipped_keys as $skipped_key ) {
129
-			unset( $data[ $skipped_key ] );
129
+			unset( $data[$skipped_key] );
130 130
 		}
131 131
 
132 132
 		return $data;
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 
225 225
 		foreach ( $pass_settings as $setting ) {
226 226
 			if ( isset( $settings_list->$setting ) ) {
227
-				$settings[ $setting ] = $this->maybe_json( $settings_list->$setting );
227
+				$settings[$setting] = $this->maybe_json( $settings_list->$setting );
228 228
 			}
229 229
 		}
230 230
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 
261 261
 		$message_settings = array();
262 262
 		foreach ( $messages as $message ) {
263
-			$message_settings[ 'changed-' . $message ] = $settings_list->$message === $default[ $message ] ? 0 : 1;
263
+			$message_settings['changed-' . $message] = $settings_list->$message === $default[$message] ? 0 : 1;
264 264
 		}
265 265
 
266 266
 		return $message_settings;
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 
281 281
 		foreach ( $frm_roles as $frm_role => $frm_role_description ) {
282 282
 			if ( isset( $settings_list->$frm_role ) ) {
283
-				$permissions[ $frm_role ] = $settings_list->$frm_role;
283
+				$permissions[$frm_role] = $settings_list->$frm_role;
284 284
 			}
285 285
 		}
286 286
 
@@ -351,9 +351,9 @@  discard block
 block discarded – undo
351 351
 			);
352 352
 
353 353
 			foreach ( $settings as $setting ) {
354
-				if ( isset( $form->options[ $setting ] ) ) {
354
+				if ( isset( $form->options[$setting] ) ) {
355 355
 					if ( 'custom_style' === $setting ) {
356
-						$style->id = $form->options[ $setting ];
356
+						$style->id = $form->options[$setting];
357 357
 
358 358
 						if ( ! $style->id ) {
359 359
 							$style_name = 0;
@@ -364,9 +364,9 @@  discard block
 block discarded – undo
364 364
 							$style_name = $style_post ? $style_post->post_name : 'formidable-style';
365 365
 						}
366 366
 
367
-						$new_form[ $setting ] = $style_name;
367
+						$new_form[$setting] = $style_name;
368 368
 					} else {
369
-						$new_form[ $setting ] = $this->maybe_json( $form->options[ $setting ] );
369
+						$new_form[$setting] = $this->maybe_json( $form->options[$setting] );
370 370
 					}
371 371
 				}
372 372
 			}
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 		$fields = FrmDb::get_results( 'frm_fields', array(), 'id, form_id, name, type, field_options', $args );
427 427
 		foreach ( $fields as $k => $field ) {
428 428
 			FrmAppHelper::unserialize_or_decode( $field->field_options );
429
-			$fields[ $k ]->field_options = json_encode( $field->field_options );
429
+			$fields[$k]->field_options = json_encode( $field->field_options );
430 430
 		}
431 431
 		return $fields;
432 432
 	}
Please login to merge, or discard this patch.
square/helpers/FrmSquareLiteConnectHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@
 block discarded – undo
160 160
 	 * @return object|string
161 161
 	 */
162 162
 	private static function post_to_connect_server( $action, $additional_body = array() ) {
163
-		$body    = array(
163
+		$body = array(
164 164
 			'frm_square_api_action' => $action,
165 165
 			'frm_square_api_mode'   => FrmSquareLiteAppHelper::active_mode(),
166 166
 		);
Please login to merge, or discard this patch.
classes/models/FrmValidate.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
 
51 51
 		$form = $this->get_form();
52
-		return ! empty( $form->options[ $key ] ) && 'off' !== $form->options[ $key ];
52
+		return ! empty( $form->options[$key] ) && 'off' !== $form->options[$key];
53 53
 	}
54 54
 
55 55
 	/**
Please login to merge, or discard this patch.