Completed
Pull Request — master (#2563)
by
unknown
40s
created
classes/views/frm-settings/payments.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@
 block discarded – undo
31 31
 	if ( $is_active ) {
32 32
 		$input_params['checked'] = 'checked';
33 33
 	}
34
-	$other_section_selectors      = array_map(
35
-		function ( $section ) {
34
+	$other_section_selectors = array_map(
35
+		function( $section ) {
36 36
 			return "#frm_{$section}_settings_section";
37 37
 		},
38 38
 		array_diff( array_keys( $payment_sections ), array( $key ) )
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/helpers/FrmDashboardHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
 	public function __construct( $data ) {
90 90
 		$sections = array( 'counters', 'license', 'get_free_templates', 'payments', 'entries', 'inbox', 'video', 'payments' );
91 91
 		foreach ( $sections as $section ) {
92
-			if ( isset( $data[ $section ] ) ) {
93
-				$this->view[ $section ] = $data[ $section ];
92
+			if ( isset( $data[$section] ) ) {
93
+				$this->view[$section] = $data[$section];
94 94
 			}
95 95
 		}
96 96
 	}
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 	private static function load_entries_list_template( $template ) {
366 366
 		add_filter(
367 367
 			'formidable_page_formidable_entries_per_page',
368
-			function () {
368
+			function() {
369 369
 				return 7;
370 370
 			}
371 371
 		);
Please login to merge, or discard this patch.
classes/controllers/FrmEmailStylesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 		// Check if the selected style is available and selectable.
91 91
 		$styles = self::get_email_styles();
92 92
 		$style  = $frm_settings->email_style;
93
-		if ( isset( $styles[ $style ] ) && ! empty( $styles[ $style ]['selectable'] ) ) {
93
+		if ( isset( $styles[$style] ) && ! empty( $styles[$style]['selectable'] ) ) {
94 94
 			return $style;
95 95
 		}
96 96
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 		}
250 250
 
251 251
 		$styles = self::get_email_styles();
252
-		if ( ! isset( $styles[ $style_key ] ) ) {
252
+		if ( ! isset( $styles[$style_key] ) ) {
253 253
 			die( esc_html( $not_exist_msg ) );
254 254
 		}
255 255
 
Please login to merge, or discard this patch.
classes/controllers/FrmFormTemplatesController.php 1 patch
Spacing   +13 added lines, -15 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 					'description'        => esc_html__( 'Just add your email address and you\'ll get 30+ free form templates to your account.', 'formidable' ),
240 240
 					'submit_button_text' => esc_html_x( 'Get Templates', 'get free templates modal submit button text', 'formidable' ),
241 241
 				);
242
-				$view_parts[]     = 'modals/leave-email-modal.php';
242
+				$view_parts[] = 'modals/leave-email-modal.php';
243 243
 			}
244 244
 
245 245
 			// Add 'upgrade' modal view for non-elite users.
@@ -338,11 +338,11 @@  discard block
 block discarded – undo
338 338
 
339 339
 		// Perform add or remove operation.
340 340
 		if ( 'add' === $operation ) {
341
-			self::$favorite_templates[ $key ][] = $template_id;
341
+			self::$favorite_templates[$key][] = $template_id;
342 342
 		} elseif ( 'remove' === $operation ) {
343
-			$position = array_search( $template_id, self::$favorite_templates[ $key ], true );
343
+			$position = array_search( $template_id, self::$favorite_templates[$key], true );
344 344
 			if ( $position !== false ) {
345
-				unset( self::$favorite_templates[ $key ][ $position ] );
345
+				unset( self::$favorite_templates[$key][$position] );
346 346
 			}
347 347
 		}
348 348
 
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 		foreach ( self::$templates as $key => &$template ) {
501 501
 			// Skip the template if the categories are not set.
502 502
 			if ( ! isset( $template['categories'] ) || ! isset( $template['id'] ) ) {
503
-				unset( self::$templates[ $key ] );
503
+				unset( self::$templates[$key] );
504 504
 				continue;
505 505
 			}
506 506
 
@@ -514,14 +514,12 @@  discard block
 block discarded – undo
514 514
 				// Add the slug to the new array.
515 515
 				$template['category_slugs'][] = $category_slug;
516 516
 
517
-				if ( ! isset( self::$categories[ $category_slug ] ) ) {
518
-					self::$categories[ $category_slug ] = array(
517
+				if ( ! isset( self::$categories[$category_slug] ) ) {
518
+					self::$categories[$category_slug] = array(
519 519
 						'name'  => $category,
520 520
 						'count' => 0,
521 521
 					);
522
-				}
523
-
524
-				++self::$categories[ $category_slug ]['count'];
522
+				} ++self::$categories[$category_slug]['count'];
525 523
 			}
526 524
 
527 525
 			// Mark the template as favorite if it's in the favorite templates list.
@@ -536,7 +534,7 @@  discard block
 block discarded – undo
536 534
 		$redundant_cats = array_merge( array( 'PayPal', 'Stripe', 'Twilio' ), FrmFormsHelper::get_license_types() );
537 535
 		foreach ( $redundant_cats as $redundant_cat ) {
538 536
 			$category_slug = sanitize_title( $redundant_cat );
539
-			unset( self::$categories[ $category_slug ] );
537
+			unset( self::$categories[$category_slug] );
540 538
 		}
541 539
 
542 540
 		// Sort the categories by keys alphabetically.
@@ -561,7 +559,7 @@  discard block
 block discarded – undo
561 559
 				'count' => 0,
562 560
 			);
563 561
 		}
564
-		$special_categories['all-items']      = array(
562
+		$special_categories['all-items'] = array(
565 563
 			'name'  => __( 'All Templates', 'formidable' ),
566 564
 			'count' => self::get_template_count(),
567 565
 		);
@@ -584,9 +582,9 @@  discard block
 block discarded – undo
584 582
 	 */
585 583
 	private static function assign_featured_templates() {
586 584
 		foreach ( self::FEATURED_TEMPLATES_IDS as $key ) {
587
-			if ( isset( self::$templates[ $key ] ) ) {
588
-				self::$templates[ $key ]['is_featured'] = true;
589
-				self::$featured_templates[]             = self::$templates[ $key ];
585
+			if ( isset( self::$templates[$key] ) ) {
586
+				self::$templates[$key]['is_featured'] = true;
587
+				self::$featured_templates[]             = self::$templates[$key];
590 588
 			}
591 589
 		}
592 590
 	}
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/controllers/FrmStrpLiteActionsController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			$gateway   = $payment_action->post_content['gateway'];
73 73
 			$is_stripe = $gateway === 'stripe' || ( is_array( $gateway ) && in_array( 'stripe', $gateway, true ) );
74 74
 			if ( ! $is_stripe || empty( $payment_action->post_content['amount'] ) ) {
75
-				unset( $payment_actions[ $k ] );
75
+				unset( $payment_actions[$k] );
76 76
 			}
77 77
 		}
78 78
 		return $payment_actions;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			'run_triggers' => false,
110 110
 			'show_errors'  => true,
111 111
 		);
112
-		$atts     = compact( 'action', 'entry', 'form' );
112
+		$atts = compact( 'action', 'entry', 'form' );
113 113
 
114 114
 		$amount = self::prepare_amount( $action->post_content['amount'], $atts );
115 115
 		if ( empty( $amount ) || $amount == 000 ) {
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 
297 297
 		// Gateway is a radio button but it should always be an array in the database for
298 298
 		// compatibility with the payments submodule where it is a checkbox.
299
-		$settings['gateway']  = ! empty( $settings['gateway'] ) ? (array) $settings['gateway'] : array( 'stripe' );
299
+		$settings['gateway'] = ! empty( $settings['gateway'] ) ? (array) $settings['gateway'] : array( 'stripe' );
300 300
 
301 301
 		$is_stripe = in_array( 'stripe', $settings['gateway'], true );
302 302
 		if ( ! $is_stripe ) {
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 		$disallowed = array( ';', ':', '!important' );
488 488
 		foreach ( $settings as $k => $s ) {
489 489
 			if ( is_string( $s ) ) {
490
-				$settings[ $k ] = str_replace( $disallowed, '', $s );
490
+				$settings[$k] = str_replace( $disallowed, '', $s );
491 491
 			}
492 492
 		}
493 493
 
@@ -611,18 +611,18 @@  discard block
 block discarded – undo
611 611
 	 * @return array
612 612
 	 */
613 613
 	public static function remove_cc_validation( $errors, $field, $values ) {
614
-		$has_processed = isset( $_POST[ 'frmintent' . $field->form_id ] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
614
+		$has_processed = isset( $_POST['frmintent' . $field->form_id] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
615 615
 		if ( ! $has_processed ) {
616 616
 			return $errors;
617 617
 		}
618 618
 
619 619
 		$field_id = $field->temp_id ?? $field->id;
620 620
 
621
-		if ( isset( $errors[ 'field' . $field_id . '-cc' ] ) ) {
622
-			unset( $errors[ 'field' . $field_id . '-cc' ] );
621
+		if ( isset( $errors['field' . $field_id . '-cc'] ) ) {
622
+			unset( $errors['field' . $field_id . '-cc'] );
623 623
 		}
624
-		if ( isset( $errors[ 'field' . $field_id ] ) ) {
625
-			unset( $errors[ 'field' . $field_id ] );
624
+		if ( isset( $errors['field' . $field_id] ) ) {
625
+			unset( $errors['field' . $field_id] );
626 626
 		}
627 627
 
628 628
 		return $errors;
Please login to merge, or discard this patch.