Completed
Pull Request — master (#1517)
by Stephanie
01:09
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/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/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.
stripe/helpers/FrmTransLiteListHelper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 			'payments'      => $frm_payment->get_count(),
113 113
 			'subscriptions' => $frm_sub->get_count(),
114 114
 		);
115
-		$type        = FrmAppHelper::get_simple_request(
115
+		$type = FrmAppHelper::get_simple_request(
116 116
 			array(
117 117
 				'param'   => 'trans_type',
118 118
 				'type'    => 'request',
@@ -127,10 +127,10 @@  discard block
 block discarded – undo
127 127
 				$class = '';
128 128
 			}
129 129
 
130
-			if ( $counts[ $status ] || 'published' === $status ) {
131
-				$links[ $status ] = '<a href="' . esc_url( '?page=formidable-payments&trans_type=' . $status ) . '" ' . $class . '>'
130
+			if ( $counts[$status] || 'published' === $status ) {
131
+				$links[$status] = '<a href="' . esc_url( '?page=formidable-payments&trans_type=' . $status ) . '" ' . $class . '>'
132 132
 					// translators: %1$s: Transaction type (Payments or Subscriptions), %2$s: Span start tag, %3$s: Count, %3$s: Span close tag.
133
-					. sprintf( esc_html__( '%1$s %2$s(%3$s)%4$s', 'formidable' ), esc_html( $name ), '<span class="count">', number_format_i18n( $counts[ $status ] ), '</span>' )
133
+					. sprintf( esc_html__( '%1$s %2$s(%3$s)%4$s', 'formidable' ), esc_html( $name ), '<span class="count">', number_format_i18n( $counts[$status] ), '</span>' )
134 134
 					. '</a>';
135 135
 			}
136 136
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 			echo '<tr id="payment-' . esc_attr( $item->id ) . '" ';
207 207
 
208 208
 			$is_alternate = 0 === $alt % 2;
209
-			$alt++;
209
+			$alt ++;
210 210
 
211 211
 			if ( $is_alternate ) {
212 212
 				echo 'class="alternate"';
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 
296 296
 		$form_ids = array();
297 297
 		foreach ( $forms as $form ) {
298
-			$form_ids[ $form->id ] = $form;
298
+			$form_ids[$form->id] = $form;
299 299
 			unset( $form );
300 300
 		}
301 301
 
@@ -395,8 +395,8 @@  discard block
 block discarded – undo
395 395
 	 * @return mixed
396 396
 	 */
397 397
 	private function get_form_id_column( $item, $atts ) {
398
-		if ( isset( $atts['form_ids'][ $item->item_id ] ) ) {
399
-			$form_link = FrmFormsHelper::edit_form_link( $atts['form_ids'][ $item->item_id ]->form_id );
398
+		if ( isset( $atts['form_ids'][$item->item_id] ) ) {
399
+			$form_link = FrmFormsHelper::edit_form_link( $atts['form_ids'][$item->item_id]->form_id );
400 400
 			return $form_link;
401 401
 		}
402 402
 
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
 
453 453
 		foreach ( $completed_payments as $completed_payment ) {
454 454
 			if ( $completed_payment->status === 'complete' ) {
455
-				$count++;
455
+				$count ++;
456 456
 			}
457 457
 		}
458 458
 
Please login to merge, or discard this patch.
stripe/controllers/FrmTransLiteSubscriptionsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 			'canceled' => __( 'Canceled', 'formidable' ),
70 70
 			'confirm'  => __( 'Are you sure you want to cancel that subscription?', 'formidable' ),
71 71
 		);
72
-		$atts     = array_merge( $defaults, $atts );
72
+		$atts = array_merge( $defaults, $atts );
73 73
 
74 74
 		if ( $sub->status === 'active' ) {
75 75
 			$link  = admin_url( 'admin-ajax.php?action=frm_trans_cancel&sub=' . $sub->id . '&nonce=' . wp_create_nonce( 'frm_trans_ajax' ) );
Please login to merge, or discard this patch.