Completed
Pull Request — master (#2602)
by
unknown
01:10 queued 25s
created
square/controllers/FrmSquareLiteActionsController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 			$gateway   = $payment_action->post_content['gateway'];
77 77
 			$is_square = $gateway === 'square' || ( is_array( $gateway ) && in_array( 'square', $gateway, true ) );
78 78
 			if ( ! $is_square || empty( $payment_action->post_content['amount'] ) ) {
79
-				unset( $payment_actions[ $k ] );
79
+				unset( $payment_actions[$k] );
80 80
 			}
81 81
 		}
82 82
 		return $payment_actions;
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 			'run_triggers' => false,
98 98
 			'show_errors'  => true,
99 99
 		);
100
-		$atts     = compact( 'action', 'entry', 'form' );
100
+		$atts = compact( 'action', 'entry', 'form' );
101 101
 
102 102
 		$amount = self::prepare_amount( $action->post_content['amount'], $atts );
103 103
 		if ( empty( $amount ) || $amount == 000 ) {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 				'value' => $atts['action']->post_content['description'],
150 150
 			)
151 151
 		);
152
-		$result             = FrmSquareLiteConnectHelper::create_payment( $atts['amount'], $currency, $square_token, $verification_token, $description );
152
+		$result = FrmSquareLiteConnectHelper::create_payment( $atts['amount'], $currency, $square_token, $verification_token, $description );
153 153
 
154 154
 		if ( false === $result ) {
155 155
 			return FrmSquareLiteConnectHelper::get_latest_error_from_square_api();
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
 			false
520 520
 		);
521 521
 
522
-		$square_vars     = array(
522
+		$square_vars = array(
523 523
 			'formId'     => $form_id,
524 524
 			'nonce'      => wp_create_nonce( 'frm_square_ajax' ),
525 525
 			'ajax'       => esc_url_raw( FrmAppHelper::get_ajax_url() ),
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
 		$disallowed = array( ';', ':', '!important' );
637 637
 		foreach ( $settings as $k => $s ) {
638 638
 			if ( is_string( $s ) ) {
639
-				$settings[ $k ] = str_replace( $disallowed, '', $s );
639
+				$settings[$k] = str_replace( $disallowed, '', $s );
640 640
 			}
641 641
 		}
642 642
 
@@ -662,11 +662,11 @@  discard block
 block discarded – undo
662 662
 
663 663
 		$field_id = $field->temp_id ?? $field->id;
664 664
 
665
-		if ( isset( $errors[ 'field' . $field_id . '-cc' ] ) ) {
666
-			unset( $errors[ 'field' . $field_id . '-cc' ] );
665
+		if ( isset( $errors['field' . $field_id . '-cc'] ) ) {
666
+			unset( $errors['field' . $field_id . '-cc'] );
667 667
 		}
668
-		if ( isset( $errors[ 'field' . $field_id ] ) ) {
669
-			unset( $errors[ 'field' . $field_id ] );
668
+		if ( isset( $errors['field' . $field_id] ) ) {
669
+			unset( $errors['field' . $field_id] );
670 670
 		}
671 671
 
672 672
 		return $errors;
Please login to merge, or discard this patch.