Completed
Push — master ( 67005e...6d6fde )
by
unknown
18s
created
square/models/FrmSquareLiteSettings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,12 +82,12 @@
 block discarded – undo
82 82
 		$settings = $this->default_options();
83 83
 
84 84
 		foreach ( $settings as $setting => $default ) {
85
-			if ( isset( $params[ 'frm_' . $this->param() . '_' . $setting ] ) ) {
86
-				$this->settings->{$setting} = trim( sanitize_text_field( $params[ 'frm_' . $this->param() . '_' . $setting ] ) );
85
+			if ( isset( $params['frm_' . $this->param() . '_' . $setting] ) ) {
86
+				$this->settings->{$setting} = trim( sanitize_text_field( $params['frm_' . $this->param() . '_' . $setting] ) );
87 87
 			}
88 88
 		}
89 89
 
90
-		$this->settings->test_mode = isset( $params[ 'frm_' . $this->param() . '_test_mode' ] ) ? absint( $params[ 'frm_' . $this->param() . '_test_mode' ] ) : 0;
90
+		$this->settings->test_mode = isset( $params['frm_' . $this->param() . '_test_mode'] ) ? absint( $params['frm_' . $this->param() . '_test_mode'] ) : 0;
91 91
 	}
92 92
 
93 93
 	/**
Please login to merge, or discard this patch.
square/controllers/FrmSquareLiteAppController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -123,9 +123,9 @@  discard block
 block discarded – undo
123 123
 		$address_setting    = $action->post_content['billing_address'];
124 124
 
125 125
 		$entry      = self::generate_false_entry();
126
-		$first_name = $first_name_setting && isset( $entry->metas[ $first_name_setting ] ) ? $entry->metas[ $first_name_setting ] : '';
127
-		$last_name  = $last_name_setting && isset( $entry->metas[ $last_name_setting ] ) ? $entry->metas[ $last_name_setting ] : '';
128
-		$address    = $address_setting && isset( $entry->metas[ $address_setting ] ) ? $entry->metas[ $address_setting ] : '';
126
+		$first_name = $first_name_setting && isset( $entry->metas[$first_name_setting] ) ? $entry->metas[$first_name_setting] : '';
127
+		$last_name  = $last_name_setting && isset( $entry->metas[$last_name_setting] ) ? $entry->metas[$last_name_setting] : '';
128
+		$address    = $address_setting && isset( $entry->metas[$address_setting] ) ? $entry->metas[$address_setting] : '';
129 129
 
130 130
 		if ( is_array( $first_name ) && isset( $first_name['first'] ) ) {
131 131
 			$first_name = $first_name['first'];
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 		);
142 142
 
143 143
 		if ( $email_setting ) {
144
-			$shortcode_atts   = array(
144
+			$shortcode_atts = array(
145 145
 				'entry' => $entry,
146 146
 				'form'  => $action->menu_order,
147 147
 				'value' => $email_setting,
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 				if ( is_array( $v ) ) {
182 182
 					foreach ( $v as $f => $value ) {
183 183
 						FrmAppHelper::sanitize_value( 'wp_kses_post', $value );
184
-						$entry->metas[ absint( $f ) ] = $value;
184
+						$entry->metas[absint( $f )] = $value;
185 185
 					}
186 186
 				}
187 187
 			} else {
Please login to merge, or discard this patch.
square/controllers/FrmSquareLiteActionsController.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,7 +139,8 @@  discard block
 block discarded – undo
139 139
 	 * @return string|true string on error, true on success.
140 140
 	 */
