Completed
Pull Request — master (#2579)
by
unknown
41s
created
classes/helpers/FrmSerializedStringParserHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,12 +89,12 @@
 block discarded – undo
89 89
 		$string->skip_next_character();
90 90
 
91 91
 		$val = array();
92
-		for ( $i = 0; $i < $count; $i++ ) {
92
+		for ( $i = 0; $i < $count; $i ++ ) {
93 93
 			$array_key   = $this->do_parse( $string );
94 94
 			$array_value = $this->do_parse( $string );
95 95
 
96 96
 			if ( ! is_array( $array_key ) ) {
97
-				$val[ $array_key ] = $array_value;
97
+				$val[$array_key] = $array_value;
98 98
 			}
99 99
 		}
100 100
 
Please login to merge, or discard this patch.
classes/helpers/FrmStringReaderHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	public function read_until( $char ) {
52 52
 		$value = '';
53
-		while ( $this->pos <= $this->max && ( $one = $this->string[ $this->pos++ ] ) !== $char ) {
53
+		while ( $this->pos <= $this->max && ( $one = $this->string[$this->pos ++] ) !== $char ) {
54 54
 			$value .= $one;
55 55
 		}
56 56
 		return $value;
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
 	public function read( $count ) {
68 68
 		$value = '';
69 69
 
70
-		while ( $count > 0 && $this->pos <= $this->max && ( ( $one = $this->string[ $this->pos ] ) || '0' === $one ) ) {
70
+		while ( $count > 0 && $this->pos <= $this->max && ( ( $one = $this->string[$this->pos] ) || '0' === $one ) ) {
71 71
 			$value     .= $one;
72 72
 			$this->pos += 1;
73
-			--$count;
73
+			-- $count;
74 74
 		}
75 75
 
76 76
 		/**
Please login to merge, or discard this patch.
classes/models/FrmFieldTypeOptionData.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
19 19
 	 * @return array
20 20
 	 */
21 21
 	public static function get_field_types( $type ) {
22
-		if ( ! isset( self::$data[ $type ] ) ) {
23
-			self::$data[ $type ] = FrmFieldsHelper::get_field_types( $type );
22
+		if ( ! isset( self::$data[$type] ) ) {
23
+			self::$data[$type] = FrmFieldsHelper::get_field_types( $type );
24 24
 		}
25
-		return self::$data[ $type ];
25
+		return self::$data[$type];
26 26
 	}
27 27
 }
Please login to merge, or discard this patch.
stripe/controllers/FrmStrpLiteEventsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 		// Flag to cancel subscription at period end.
280 280
 		// In this case, we do not want to cancel immediately.
281 281
 		$hook   = 'frm_stripe_cancel_subscription_at_period_end';
282
-		$filter = function () {
282
+		$filter = function() {
283 283
 			return true;
284 284
 		};
285 285
 
@@ -534,8 +534,8 @@  discard block
 block discarded – undo
534 534
 			'charge.refunded'               => 'refunded',
535 535
 		);
536 536
 
537
-		if ( isset( $events[ $this->event->type ] ) ) {
538
-			$this->status = $events[ $this->event->type ];
537
+		if ( isset( $events[$this->event->type] ) ) {
538
+			$this->status = $events[$this->event->type];
539 539
 			$this->set_payment_status();
540 540
 		} elseif ( $this->event->type === 'customer.deleted' ) {
541 541
 			$this->reset_customer();
Please login to merge, or discard this patch.
classes/models/FrmDb.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -314,8 +314,8 @@  discard block
 block discarded – undo
314 314
 		);
315 315
 
316 316
 		$where_is = strtolower( $where_is );
317
-		if ( isset( $switch_to[ $where_is ] ) ) {
318
-			return ' ' . $switch_to[ $where_is ];
317
+		if ( isset( $switch_to[$where_is] ) ) {
318
+			return ' ' . $switch_to[$where_is];
319 319
 		}
320 320
 
321 321
 		// > and < need a little more work since we don't want them switched to >= and <=
@@ -380,13 +380,13 @@  discard block
 block discarded – undo
380 380
 		$temp_args = $args;
381 381
 		foreach ( $temp_args as $k => $v ) {
382 382
 			if ( $v == '' ) {
383
-				unset( $args[ $k ] );
383
+				unset( $args[$k] );
384 384
 				continue;
385 385
 			}
386 386
 
387 387
 			$db_name = strtoupper( str_replace( '_', ' ', $k ) );
388 388
 			if ( strpos( $v, $db_name ) === false ) {
389
-				$args[ $k ] = $db_name . ' ' . $v;
389
+				$args[$k] = $db_name . ' ' . $v;
390 390
 			}
391 391
 		}
392 392
 
@@ -460,13 +460,13 @@  discard block
 block discarded – undo
460 460
 	private static function esc_query_args( &$args ) {
461 461
 		foreach ( $args as $param => $value ) {
462 462
 			if ( $param === 'order_by' ) {
463
-				$args[ $param ] = self::esc_order( $value );
463
+				$args[$param] = self::esc_order( $value );
464 464
 			} elseif ( $param === 'limit' ) {
465
-				$args[ $param ] = self::esc_limit( $value );
465
+				$args[$param] = self::esc_limit( $value );
466 466
 			}
467 467
 
468
-			if ( $args[ $param ] == '' ) {
469
-				unset( $args[ $param ] );
468
+			if ( $args[$param] == '' ) {
469
+				unset( $args[$param] );
470 470
 			}
471 471
 		}
472 472
 	}
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 		$limit = explode( ',', trim( $limit ) );
549 549
 		foreach ( $limit as $k => $l ) {
550 550
 			if ( is_numeric( $l ) ) {
551
-				$limit[ $k ] = $l;
551
+				$limit[$k] = $l;
552 552
 			}
553 553
 		}
554 554
 
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
 	 */
702 702
 	public static function add_key_to_group_cache( $key, $group ) {
703 703
 		$cached         = self::get_group_cached_keys( $group );
704
-		$cached[ $key ] = $key;
704
+		$cached[$key] = $key;
705 705
 		wp_cache_set( 'cached_keys', $cached, $group, 300 );
706 706
 	}
707 707
 
Please login to merge, or discard this patch.
classes/models/fields/FrmFieldText.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 		$max_length = intval( FrmField::get_option( $this->field, 'max' ) );
43 43
 
44 44
 		if ( $max_length && FrmAppHelper::mb_function( array( 'mb_strlen', 'strlen' ), array( $args['value'] ) ) > $max_length ) {
45
-			$errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
45
+			$errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
46 46
 		}
47 47
 
48 48
 		return $errors;
Please login to merge, or discard this patch.
classes/views/styles/components/templates/slider.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -137,10 +137,13 @@  discard block
 block discarded – undo
137 137
 		</div>
138 138
 		<input type="hidden" <?php echo esc_attr( $field_name ); ?> value="<?php echo esc_attr( $field_value ); ?>" id="<?php echo esc_attr( $component['id'] ); ?>" />
139 139
 	</div>
140
-<?php else : ?>
140
+<?php else {
141
+	: ?>
141 142
 	<div>
142 143
 		<?php if ( empty( $component['independent_fields'] ) ) : ?>
143
-			<div class="frm-slider-component <?php echo esc_attr( $component_class ); ?>" <?php echo esc_attr( $component_attr ); ?> data-display-sliders="top,bottom" data-type="vertical" data-max-value="<?php echo (int) $component['max_value']; ?>">
144
+			<div class="frm-slider-component <?php echo esc_attr( $component_class );
145
+}
146
+?>" <?php echo esc_attr( $component_attr ); ?> data-display-sliders="top,bottom" data-type="vertical" data-max-value="<?php echo (int) $component['max_value']; ?>">
144 147
 				<div class="frm-flex-justify">
145 148
 					<div class="frm-slider-container">
146 149
 						<?php if ( ! empty( $component['icon'] ) ) : ?>
@@ -165,8 +168,11 @@  discard block
 block discarded – undo
165 168
 					</div>
166 169
 				</div>
167 170
 			</div>
168
-		<?php else : ?>
169
-			<div class="<?php echo esc_attr( $component_class ); ?>" <?php echo esc_attr( $component_attr ); ?> >
171
+		<?php else {
172
+	: ?>
173
+			<div class="<?php echo esc_attr( $component_class );
174
+}
175
+?>" <?php echo esc_attr( $component_attr ); ?> >
170 176
 				<div class="frm-slider-component frm-group-sliders frm-has-independent-fields" data-display-sliders="top,bottom" data-max-value="<?php echo (int) $component['max_value']; ?>">
171 177
 					<div class="frm-flex-justify">
172 178
 						<div class="frm-slider-container">
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
@@ -181,7 +181,7 @@
 block discarded – undo
181 181
 				$has_field  = true;
182 182
 				$key_exists = array_key_exists( $field_atts['name'], $form_atts['form_action']->post_content );
183 183
 				?>
184
-				<option value="<?php echo esc_attr( $field->id ); ?>" <?php selected( $key_exists ? $form_atts['form_action']->post_content[ $field_atts['name'] ] : 0, $field->id ); ?>>
184
+				<option value="<?php echo esc_attr( $field->id ); ?>" <?php selected( $key_exists ? $form_atts['form_action']->post_content[$field_atts['name']] : 0, $field->id ); ?>>
185 185
 					<?php
186 186
 					echo esc_attr( FrmAppHelper::truncate( $field->name, 50, 1 ) );
187 187
 
Please login to merge, or discard this patch.
stripe/helpers/FrmTransLiteListHelper.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 			'payments'      => $frm_payment->get_count(),
124 124
 			'subscriptions' => $frm_sub->get_count(),
125 125
 		);
126
-		$type        = FrmAppHelper::get_simple_request(
126
+		$type = FrmAppHelper::get_simple_request(
127 127
 			array(
128 128
 				'param'   => 'trans_type',
129 129
 				'type'    => 'request',
@@ -138,10 +138,10 @@  discard block
 block discarded – undo
138 138
 				$class = '';
139 139
 			}
140 140
 
141
-			if ( $counts[ $status ] || 'published' === $status ) {
142
-				$links[ $status ] = '<a href="' . esc_url( '?page=formidable-payments&trans_type=' . $status ) . '" ' . $class . '>'
141
+			if ( $counts[$status] || 'published' === $status ) {
142
+				$links[$status] = '<a href="' . esc_url( '?page=formidable-payments&trans_type=' . $status ) . '" ' . $class . '>'
143 143
 					// translators: %1$s: Transaction type (Payments or Subscriptions), %2$s: Span start tag, %3$s: Count, %4$s: Span close tag.
144
-					. sprintf( esc_html__( '%1$s %2$s(%3$s)%4$s', 'formidable' ), esc_html( $name ), '<span class="count">', number_format_i18n( $counts[ $status ] ), '</span>' )
144
+					. sprintf( esc_html__( '%1$s %2$s(%3$s)%4$s', 'formidable' ), esc_html( $name ), '<span class="count">', number_format_i18n( $counts[$status] ), '</span>' )
145 145
 					. '</a>';
146 146
 			}
147 147
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 			echo '<tr id="payment-' . esc_attr( $item->id ) . '" ';
219 219
 
220 220
 			$is_alternate = 0 === $alt % 2;
221
-			++$alt;
221
+			++ $alt;
222 222
 
223 223
 			if ( $is_alternate ) {
224 224
 				echo 'class="alternate"';
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 
310 310
 		$form_ids = array();
311 311
 		foreach ( $forms as $form ) {
312
-			$form_ids[ $form->id ] = $form;
312
+			$form_ids[$form->id] = $form;
313 313
 			unset( $form );
314 314
 		}
315 315
 
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 			'href'  => esc_url( $link ),
361 361
 			'title' => __( 'View', 'formidable' ),
362 362
 		);
363
-		$link        = '<a ' . FrmAppHelper::array_to_html_params( $link_params ) . '>'
363
+		$link = '<a ' . FrmAppHelper::array_to_html_params( $link_params ) . '>'
364 364
 			. $item->{$field}
365 365
 			. '</a>';
366 366
 
@@ -415,8 +415,8 @@  discard block
 block discarded – undo
415 415
 	 * @return mixed
416 416
 	 */
417 417
 	private function get_form_id_column( $item, $atts ) {
418
-		if ( isset( $atts['form_ids'][ $item->item_id ] ) ) {
419
-			$form_link = FrmFormsHelper::edit_form_link( $atts['form_ids'][ $item->item_id ]->form_id );
418
+		if ( isset( $atts['form_ids'][$item->item_id] ) ) {
419
+			$form_link = FrmFormsHelper::edit_form_link( $atts['form_ids'][$item->item_id]->form_id );
420 420
 			return $form_link;
421 421
 		}
422 422
 
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
 	 */
492 492
 	private function get_processing_tooltip() {
493 493
 		return FrmAppHelper::clip(
494
-			function () {
494
+			function() {
495 495
 				FrmAppHelper::tooltip_icon( __( 'This payment method may take between 4-5 business days to process.', 'formidable' ) );
496 496
 			}
497 497
 		);
Please login to merge, or discard this patch.