Completed
Pull Request — master (#1356)
by Stephanie
59s
created
stripe/controllers/FrmStrpLiteEventsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -464,8 +464,8 @@
 block discarded – undo
464 464
 			'charge.refunded'               => 'refunded',
465 465
 		);
466 466
 
467
-		if ( isset( $events[ $this->event->type ] ) ) {
468
-			$this->status = $events[ $this->event->type ];
467
+		if ( isset( $events[$this->event->type] ) ) {
468
+			$this->status = $events[$this->event->type];
469 469
 			$this->set_payment_status();
470 470
 		} elseif ( $this->event->type === 'customer.deleted' ) {
471 471
 			$this->reset_customer();
Please login to merge, or discard this patch.
stripe/controllers/FrmTransLiteListsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
 			'sort'   => '',
101 101
 			'sdir'   => '',
102 102
 		) as $var => $default ) {
103
-			$values[ $var ] = FrmAppHelper::get_param( $var, $default );
103
+			$values[$var] = FrmAppHelper::get_param( $var, $default );
104 104
 		}
105 105
 
106 106
 		return $values;
Please login to merge, or discard this patch.
stripe/controllers/FrmStrpLiteActionsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 			$gateway   = $payment_action->post_content['gateway'];
48 48
 			$is_stripe = $gateway === 'stripe' || ( is_array( $gateway ) && in_array( 'stripe', $gateway, true ) );
49 49
 			if ( ! $is_stripe || empty( $payment_action->post_content['amount'] ) ) {
50
-				unset( $payment_actions[ $k ] );
50
+				unset( $payment_actions[$k] );
51 51
 			}
52 52
 		}
53 53
 		return $payment_actions;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 			'run_triggers' => false,
88 88
 			'show_errors'  => true,
89 89
 		);
90
-		$atts     = compact( 'action', 'entry', 'form' );
90
+		$atts = compact( 'action', 'entry', 'form' );
91 91
 
92 92
 		$amount = self::prepare_amount( $action->post_content['amount'], $atts );
