Completed
Pull Request — master (#2081)
by
unknown
39s
created
stripe/controllers/FrmStrpLiteActionsController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 			$gateway   = $payment_action->post_content['gateway'];
50 50
 			$is_stripe = $gateway === 'stripe' || ( is_array( $gateway ) && in_array( 'stripe', $gateway, true ) );
51 51
 			if ( ! $is_stripe || empty( $payment_action->post_content['amount'] ) ) {
52
-				unset( $payment_actions[ $k ] );
52
+				unset( $payment_actions[$k] );
53 53
 			}
54 54
 		}
55 55
 		return $payment_actions;
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 			'run_triggers' => false,
87 87
 			'show_errors'  => true,
88 88
 		);
89
-		$atts     = compact( 'action', 'entry', 'form' );
89
+		$atts = compact( 'action', 'entry', 'form' );
90 90
 
91 91
 		$amount = self::prepare_amount( $action->post_content['amount'], $atts );
92 92
 		if ( empty( $amount ) || $amount == 000 ) {
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 	 *
466 466
 	 * @return bool
467 467
 	 */
468
-	private static function should_load_stripe_script(){
468
+	private static function should_load_stripe_script() {
469 469
 		if ( self::$has_loaded_stripe_script ) {
470 470
 			return false;
471 471
 		}
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
 		$disallowed = array( ';', ':', '!important' );
571 571
 		foreach ( $settings as $k => $s ) {
572 572
 			if ( is_string( $s ) ) {
573
-				$settings[ $k ] = str_replace( $disallowed, '', $s );
573
+				$settings[$k] = str_replace( $disallowed, '', $s );
574 574
 			}
575 575
 		}
576 576
 
@@ -642,18 +642,18 @@  discard block
 block discarded – undo
642 642
 	 * @return array
643 643
 	 */
644 644
 	public static function remove_cc_validation( $errors, $field, $values ) {
645
-		$has_processed = isset( $_POST[ 'frmintent' . $field->form_id ] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
645
+		$has_processed = isset( $_POST['frmintent' . $field->form_id] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
646 646
 		if ( ! $has_processed ) {
647 647
 			return $errors;
648 648
 		}
649 649
 
650 650
 		$field_id = isset( $field->temp_id ) ? $field->temp_id : $field->id;
651 651
 
652
-		if ( isset( $errors[ 'field' . $field_id . '-cc' ] ) ) {
653
-			unset( $errors[ 'field' . $field_id . '-cc' ] );
652
+		if ( isset( $errors['field' . $field_id . '-cc'] ) ) {
653
+			unset( $errors['field' . $field_id . '-cc'] );
654 654
 		}
655
-		if ( isset( $errors[ 'field' . $field_id ] ) ) {
656
-			unset( $errors[ 'field' . $field_id ] );
655
+		if ( isset( $errors['field' . $field_id] ) ) {
656
+			unset( $errors['field' . $field_id] );
657 657
 		}
658 658
 
659 659
 		return $errors;
Please login to merge, or discard this patch.