Completed
Pull Request — master (#2241)
by
unknown
38s
created
stripe/helpers/FrmStrpLiteUrlParamHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
 	 * @return array|false
24 24
 	 */
25 25
 	public static function get_details_for_form( $form_id ) {
26
-		if ( ! isset( self::$details_by_form_id[ $form_id ] ) ) {
26
+		if ( ! isset( self::$details_by_form_id[$form_id] ) ) {
27 27
 			self::set_details_for_form( (int) $form_id );
28 28
 		}
29
-		return isset( self::$details_by_form_id[ $form_id ] ) ? self::$details_by_form_id[ $form_id ] : false;
29
+		return isset( self::$details_by_form_id[$form_id] ) ? self::$details_by_form_id[$form_id] : false;
30 30
 	}
31 31
 
32 32
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 			return;
88 88
 		}
89 89
 
90
-		self::$details_by_form_id[ $form_id ] = array(
90
+		self::$details_by_form_id[$form_id] = array(
91 91
 			'entry'   => $entry,
92 92
 			'intent'  => $intent,
93 93
 			'payment' => $payment,
Please login to merge, or discard this patch.
classes/helpers/FrmCurrencyHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@
 block discarded – undo
16 16
 	public static function get_currency( $currency ) {
17 17
 		$currency   = strtoupper( $currency );
18 18
 		$currencies = self::get_currencies();
19
-		if ( isset( $currencies[ $currency ] ) ) {
20
-			$currency = $currencies[ $currency ];
21
-		} elseif ( isset( $currencies[ strtolower( $currency ) ] ) ) {
22
-			$currency = $currencies[ strtolower( $currency ) ];
19
+		if ( isset( $currencies[$currency] ) ) {
20
+			$currency = $currencies[$currency];
21
+		} elseif ( isset( $currencies[strtolower( $currency )] ) ) {
22
+			$currency = $currencies[strtolower( $currency )];
23 23
 		} else {
24 24
 			$currency = $currencies['USD'];
25 25
 		}
Please login to merge, or discard this patch.
classes/helpers/FrmTipsHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 			'page'  => '',
46 46
 			'class' => 'frm-mt-0',
47 47
 		);
48
-		$tip      = array_merge( $defaults, $tip );
48
+		$tip = array_merge( $defaults, $tip );
49 49
 
50 50
 		if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) ) {
51 51
 			$tip['link']['medium'] = 'tip';
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
 	 * @return array
373 373
 	 */
374 374
 	public static function get_banner_tip() {
375
-		$tips       = array(
375
+		$tips = array(
376 376
 			array(
377 377
 				'link' => array(
378 378
 					'medium'  => 'banner',
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 			),
400 400
 		);
401 401
 		$random     = rand( 0, count( $tips ) - 1 );
402
-		$tip        = $tips[ $random ];
402
+		$tip        = $tips[$random];
403 403
 		$tip['num'] = $random;
404 404
 
405 405
 		return $tip;
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 	public static function get_random_tip( $tips ) {
409 409
 		$random = rand( 0, count( $tips ) - 1 );
410 410
 
411
-		return $tips[ $random ];
411
+		return $tips[$random];
412 412
 	}
413 413
 
414 414
 	/**
Please login to merge, or discard this patch.
stripe/models/FrmTransLitePayment.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -126,11 +126,11 @@
 block discarded – undo
126 126
 		foreach ( $payments as $payment ) {
127 127
 			list( $amount, $currency ) = FrmTransLiteAppHelper::get_amount_and_currency_from_payment( $payment );
128 128
 
129
-			if ( ! isset( $data[ $currency ] ) ) {
130
-				$data[ $currency ] = 0;
129
+			if ( ! isset( $data[$currency] ) ) {
130
+				$data[$currency] = 0;
131 131
 			}
132 132
 
133
-			$data[ $currency ] += floatval( $amount );
133
+			$data[$currency] += floatval( $amount );
134 134
 		}
135 135
 
136 136
 		return $data;
Please login to merge, or discard this patch.
classes/helpers/FrmEmailSummaryHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -236,11 +236,11 @@  discard block
 block discarded – undo
236 236
 	 */
237 237
 	public static function get_last_sent_date( $type ) {
238 238
 		$options = self::get_options();
239
-		if ( empty( $options[ 'last_' . $type ] ) ) {
239
+		if ( empty( $options['last_' . $type] ) ) {
240 240
 			return false;
241 241
 		}
242 242
 
243
-		return $options[ 'last_' . $type ];
243
+		return $options['last_' . $type];
244 244
 	}
245 245
 
246 246
 	/**
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 	public static function set_last_sent_date( $type, $value = null ) {
253 253
 		$options = self::get_options();
254 254
 
255
-		$options[ 'last_' . $type ] = null === $value ? self::get_date_from_today() : '';
255
+		$options['last_' . $type] = null === $value ? self::get_date_from_today() : '';
256 256
 		self::save_options( $options );
257 257
 	}
258 258
 
Please login to merge, or discard this patch.
stripe/helpers/FrmStrpLiteConnectHelper.php 1 patch
Spacing   +2 added lines, -2 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;
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 * @return object|string
144 144
 	 */
145 145
 	private static function post_to_connect_server( $action, $additional_body = array() ) {
146
-		$body    = array(
146
+		$body = array(
147 147
 			'frm_strp_connect_action' => $action,
148 148
 			'frm_strp_connect_mode'   => FrmStrpLiteAppHelper::active_mode(),
149 149
 		);
Please login to merge, or discard this patch.
classes/views/frm-fields/front-end/checkbox-field.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,6 +87,6 @@
 block discarded – undo
87 87
 
88 88
 		?></div>
89 89
 <?php
90
-		++$option_index;
90
+		++ $option_index;
91 91
 	}//end foreach
92 92
 }//end if
Please login to merge, or discard this patch.
classes/views/frm-fields/front-end/combo-field/combo-field.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 			$sub_field_class   = "frm_form_field form-field frm_form_subfield-{$name} {$sub_field['wrapper_classes']}";
42 42
 			$sub_field_desc    = FrmField::get_option( $field, $name . '_desc' );
43 43
 
44
-			if ( isset( $errors[ 'field' . $field_id . '-' . $name ] ) ) {
44
+			if ( isset( $errors['field' . $field_id . '-' . $name] ) ) {
45 45
 				$sub_field_class .= ' frm_blank_field';
46 46
 			}
47 47
 			?>
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
 						<input
62 62
 							type="<?php echo esc_attr( $sub_field['type'] ); ?>"
63 63
 							id="<?php echo esc_attr( $html_id . '_' . $name ); ?>"
64
-							value="<?php echo esc_attr( isset( $field_value[ $name ] ) ? $field_value[ $name ] : '' ); ?>"
64
+							value="<?php echo esc_attr( isset( $field_value[$name] ) ? $field_value[$name] : '' ); ?>"
65 65
 							<?php
66
-							if ( ! empty( $field_value[ $name ] ) ) {
67
-								echo 'data-frmval="' . esc_attr( $field_value[ $name ] ) . '" ';
66
+							if ( ! empty( $field_value[$name] ) ) {
67
+								echo 'data-frmval="' . esc_attr( $field_value[$name] ) . '" ';
68 68
 							}
69 69
 							if ( empty( $args['remove_names'] ) ) {
70 70
 								echo 'name="' . esc_attr( $field_name ) . '[' . esc_attr( $name ) . ']" ';
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 				}
82 82
 
83 83
 				// Don't show individual field errors when there is a combo field error.
84
-				if ( ! empty( $errors ) && isset( $errors[ 'field' . $field_id . '-' . $name ] ) && ! isset( $errors[ 'field' . $field_id ] ) ) {
84
+				if ( ! empty( $errors ) && isset( $errors['field' . $field_id . '-' . $name] ) && ! isset( $errors['field' . $field_id] ) ) {
85 85
 					?>
86
-					<div class="frm_error" role="alert"><?php echo esc_html( $errors[ 'field' . $field_id . '-' . $name ] ); ?></div>
86
+					<div class="frm_error" role="alert"><?php echo esc_html( $errors['field' . $field_id . '-' . $name] ); ?></div>
87 87
 				<?php } ?>
88 88
 			</div>
89 89
 			<?php
Please login to merge, or discard this patch.
classes/controllers/FrmSettingsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 				$section['function'] = $original;
159 159
 			}
160 160
 
161
-			$sections[ $key ] = $section;
161
+			$sections[$key] = $section;
162 162
 		}//end foreach
163 163
 
164 164
 		return $sections;
@@ -170,11 +170,11 @@  discard block
 block discarded – undo
170 170
 
171 171
 		$section  = FrmAppHelper::get_post_param( 'tab', '', 'sanitize_text_field' );
172 172
 		$sections = self::get_settings_tabs();
173
-		if ( ! isset( $sections[ $section ] ) ) {
173
+		if ( ! isset( $sections[$section] ) ) {
174 174
 			wp_die();
175 175
 		}
176 176
 
177
-		$section = $sections[ $section ];
177
+		$section = $sections[$section];
178 178
 
179 179
 		if ( isset( $section['class'] ) ) {
180 180
 			call_user_func( array( $section['class'], $section['function'] ) );
Please login to merge, or discard this patch.