93 93
 		if ( empty( $amount ) || $amount == 000 ) {
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 		$disallowed = array( ';', ':', '!important' );
509 509
 		foreach ( $settings as $k => $s ) {
510 510
 			if ( is_string( $s ) ) {
511
-				$settings[ $k ] = str_replace( $disallowed, '', $s );
511
+				$settings[$k] = str_replace( $disallowed, '', $s );
512 512
 			}
513 513
 		}
514 514
 
Please login to merge, or discard this patch.
stripe/models/FrmStrpLiteSettings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,8 @@
 block discarded – undo
84 84
 		$settings = $this->default_options();
85 85
 
86 86
 		foreach ( $settings as $setting => $default ) {
87
-			if ( isset( $params[ 'frm_' . $this->param() . '_' . $setting ] ) ) {
88
-				$this->settings->{$setting} = trim( sanitize_text_field( $params[ 'frm_' . $this->param() . '_' . $setting ] ) );
87
+			if ( isset( $params['frm_' . $this->param() . '_' . $setting] ) ) {
88
+				$this->settings->{$setting} = trim( sanitize_text_field( $params['frm_' . $this->param() . '_' . $setting] ) );
89 89
 			}
90 90
 		}
91 91
 
Please login to merge, or discard this patch.
stripe/models/FrmTransLiteAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
 				$has_field  = true;
166 166
 				$key_exists = array_key_exists( $field_atts['name'], $form_atts['form_action']->post_content );
167 167
 				?>
168
-				<option value="<?php echo esc_attr( $field->id ); ?>" <?php selected( $key_exists ? $form_atts['form_action']->post_content[ $field_atts['name'] ] : 0, $field->id ); ?>>
168
+				<option value="<?php echo esc_attr( $field->id ); ?>" <?php selected( $key_exists ? $form_atts['form_action']->post_content[$field_atts['name']] : 0, $field->id ); ?>>
169 169
 					<?php echo esc_attr( FrmAppHelper::truncate( $field->name, 50, 1 ) ); ?>
170 170
 				</option>
171 171
 				<?php
Please login to merge, or discard this patch.
stripe/models/FrmStrpLitePaymentTypeHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@
 block discarded – undo
34 34
 	 * @return string[] An empty array is treated as automatic.
35 35
 	 */
36 36
 	public static function get_payment_method_types( $action ) {
37
-		if ( ! isset( self::$types_by_action_id[ $action->ID ] ) ) {
38
-			self::$types_by_action_id[ $action->ID ] = self::get_filtered_payment_method_types( $action );
37
+		if ( ! isset( self::$types_by_action_id[$action->ID] ) ) {
38
+			self::$types_by_action_id[$action->ID] = self::get_filtered_payment_method_types( $action );
39 39
 		}
40
-		return self::$types_by_action_id[ $action->ID ];
40
+		return self::$types_by_action_id[$action->ID];
41 41
 	}
42 42
 
43 43
 	/**
Please login to merge, or discard this patch.
stripe/models/FrmTransLiteDb.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -261,14 +261,14 @@
 block discarded – undo
261 261
 	private function fill_values( $values, &$new_values ) {
262 262
 		$defaults = $this->get_defaults();
263 263
 		foreach ( $defaults as $val => $default ) {
264
-			if ( isset( $values[ $val ] ) ) {
264
+			if ( isset( $values[$val] ) ) {
265 265
 				if ( $default['sanitize'] === 'float' ) {
266
-					$new_values[ $val ] = (float) $values[ $val ];
266
+					$new_values[$val] = (float) $values[$val];
267 267
 				} elseif ( ! empty( $default['sanitize'] ) ) {
268
-					$new_values[ $val ] = call_user_func( $default['sanitize'], $values[ $val ] );
268
+					$new_values[$val] = call_user_func( $default['sanitize'], $values[$val] );
269 269
 				}
270 270
 			} elseif ( $values['action'] === 'create' ) {
271
-				$new_values[ $val ] = $default['default'];
271
+				$new_values[$val] = $default['default'];
272 272
 			}
273 273
 		}
274 274
 	}
Please login to merge, or discard this patch.
stripe/helpers/FrmStrpLiteConnectHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 			'user_id'               => get_current_user_id(),
109 109
 			'frm_strp_connect_mode' => $mode,
110 110
 		);
111
-		$data            = self::post_to_connect_server( 'initialize', $additional_body );
111
+		$data = self::post_to_connect_server( 'initialize', $additional_body );
112 112
 
113 113
 		if ( is_string( $data ) ) {
114 114
 			return $data;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	 * @return object|string
146 146
 	 */
147 147
 	private static function post_to_connect_server( $action, $additional_body = array() ) {
148
-		$body    = array(
148
+		$body = array(
149 149
 			'frm_strp_connect_action' => $action,
150 150
 			'frm_strp_connect_mode'   => FrmStrpLiteAppHelper::active_mode(),
151 151
 		);
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 		$site_url = home_url();
497 497
 		$site_url = self::maybe_fix_wpml_url( $site_url );
498 498
 		$site_url = preg_replace( '#^https?://#', '', $site_url ); // remove protocol from url (our url cannot include the colon).
499
-		$site_url = preg_replace( '/:[0-9]+/', '', $site_url );    // remove port from url (mostly helpful in development)
499
+		$site_url = preg_replace( '/:[0-9]+/', '', $site_url ); // remove port from url (mostly helpful in development)
500 500
 		$site_url = self::strip_lang_from_url( $site_url );
501 501
 
502 502
 		// $password is either a Pro license or a uuid (See FrmUsage::uuid).
Please login to merge, or discard this patch.
stripe/helpers/FrmTransLiteAppHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 */
35 35
 	public static function show_status( $status ) {
36 36
 		$statuses = array_merge( self::get_payment_statuses(), self::get_subscription_statuses() );
37
-		return isset( $statuses[ $status ] ) ? $statuses[ $status ] : $status;
37
+		return isset( $statuses[$status] ) ? $statuses[$status] : $status;
38 38
 	}
39 39
 
40 40
 	/**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 */
120 120
 	public static function get_action_setting( $option, $atts ) {
121 121
 		$settings = self::get_action_settings( $atts );
122
-		$value    = isset( $settings[ $option ] ) ? $settings[ $option ] : '';
122
+		$value    = isset( $settings[$option] ) ? $settings[$option] : '';
123 123
 		return $value;
124 124
 	}
125 125
 
@@ -222,8 +222,8 @@  discard block
 block discarded – undo
222 222
 	 */
223 223
 	public static function get_repeat_label_from_value( $value, $number ) {
224 224
 		$times = self::get_plural_repeat_times( $number );
225
-		if ( isset( $times[ $value ] ) ) {
226
-			$value = $times[ $value ];
225
+		if ( isset( $times[$value] ) ) {
226
+			$value = $times[$value];
227 227
 		}
228 228
 		return $value;
229 229
 	}
Please login to merge, or discard this patch.