Completed
Pull Request — master (#2678)
by
unknown
46s
created
paypal/controllers/FrmPayPalLiteActionsController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -559,7 +559,7 @@
 block discarded – undo
559 559
 	 * @return array
560 560
 	 */
561 561
 	public static function remove_cc_validation( $errors, $field, $values ) {
562
-        // TODO
562
+		// TODO
563 563
 		$has_processed = false;
564 564
 
565 565
 		if ( ! $has_processed ) {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 			$is_paypal = $gateway === 'paypal' || ( is_array( $gateway ) && in_array( 'paypal', $gateway, true ) );
84 84
 
85 85
 			if ( ! $is_paypal || 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
 
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
 
485 485
 		foreach ( $settings as $k => $s ) {
486 486
 			if ( is_string( $s ) ) {
487
-				$settings[ $k ] = str_replace( $disallowed, '', $s );
487
+				$settings[$k] = str_replace( $disallowed, '', $s );
488 488
 			}
489 489
 		}
490 490
 
@@ -568,12 +568,12 @@  discard block
 block discarded – undo
568 568
 
569 569
 		$field_id = $field->temp_id ?? $field->id;
570 570
 
571
-		if ( isset( $errors[ 'field' . $field_id . '-cc' ] ) ) {
572
-			unset( $errors[ 'field' . $field_id . '-cc' ] );
571
+		if ( isset( $errors['field' . $field_id . '-cc'] ) ) {
572
+			unset( $errors['field' . $field_id . '-cc'] );
573 573
 		}
574 574
 
575
-		if ( isset( $errors[ 'field' . $field_id ] ) ) {
576
-			unset( $errors[ 'field' . $field_id ] );
575
+		if ( isset( $errors['field' . $field_id] ) ) {
576
+			unset( $errors['field' . $field_id] );
577 577
 		}
578 578
 
579 579
 		return $errors;
Please login to merge, or discard this patch.
paypal/controllers/FrmPayPalLiteAppController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
 				if ( is_array( $v ) ) {
153 153
 					foreach ( $v as $f => $value ) {
154 154
 						FrmAppHelper::sanitize_value( 'wp_kses_post', $value );
155
-						$entry->metas[ absint( $f ) ] = $value;
155
+						$entry->metas[absint( $f )] = $value;
156 156
 					}
157 157
 				}
158 158
 			} else {
Please login to merge, or discard this patch.
paypal/models/FrmPayPalLiteSettings.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.
paypal/helpers/FrmPayPalLiteConnectHelper.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
 					<?php
78 78
 
79 79
 					$connected = (bool) self::get_merchant_id( $mode );
80
-                    $tag_classes = $connected ? 'frm-lt-green-tag' : 'frm-grey-tag';
80
+					$tag_classes = $connected ? 'frm-lt-green-tag' : 'frm-grey-tag';
81 81
 					?>
82 82
 					<div class="frm-meta-tag <?php echo esc_attr( $tag_classes ); ?>" style="font-size: var(--text-sm); font-weight: 600;">
83 83
 						<?php
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@
 block discarded – undo
169 169
 	 * @return object|string
170 170
 	 */
171 171
 	private static function post_to_connect_server( $action, $additional_body = array() ) {
172
-		$body    = array(
172
+		$body = array(
173 173
 			'frm_paypal_api_action' => $action,
174 174
 			'frm_paypal_api_mode'   => FrmPayPalLiteAppHelper::active_mode(),
175 175
 		);
Please login to merge, or discard this patch.