Completed
Pull Request — master (#2563)
by
unknown
43s
created
stripe/views/lists/tabs.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,11 @@
 block discarded – undo
28 28
 		<div class="<?php echo esc_attr( $classes ); ?>">
29 29
 			<?php if ( $is_active ) : ?>
30 30
 				<?php echo esc_html( $details['label'] ); ?>
31
-			<?php else : ?>
32
-				<a href="<?php echo esc_url( $details['url'] ); ?>">
31
+			<?php else {
32
+	: ?>
33
+				<a href="<?php echo esc_url( $details['url'] );
34
+}
35
+?>">
33 36
 					<?php echo esc_html( $details['label'] ); ?>
34 37
 				</a>
35 38
 			<?php endif; ?>
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
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 			'payments'      => $frm_payment->get_count(),
129 129
 			'subscriptions' => $frm_sub->get_count(),
130 130
 		);
131
-		$type        = FrmAppHelper::get_simple_request(
131
+		$type = FrmAppHelper::get_simple_request(
132 132
 			array(
133 133
 				'param'   => 'trans_type',
134 134
 				'type'    => 'request',
@@ -139,10 +139,10 @@  discard block
 block discarded – undo
139 139
 		foreach ( $statuses as $status => $name ) {
140 140
 			$class = $status === $type ? ' class="current"' : '';
141 141
 
142
-			if ( $counts[ $status ] || 'published' === $status ) {
143
-				$links[ $status ] = '<a href="' . esc_url( '?page=formidable-payments&trans_type=' . $status ) . '" ' . $class . '>'
142
+			if ( $counts[$status] || 'published' === $status ) {
143
+				$links[$status] = '<a href="' . esc_url( '?page=formidable-payments&trans_type=' . $status ) . '" ' . $class . '>'
144 144
 					// translators: %1$s: Transaction type (Payments or Subscriptions), %2$s: Span start tag, %3$s: Count, %4$s: Span close tag.
145
-					. 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
+					. sprintf( esc_html__( '%1$s %2$s(%3$s)%4$s', 'formidable' ), esc_html( $name ), '<span class="count">', number_format_i18n( $counts[$status] ), '</span>' )
146 146
 					. '</a>';
147 147
 			}
148 148
 
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 			echo '<tr id="payment-' . esc_attr( $item->id ) . '" ';
238 238
 
239 239
 			$is_alternate = 0 === $alt % 2;
240
-			++$alt;
240
+			++ $alt;
241 241
 
242 242
 			if ( $is_alternate ) {
243 243
 				echo 'class="alternate"';
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 		$form_ids = array();
348 348
 
349 349
 		foreach ( $forms as $form ) {
350
-			$form_ids[ $form->id ] = $form;
350
+			$form_ids[$form->id] = $form;
351 351
 			unset( $form );
352 352
 		}
353 353
 
@@ -500,8 +500,8 @@  discard block
 block discarded – undo
500 500
 	 * @return mixed
501 501
 	 */
502 502
 	private function get_form_id_column( $item, $atts ) {
503
-		if ( isset( $atts['form_ids'][ $item->item_id ] ) ) {
504
-			return FrmFormsHelper::edit_form_link( $atts['form_ids'][ $item->item_id ]->form_id );
503
+		if ( isset( $atts['form_ids'][$item->item_id] ) ) {
504
+			return FrmFormsHelper::edit_form_link( $atts['form_ids'][$item->item_id]->form_id );
505 505
 		}
506 506
 
507 507
 		return '';
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
 	 */
584 584
 	private function get_processing_tooltip() {
585 585
 		return FrmAppHelper::clip(
586
-			function () {
586
+			function() {
587 587
 				FrmAppHelper::tooltip_icon( __( 'This payment method may take between 4-5 business days to process.', 'formidable' ) );
588 588
 			}
589 589
 		);
Please login to merge, or discard this patch.
classes/models/FrmField.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 	/**
9 9
 	 * @var bool
10 10
 	 */
11
-	public static $use_cache      = true;
11
+	public static $use_cache = true;
12 12
 
13 13
 	/**
14 14
 	 * @var int
@@ -363,11 +363,11 @@  discard block
 block discarded – undo
363 363
 			'coupon' => '2026-01-13',
364 364
 		);
365 365
 
366
-		if ( ! isset( $release_dates[ $type ] ) ) {
366
+		if ( ! isset( $release_dates[$type] ) ) {
367 367
 			return false;
368 368
 		}
369 369
 
370
-		$release_date = $release_dates[ $type ];
370
+		$release_date = $release_dates[$type];
371 371
 
372 372
 		$three_months_after_release = gmdate( 'Y-m-d', strtotime( $release_date . ' + 90 days' ) );
373 373
 		return gmdate( 'Y-m-d' ) < $three_months_after_release;
@@ -401,8 +401,8 @@  discard block
 block discarded – undo
401 401
 		$values = FrmAppHelper::maybe_filter_array( $values, array( 'name', 'description' ) );
402 402
 
403 403
 		foreach ( array( 'name', 'description', 'type', 'default_value' ) as $col ) {
404
-			if ( isset( $values[ $col ] ) ) {
405
-				$new_values[ $col ] = $values[ $col ];
404
+			if ( isset( $values[$col] ) ) {
405
+				$new_values[$col] = $values[$col];
406 406
 			}
407 407
 		}
408 408
 
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 		$new_values['created_at']    = current_time( 'mysql', 1 );
415 415
 
416 416
 		if ( isset( $values['id'] ) ) {
417
-			$frm_duplicate_ids[ $values['field_key'] ] = $new_values['field_key'];
417
+			$frm_duplicate_ids[$values['field_key']] = $new_values['field_key'];
418 418
 			$new_values                                = apply_filters( 'frm_duplicated_field', $new_values );
419 419
 		}
420 420
 
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 
423 423
 		foreach ( $new_values as $k => $v ) {
424 424
 			if ( is_array( $v ) ) {
425
-				$new_values[ $k ] = $k === 'default_value' ? FrmAppHelper::maybe_json_encode( $v ) : serialize( $v );
425
+				$new_values[$k] = $k === 'default_value' ? FrmAppHelper::maybe_json_encode( $v ) : serialize( $v );
426 426
 			}
427 427
 			unset( $k, $v );
428 428
 		}
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
 		}
442 442
 
443 443
 		if ( isset( $values['id'] ) ) {
444
-			$frm_duplicate_ids[ $values['id'] ] = $new_id;
444
+			$frm_duplicate_ids[$values['id']] = $new_id;
445 445
 		}
446 446
 
447 447
 		return $new_id;
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
 			 *
496 496
 			 * @return string
497 497
 			 */
498
-			function ( $match ) {
498
+			function( $match ) {
499 499
 				$attr = shortcode_parse_atts( $match[3] );
500 500
 
501 501
 				if ( ! is_array( $attr ) ) {
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
 					}
524 524
 
525 525
 					if ( FrmAppHelper::input_key_is_safe( $key, 'update' ) ) {
526
-						$safe_atts[ $key ] = $value;
526
+						$safe_atts[$key] = $value;
527 527
 					}
528 528
 				}//end foreach
529 529
 
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 	public static function duplicate( $old_form_id, $form_id, $copy_keys = false, $blog_id = false ) {
596 596
 		global $frm_duplicate_ids;
597 597
 
598
-		$where  = array(
598
+		$where = array(
599 599
 			array(
600 600
 				'or'                => 1,
601 601
 				'fi.form_id'        => $old_form_id,
@@ -642,8 +642,8 @@  discard block
 block discarded – undo
642 642
 
643 643
 			$values                                 = apply_filters( 'frm_duplicated_field', $values );
644 644
 			$new_id                                 = self::create( $values );
645
-			$frm_duplicate_ids[ $field->id ]        = $new_id;
646
-			$frm_duplicate_ids[ $field->field_key ] = $new_id;
645
+			$frm_duplicate_ids[$field->id]        = $new_id;
646
+			$frm_duplicate_ids[$field->field_key] = $new_id;
647 647
 			unset( $field );
648 648
 		}//end foreach
649 649
 	}
@@ -693,11 +693,11 @@  discard block
 block discarded – undo
693 693
 
694 694
 		// serialize array values
695 695
 		foreach ( array( 'field_options', 'options' ) as $opt ) {
696
-			if ( isset( $values[ $opt ] ) && is_array( $values[ $opt ] ) ) {
696
+			if ( isset( $values[$opt] ) && is_array( $values[$opt] ) ) {
697 697
 				if ( 'field_options' === $opt ) {
698
-					$values[ $opt ] = self::maybe_filter_options( $values[ $opt ] );
698
+					$values[$opt] = self::maybe_filter_options( $values[$opt] );
699 699
 				}
700
-				$values[ $opt ] = serialize( $values[ $opt ] );
700
+				$values[$opt] = serialize( $values[$opt] );
701 701
 			}
702 702
 		}
703 703
 
@@ -911,8 +911,8 @@  discard block
 block discarded – undo
911 911
 					continue;
912 912
 				}
913 913
 
914
-				$fields[ $result->id ] = $result;
915
-				++$count;
914
+				$fields[$result->id] = $result;
915
+				++ $count;
916 916
 
917 917
 				if ( $limit == 1 ) {
918 918
 					$fields = $result;
@@ -967,8 +967,8 @@  discard block
 block discarded – undo
967 967
 			$count  = 0;
968 968
 
969 969
 			foreach ( $results as $result ) {
970
-				++$count;
971
-				$fields[ $result->id ] = $result;
970
+				++ $count;
971
+				$fields[$result->id] = $result;
972 972
 
973 973
 				if ( ! empty( $limit ) && $count >= $limit ) {
974 974
 					break;
@@ -1101,7 +1101,7 @@  discard block
 block discarded – undo
1101 1101
 		$query_type = $limit === ' LIMIT 1' || $limit == 1 ? 'row' : 'results';
1102 1102
 
1103 1103
 		if ( is_array( $where ) ) {
1104
-			$args    = array(
1104
+			$args = array(
1105 1105
 				'order_by' => $order_by,
1106 1106
 				'limit'    => $limit,
1107 1107
 			);
@@ -1138,9 +1138,9 @@  discard block
 block discarded – undo
1138 1138
 				FrmDb::set_cache( $result->field_key, $result, 'frm_field' );
1139 1139
 
1140 1140
 				self::prepare_options( $result );
1141
-				$results[ $r_key ]->field_options = $result->field_options;
1142
-				$results[ $r_key ]->options       = $result->options;
1143
-				$results[ $r_key ]->default_value = $result->default_value;
1141
+				$results[$r_key]->field_options = $result->field_options;
1142
+				$results[$r_key]->options       = $result->options;
1143
+				$results[$r_key]->default_value = $result->default_value;
1144 1144
 
1145 1145
 				unset( $r_key, $result );
1146 1146
 			}
@@ -1236,7 +1236,7 @@  discard block
 block discarded – undo
1236 1236
 
1237 1237
 			if ( count( $next_fields ) >= self::$transient_size ) {
1238 1238
 				// if this transient is full, check for another
1239
-				++$next;
1239
+				++ $next;
1240 1240
 				self::get_next_transient( $fields, $base_name, $next );
1241 1241
 			}
1242 1242
 		}
@@ -1272,7 +1272,7 @@  discard block
 block discarded – undo
1272 1272
 				return;
1273 1273
 			}
1274 1274
 
1275
-			++$next;
1275
+			++ $next;
1276 1276
 		}
1277 1277
 	}
1278 1278
 
@@ -1430,7 +1430,7 @@  discard block
 block discarded – undo
1430 1430
 	 * @return bool
1431 1431
 	 */
1432 1432
 	public static function is_option_true_in_array( $field, $option ) {
1433
-		return ! empty( $field[ $option ] );
1433
+		return ! empty( $field[$option] );
1434 1434
 	}
1435 1435
 
1436 1436
 	/**
@@ -1440,7 +1440,7 @@  discard block
 block discarded – undo
1440 1440
 	 * @return bool
1441 1441
 	 */
1442 1442
 	public static function is_option_true_in_object( $field, $option ) {
1443
-		return isset( $field->field_options[ $option ] ) && $field->field_options[ $option ];
1443
+		return isset( $field->field_options[$option] ) && $field->field_options[$option];
1444 1444
 	}
1445 1445
 
1446 1446
 	/**
@@ -1450,7 +1450,7 @@  discard block
 block discarded – undo
1450 1450
 	 * @return bool
1451 1451
 	 */
1452 1452
 	public static function is_option_empty_in_array( $field, $option ) {
1453
-		return empty( $field[ $option ] );
1453
+		return empty( $field[$option] );
1454 1454
 	}
1455 1455
 
1456 1456
 	/**
@@ -1460,7 +1460,7 @@  discard block
 block discarded – undo
1460 1460
 	 * @return bool
1461 1461
 	 */
1462 1462
 	public static function is_option_empty_in_object( $field, $option ) {
1463
-		return empty( $field->field_options[ $option ] );
1463
+		return empty( $field->field_options[$option] );
1464 1464
 	}
1465 1465
 
1466 1466
 	/**
@@ -1470,7 +1470,7 @@  discard block
 block discarded – undo
1470 1470
 	 * @return bool
1471 1471
 	 */
1472 1472
 	public static function is_option_value_in_object( $field, $option ) {
1473
-		return isset( $field->field_options[ $option ] ) && $field->field_options[ $option ] != '';
1473
+		return isset( $field->field_options[$option] ) && $field->field_options[$option] != '';
1474 1474
 	}
1475 1475
 
1476 1476
 	/**
@@ -1492,10 +1492,10 @@  discard block
 block discarded – undo
1492 1492
 	 * @return mixed
1493 1493
 	 */
1494 1494
 	public static function get_option_in_array( $field, $option ) {
1495
-		if ( isset( $field[ $option ] ) ) {
1496
-			$this_option = $field[ $option ];
1497
-		} elseif ( isset( $field['field_options'] ) && is_array( $field['field_options'] ) && isset( $field['field_options'][ $option ] ) ) {
1498
-			$this_option = $field['field_options'][ $option ];
1495
+		if ( isset( $field[$option] ) ) {
1496
+			$this_option = $field[$option];
1497
+		} elseif ( isset( $field['field_options'] ) && is_array( $field['field_options'] ) && isset( $field['field_options'][$option] ) ) {
1498
+			$this_option = $field['field_options'][$option];
1499 1499
 		} else {
1500 1500
 			$this_option = '';
1501 1501
 		}
@@ -1510,7 +1510,7 @@  discard block
 block discarded – undo
1510 1510
 	 * @return mixed
1511 1511
 	 */
1512 1512
 	public static function get_option_in_object( $field, $option ) {
1513
-		return $field->field_options[ $option ] ?? '';
1513
+		return $field->field_options[$option] ?? '';
1514 1514
 	}
1515 1515
 
1516 1516
 	/**
Please login to merge, or discard this patch.