Completed
Pull Request — master (#2563)
by
unknown
47s
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 2 patches
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
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 	 *
181 181
 	 * @return array
182 182
 	 */
183
-	public function get_bulk_actions(){
183
+	public function get_bulk_actions() {
184 184
 		$actions = array();
185 185
 		if ( $this->payments_addon_list_helper_exists() ) {
186 186
 			$actions['bulk_delete'] = __( 'Delete', 'formidable' );
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 			echo '<tr id="payment-' . esc_attr( $item->id ) . '" ';
233 233
 
234 234
 			$is_alternate = 0 === $alt % 2;
235
-			++$alt;
235
+			++ $alt;
236 236
 
237 237
 			if ( $is_alternate ) {
238 238
 				echo 'class="alternate"';
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 
339 339
 		$form_ids = array();
340 340
 		foreach ( $forms as $form ) {
341
-			$form_ids[ $form->id ] = $form;
341
+			$form_ids[$form->id] = $form;
342 342
 			unset( $form );
343 343
 		}
344 344
 
@@ -491,8 +491,8 @@  discard block
 block discarded – undo
491 491
 	 * @return mixed
492 492
 	 */
493 493
 	private function get_form_id_column( $item, $atts ) {
494
-		if ( isset( $atts['form_ids'][ $item->item_id ] ) ) {
495
-			$form_link = FrmFormsHelper::edit_form_link( $atts['form_ids'][ $item->item_id ]->form_id );
494
+		if ( isset( $atts['form_ids'][$item->item_id] ) ) {
495
+			$form_link = FrmFormsHelper::edit_form_link( $atts['form_ids'][$item->item_id]->form_id );
496 496
 			return $form_link;
497 497
 		}
498 498
 
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
 	 */
568 568
 	private function get_processing_tooltip() {
569 569
 		return FrmAppHelper::clip(
570
-			function () {
570
+			function() {
571 571
 				FrmAppHelper::tooltip_icon( __( 'This payment method may take between 4-5 business days to process.', 'formidable' ) );
572 572
 			}
573 573
 		);
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@
 block discarded – undo
180 180
 	 *
181 181
 	 * @return array
182 182
 	 */
183
-	public function get_bulk_actions(){
183
+	public function get_bulk_actions() {
184 184
 		$actions = array();
185 185
 		if ( $this->payments_addon_list_helper_exists() ) {
186 186
 			$actions['bulk_delete'] = __( 'Delete', 'formidable' );
Please login to merge, or discard this patch.
classes/models/FrmField.php 1 patch
Spacing   +37 added lines, -37 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
 
@@ -423,9 +423,9 @@  discard block
 block discarded – undo
423 423
 		foreach ( $new_values as $k => $v ) {
424 424
 			if ( is_array( $v ) ) {
425 425
 				if ( $k === 'default_value' ) {
426
-					$new_values[ $k ] = FrmAppHelper::maybe_json_encode( $v );
426
+					$new_values[$k] = FrmAppHelper::maybe_json_encode( $v );
427 427
 				} else {
428
-					$new_values[ $k ] = serialize( $v );
428
+					$new_values[$k] = serialize( $v );
429 429
 				}
430 430
 			}
431 431
 			unset( $k, $v );
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
 		}
446 446
 
447 447
 		if ( isset( $values['id'] ) ) {
448
-			$frm_duplicate_ids[ $values['id'] ] = $new_id;
448
+			$frm_duplicate_ids[$values['id']] = $new_id;
449 449
 		}
450 450
 
451 451
 		return $new_id;
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 			 *
500 500
 			 * @return string
501 501
 			 */
502
-			function ( $match ) {
502
+			function( $match ) {
503 503
 				$attr = shortcode_parse_atts( $match[3] );
504 504
 
505 505
 				if ( ! is_array( $attr ) ) {
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 					}
528 528
 
529 529
 					if ( FrmAppHelper::input_key_is_safe( $key, 'update' ) ) {
530
-						$safe_atts[ $key ] = $value;
530
+						$safe_atts[$key] = $value;
531 531
 					}
532 532
 				}//end foreach
533 533
 
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
 	public static function duplicate( $old_form_id, $form_id, $copy_keys = false, $blog_id = false ) {
600 600
 		global $frm_duplicate_ids;
601 601
 
602
-		$where  = array(
602
+		$where = array(
603 603
 			array(
604 604
 				'or'                => 1,
605 605
 				'fi.form_id'        => $old_form_id,
@@ -646,8 +646,8 @@  discard block
 block discarded – undo
646 646
 
647 647
 			$values                                 = apply_filters( 'frm_duplicated_field', $values );
648 648
 			$new_id                                 = self::create( $values );
649
-			$frm_duplicate_ids[ $field->id ]        = $new_id;
650
-			$frm_duplicate_ids[ $field->field_key ] = $new_id;
649
+			$frm_duplicate_ids[$field->id]        = $new_id;
650
+			$frm_duplicate_ids[$field->field_key] = $new_id;
651 651
 			unset( $field );
652 652
 		}//end foreach
653 653
 	}
@@ -697,11 +697,11 @@  discard block
 block discarded – undo
697 697
 
698 698
 		// serialize array values
699 699
 		foreach ( array( 'field_options', 'options' ) as $opt ) {
700
-			if ( isset( $values[ $opt ] ) && is_array( $values[ $opt ] ) ) {
700
+			if ( isset( $values[$opt] ) && is_array( $values[$opt] ) ) {
701 701
 				if ( 'field_options' === $opt ) {
702
-					$values[ $opt ] = self::maybe_filter_options( $values[ $opt ] );
702
+					$values[$opt] = self::maybe_filter_options( $values[$opt] );
703 703
 				}
704
-				$values[ $opt ] = serialize( $values[ $opt ] );
704
+				$values[$opt] = serialize( $values[$opt] );
705 705
 			}
706 706
 		}
707 707
 
@@ -920,8 +920,8 @@  discard block
 block discarded – undo
920 920
 					continue;
921 921
 				}
922 922
 
923
-				$fields[ $result->id ] = $result;
924
-				++$count;
923
+				$fields[$result->id] = $result;
924
+				++ $count;
925 925
 
926 926
 				if ( $limit == 1 ) {
927 927
 					$fields = $result;
@@ -976,8 +976,8 @@  discard block
 block discarded – undo
976 976
 			$count  = 0;
977 977
 
978 978
 			foreach ( $results as $result ) {
979
-				++$count;
980
-				$fields[ $result->id ] = $result;
979
+				++ $count;
980
+				$fields[$result->id] = $result;
981 981
 
982 982
 				if ( ! empty( $limit ) && $count >= $limit ) {
983 983
 					break;
@@ -1110,7 +1110,7 @@  discard block
 block discarded – undo
1110 1110
 		$query_type = $limit === ' LIMIT 1' || $limit == 1 ? 'row' : 'results';
1111 1111
 
1112 1112
 		if ( is_array( $where ) ) {
1113
-			$args    = array(
1113
+			$args = array(
1114 1114
 				'order_by' => $order_by,
1115 1115
 				'limit'    => $limit,
1116 1116
 			);
@@ -1147,9 +1147,9 @@  discard block
 block discarded – undo
1147 1147
 				FrmDb::set_cache( $result->field_key, $result, 'frm_field' );
1148 1148
 
1149 1149
 				self::prepare_options( $result );
1150
-				$results[ $r_key ]->field_options = $result->field_options;
1151
-				$results[ $r_key ]->options       = $result->options;
1152
-				$results[ $r_key ]->default_value = $result->default_value;
1150
+				$results[$r_key]->field_options = $result->field_options;
1151
+				$results[$r_key]->options       = $result->options;
1152
+				$results[$r_key]->default_value = $result->default_value;
1153 1153
 
1154 1154
 				unset( $r_key, $result );
1155 1155
 			}
@@ -1245,7 +1245,7 @@  discard block
 block discarded – undo
1245 1245
 
1246 1246
 			if ( count( $next_fields ) >= self::$transient_size ) {
1247 1247
 				// if this transient is full, check for another
1248
-				++$next;
1248
+				++ $next;
1249 1249
 				self::get_next_transient( $fields, $base_name, $next );
1250 1250
 			}
1251 1251
 		}
@@ -1281,7 +1281,7 @@  discard block
 block discarded – undo
1281 1281
 				return;
1282 1282
 			}
1283 1283
 
1284
-			++$next;
1284
+			++ $next;
1285 1285
 		}
1286 1286
 	}
1287 1287
 
@@ -1443,7 +1443,7 @@  discard block
 block discarded – undo
1443 1443
 	 * @return bool
1444 1444
 	 */
1445 1445
 	public static function is_option_true_in_array( $field, $option ) {
1446
-		return ! empty( $field[ $option ] );
1446
+		return ! empty( $field[$option] );
1447 1447
 	}
1448 1448
 
1449 1449
 	/**
@@ -1453,7 +1453,7 @@  discard block
 block discarded – undo
1453 1453
 	 * @return bool
1454 1454
 	 */
1455 1455
 	public static function is_option_true_in_object( $field, $option ) {
1456
-		return isset( $field->field_options[ $option ] ) && $field->field_options[ $option ];
1456
+		return isset( $field->field_options[$option] ) && $field->field_options[$option];
1457 1457
 	}
1458 1458
 
1459 1459
 	/**
@@ -1463,7 +1463,7 @@  discard block
 block discarded – undo
1463 1463
 	 * @return bool
1464 1464
 	 */
1465 1465
 	public static function is_option_empty_in_array( $field, $option ) {
1466
-		return empty( $field[ $option ] );
1466
+		return empty( $field[$option] );
1467 1467
 	}
1468 1468
 
1469 1469
 	/**
@@ -1473,7 +1473,7 @@  discard block
 block discarded – undo
1473 1473
 	 * @return bool
1474 1474
 	 */
1475 1475
 	public static function is_option_empty_in_object( $field, $option ) {
1476
-		return empty( $field->field_options[ $option ] );
1476
+		return empty( $field->field_options[$option] );
1477 1477
 	}
1478 1478
 
1479 1479
 	/**
@@ -1483,7 +1483,7 @@  discard block
 block discarded – undo
1483 1483
 	 * @return bool
1484 1484
 	 */
1485 1485
 	public static function is_option_value_in_object( $field, $option ) {
1486
-		return isset( $field->field_options[ $option ] ) && $field->field_options[ $option ] != '';
1486
+		return isset( $field->field_options[$option] ) && $field->field_options[$option] != '';
1487 1487
 	}
1488 1488
 
1489 1489
 	/**
@@ -1511,10 +1511,10 @@  discard block
 block discarded – undo
1511 1511
 	 * @return mixed
1512 1512
 	 */
1513 1513
 	public static function get_option_in_array( $field, $option ) {
1514
-		if ( isset( $field[ $option ] ) ) {
1515
-			$this_option = $field[ $option ];
1516
-		} elseif ( isset( $field['field_options'] ) && is_array( $field['field_options'] ) && isset( $field['field_options'][ $option ] ) ) {
1517
-			$this_option = $field['field_options'][ $option ];
1514
+		if ( isset( $field[$option] ) ) {
1515
+			$this_option = $field[$option];
1516
+		} elseif ( isset( $field['field_options'] ) && is_array( $field['field_options'] ) && isset( $field['field_options'][$option] ) ) {
1517
+			$this_option = $field['field_options'][$option];
1518 1518
 		} else {
1519 1519
 			$this_option = '';
1520 1520
 		}
@@ -1529,7 +1529,7 @@  discard block
 block discarded – undo
1529 1529
 	 * @return mixed
1530 1530
 	 */
1531 1531
 	public static function get_option_in_object( $field, $option ) {
1532
-		return $field->field_options[ $option ] ?? '';
1532
+		return $field->field_options[$option] ?? '';
1533 1533
 	}
1534 1534
 
1535 1535
 	/**
Please login to merge, or discard this patch.