141 141
 	private static function trigger_one_time_payment( $atts ) {
142
-		if ( empty( $_POST['square-token'] ) || empty( $_POST['square-verification-token'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
142
+		if ( empty( $_POST['square-token'] ) || empty( $_POST['square-verification-token'] ) ) {
143
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
143 144
 			return __( 'Please enter a valid credit card', 'formidable' );
144 145
 		}
145 146
 
@@ -199,7 +200,8 @@  discard block
 block discarded – undo
199 200
 	 * @return bool|string True on success, error message on failure
200 201
 	 */
201 202
 	private static function trigger_recurring_payment( $atts ) {
202
-		if ( empty( $_POST['square-token'] ) || empty( $_POST['square-verification-token'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
203
+		if ( empty( $_POST['square-token'] ) || empty( $_POST['square-verification-token'] ) ) {
204
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
203 205
 			return __( 'Please enter a valid credit card', 'formidable' );
204 206
 		}
205 207
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 			$is_square = $gateway === 'square' || ( is_array( $gateway ) && in_array( 'square', $gateway, true ) );
84 84
 
85 85
 			if ( ! $is_square || empty( $payment_action->post_content['amount'] ) ) {
86
-				unset( $payment_actions[ $k ] );
86
+				unset( $payment_actions[$k] );
87 87
 			}
88 88
 		}
89 89
 		return $payment_actions;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 			'run_triggers' => false,
106 106
 			'show_errors'  => true,
107 107
 		);
108
-		$atts     = compact( 'action', 'entry', 'form' );
108
+		$atts = compact( 'action', 'entry', 'form' );
109 109
 
110 110
 		$amount = self::prepare_amount( $action->post_content['amount'], $atts );
111 111
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 				'value' => $atts['action']->post_content['description'],
160 160
 			)
161 161
 		);
162
-		$result             = FrmSquareLiteConnectHelper::create_payment( $atts['amount'], $currency, $square_token, $verification_token, $description );
162
+		$result = FrmSquareLiteConnectHelper::create_payment( $atts['amount'], $currency, $square_token, $verification_token, $description );
163 163
 
164 164
 		if ( false === $result ) {
165 165
 			return FrmSquareLiteConnectHelper::get_latest_error_from_square_api();
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
 			false
548 548
 		);
549 549
 
550
-		$square_vars     = array(
550
+		$square_vars = array(
551 551
 			'formId'     => $form_id,
552 552
 			'nonce'      => wp_create_nonce( 'frm_square_ajax' ),
553 553
 			'ajax'       => esc_url_raw( FrmAppHelper::get_ajax_url() ),
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
 
688 688
 		foreach ( $settings as $k => $s ) {
689 689
 			if ( is_string( $s ) ) {
690
-				$settings[ $k ] = str_replace( $disallowed, '', $s );
690
+				$settings[$k] = str_replace( $disallowed, '', $s );
691 691
 			}
692 692
 		}
693 693
 
@@ -715,12 +715,12 @@  discard block
 block discarded – undo
715 715
 
716 716
 		$field_id = $field->temp_id ?? $field->id;
717 717
 
718
-		if ( isset( $errors[ 'field' . $field_id . '-cc' ] ) ) {
719
-			unset( $errors[ 'field' . $field_id . '-cc' ] );
718
+		if ( isset( $errors['field' . $field_id . '-cc'] ) ) {
719
+			unset( $errors['field' . $field_id . '-cc'] );
720 720
 		}
721 721
 
722
-		if ( isset( $errors[ 'field' . $field_id ] ) ) {
723
-			unset( $errors[ 'field' . $field_id ] );
722
+		if ( isset( $errors['field' . $field_id] ) ) {
723
+			unset( $errors['field' . $field_id] );
724 724
 		}
725 725
 
726 726
 		return $errors;
Please login to merge, or discard this patch.
classes/controllers/FrmSettingsController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 				$section['function'] = $original;
174 174
 			}
175 175
 
176
-			$sections[ $key ] = $section;
176
+			$sections[$key] = $section;
177 177
 		}//end foreach
178 178
 
179 179
 		return $sections;
@@ -193,8 +193,8 @@  discard block
 block discarded – undo
193 193
 
194 194
 		foreach ( $sections as $key => $section ) {
195 195
 			if ( in_array( $key, $payment_section_keys, true ) ) {
196
-				self::$removed_payments_sections[ $key ] = $section;
197
-				unset( $sections[ $key ] );
196
+				self::$removed_payments_sections[$key] = $section;
197
+				unset( $sections[$key] );
198 198
 			}
199 199
 		}
200 200
 
@@ -226,11 +226,11 @@  discard block
 block discarded – undo
226 226
 
227 227
 		$section  = FrmAppHelper::get_post_param( 'tab', '', 'sanitize_text_field' );
228 228
 		$sections = self::get_settings_tabs();
229
-		if ( ! isset( $sections[ $section ] ) ) {
229
+		if ( ! isset( $sections[$section] ) ) {
230 230
 			wp_die();
231 231
 		}
232 232
 
233
-		$section = $sections[ $section ];
233
+		$section = $sections[$section];
234 234
 
235 235
 		if ( isset( $section['class'] ) ) {
236 236
 			call_user_func( array( $section['class'], $section['function'] ) );
Please login to merge, or discard this patch.
classes/views/frm-fields/back-end/html-content.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 		<?php esc_html_e( 'Content', 'formidable' ); ?>
9 9
 	</label>
10 10
 	<?php
11
-	$e_args  = array(
11
+	$e_args = array(
12 12
 		'textarea_name' => 'field_options[description_' . absint( $field['id'] ) . ']',
13 13
 		'textarea_rows' => 7,
14 14
 	);
Please login to merge, or discard this patch.
classes/views/frm-fields/back-end/settings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 						if ( FrmAppHelper::pro_is_connected() && ! is_callable( array( 'FrmProHtmlHelper', 'echo_radio_group' ) ) ) {
190 190
 							switch ( $type ) {
191 191
 								case 'calc':
192
-									$default_value_type['data']  = array(
192
+									$default_value_type['data'] = array(
193 193
 										'show'    => '#calc-for-{id}',
194 194
 										'disable' => '#default-value-for-{id}',
195 195
 									);
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 						);
217 217
 
218 218
 						foreach ( $default_value_type['data'] as $data_key => $data_value ) {
219
-							$toggle_args['input_html'][ 'data-' . $data_key ] = $data_value . ( substr( $data_value, -1 ) === '-' ? $field['id'] : '' );
219
+							$toggle_args['input_html']['data-' . $data_key] = $data_value . ( substr( $data_value, -1 ) === '-' ? $field['id'] : '' );
220 220
 						}
221 221
 
222 222
 						?>
Please login to merge, or discard this patch.
classes/views/test-mode/pagination-buttons.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 $number_of_pages_to_show = 4;
14 14
 ?>
15 15
 <div id="frm_test_mode_pagination">
16
-	<?php for ( $i = 1; $i <= $number_of_pages_to_show; $i++ ) : ?>
16
+	<?php for ( $i = 1; $i <= $number_of_pages_to_show; $i ++ ) : ?>
17 17
 		<input type="button" class="frm_noallow <?php echo $i === 1 ? 'frm_test_mode_active_page' : ''; ?>" value="<?php echo esc_attr( $i ); ?>"/>
18 18
 	<?php endfor; ?>
19 19
 </div>
Please login to merge, or discard this patch.
classes/controllers/FrmTestModeController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	private static function get_testing_mode_container() {
65 65
 		return FrmAppHelper::clip(
66
-			function () {
66
+			function() {
67 67
 				self::render_testing_mode_container();
68 68
 			}
69 69
 		);
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 			'data-requires' => 'Business',
114 114
 			'style'         => 'margin-left: auto;',
115 115
 		);
116
-		$ai_install_span_attrs                = array(
116
+		$ai_install_span_attrs = array(
117 117
 			'data-upgrade'  => __( 'Autofilled forms with AI', 'formidable' ),
118 118
 			'data-content'  => 'ai-autofill',
119 119
 			'data-medium'   => 'test-mode',
Please login to merge, or discard this patch.
stripe/helpers/FrmStrpLiteUrlParamHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 	 * @return array|false
27 27
 	 */
28 28
 	public static function get_details_for_form( $form_id ) {
29
-		if ( ! isset( self::$details_by_form_id[ $form_id ] ) ) {
29
+		if ( ! isset( self::$details_by_form_id[$form_id] ) ) {
30 30
 			self::set_details_for_form( (int) $form_id );
31 31
 		}
32
-		return self::$details_by_form_id[ $form_id ] ?? false;
32
+		return self::$details_by_form_id[$form_id] ?? false;
33 33
 	}
34 34
 
35 35
 	/**
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 			return;
91 91
 		}
92 92
 
93
-		self::$details_by_form_id[ $form_id ] = array(
93
+		self::$details_by_form_id[$form_id] = array(
94 94
 			'entry'   => $entry,
95 95
 			'intent'  => $intent,
96 96
 			'payment' => $payment,
Please login to merge, or discard this patch.