Completed
Pull Request — master (#2563)
by
unknown
41s
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
@@ -364,11 +364,11 @@  discard block
 block discarded – undo
364 364
 			'coupon' => '2026-01-01',
365 365
 		);
366 366
 
367
-		if ( ! isset( $release_dates[ $type ] ) ) {
367
+		if ( ! isset( $release_dates[$type] ) ) {
368 368
 			return false;
369 369
 		}
370 370
 
371
-		$release_date = $release_dates[ $type ];
371
+		$release_date = $release_dates[$type];
372 372
 
373 373
 		$three_months_after_release = gmdate( 'Y-m-d', strtotime( $release_date . ' + 90 days' ) );
374 374
 		return gmdate( 'Y-m-d' ) < $three_months_after_release;
@@ -402,8 +402,8 @@  discard block
 block discarded – undo
402 402
 		$values = FrmAppHelper::maybe_filter_array( $values, array( 'name', 'description' ) );
403 403
 
404 404
 		foreach ( array( 'name', 'description', 'type', 'default_value' ) as $col ) {
405
-			if ( isset( $values[ $col ] ) ) {
406
-				$new_values[ $col ] = $values[ $col ];
405
+			if ( isset( $values[$col] ) ) {
406
+				$new_values[$col] = $values[$col];
407 407
 			}
408 408
 		}
409 409
 
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 		$new_values['created_at']    = current_time( 'mysql', 1 );
416 416
 
417 417
 		if ( isset( $values['id'] ) ) {
418
-			$frm_duplicate_ids[ $values['field_key'] ] = $new_values['field_key'];
418
+			$frm_duplicate_ids[$values['field_key']] = $new_values['field_key'];
419 419
 			$new_values                                = apply_filters( 'frm_duplicated_field', $new_values );
420 420
 		}
421 421
 
@@ -424,9 +424,9 @@  discard block
 block discarded – undo
424 424
 		foreach ( $new_values as $k => $v ) {
425 425
 			if ( is_array( $v ) ) {
426 426
 				if ( $k === 'default_value' ) {
427
-					$new_values[ $k ] = FrmAppHelper::maybe_json_encode( $v );
427
+					$new_values[$k] = FrmAppHelper::maybe_json_encode( $v );
428 428
 				} else {
429
-					$new_values[ $k ] = serialize( $v );
429
+					$new_values[$k] = serialize( $v );
430 430
 				}
431 431
 			}
432 432
 			unset( $k, $v );
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
 		}
447 447
 
448 448
 		if ( isset( $values['id'] ) ) {
449
-			$frm_duplicate_ids[ $values['id'] ] = $new_id;
449
+			$frm_duplicate_ids[$values['id']] = $new_id;
450 450
 		}
451 451
 
452 452
 		return $new_id;
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 			 *
501 501
 			 * @return string
502 502
 			 */
503
-			function ( $match ) {
503
+			function( $match ) {
504 504
 				$attr = shortcode_parse_atts( $match[3] );
505 505
 
506 506
 				if ( ! is_array( $attr ) ) {
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
 					}
529 529
 
530 530
 					if ( FrmAppHelper::input_key_is_safe( $key, 'update' ) ) {
531
-						$safe_atts[ $key ] = $value;
531
+						$safe_atts[$key] = $value;
532 532
 					}
533 533
 				}//end foreach
534 534
 
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
 	public static function duplicate( $old_form_id, $form_id, $copy_keys = false, $blog_id = false ) {
601 601
 		global $frm_duplicate_ids;
602 602
 
603
-		$where  = array(
603
+		$where = array(
604 604
 			array(
605 605
 				'or'                => 1,
606 606
 				'fi.form_id'        => $old_form_id,
@@ -647,8 +647,8 @@  discard block
 block discarded – undo
647 647
 
648 648
 			$values                                 = apply_filters( 'frm_duplicated_field', $values );
649 649
 			$new_id                                 = self::create( $values );
650
-			$frm_duplicate_ids[ $field->id ]        = $new_id;
651
-			$frm_duplicate_ids[ $field->field_key ] = $new_id;
650
+			$frm_duplicate_ids[$field->id]        = $new_id;
651
+			$frm_duplicate_ids[$field->field_key] = $new_id;
652 652
 			unset( $field );
653 653
 		}//end foreach
654 654
 	}
@@ -698,11 +698,11 @@  discard block
 block discarded – undo
698 698
 
699 699
 		// serialize array values
700 700
 		foreach ( array( 'field_options', 'options' ) as $opt ) {
701
-			if ( isset( $values[ $opt ] ) && is_array( $values[ $opt ] ) ) {
701
+			if ( isset( $values[$opt] ) && is_array( $values[$opt] ) ) {
702 702
 				if ( 'field_options' === $opt ) {
703
-					$values[ $opt ] = self::maybe_filter_options( $values[ $opt ] );
703
+					$values[$opt] = self::maybe_filter_options( $values[$opt] );
704 704
 				}
705
-				$values[ $opt ] = serialize( $values[ $opt ] );
705
+				$values[$opt] = serialize( $values[$opt] );
706 706
 			}
707 707
 		}
708 708
 
@@ -921,8 +921,8 @@  discard block
 block discarded – undo
921 921
 					continue;
922 922
 				}
923 923
 
924
-				$fields[ $result->id ] = $result;
925
-				++$count;
924
+				$fields[$result->id] = $result;
925
+				++ $count;
926 926
 
927 927
 				if ( $limit == 1 ) {
928 928
 					$fields = $result;
@@ -977,8 +977,8 @@  discard block
 block discarded – undo
977 977
 			$count  = 0;
978 978
 
979 979
 			foreach ( $results as $result ) {
980
-				++$count;
981
-				$fields[ $result->id ] = $result;
980
+				++ $count;
981
+				$fields[$result->id] = $result;
982 982
 
983 983
 				if ( ! empty( $limit ) && $count >= $limit ) {
984 984
 					break;
@@ -1111,7 +1111,7 @@  discard block
 block discarded – undo
1111 1111
 		$query_type = $limit === ' LIMIT 1' || $limit == 1 ? 'row' : 'results';
1112 1112
 
1113 1113
 		if ( is_array( $where ) ) {
1114
-			$args    = array(
1114
+			$args = array(
1115 1115
 				'order_by' => $order_by,
1116 1116
 				'limit'    => $limit,
1117 1117
 			);
@@ -1148,9 +1148,9 @@  discard block
 block discarded – undo
1148 1148
 				FrmDb::set_cache( $result->field_key, $result, 'frm_field' );
1149 1149
 
1150 1150
 				self::prepare_options( $result );
1151
-				$results[ $r_key ]->field_options = $result->field_options;
1152
-				$results[ $r_key ]->options       = $result->options;
1153
-				$results[ $r_key ]->default_value = $result->default_value;
1151
+				$results[$r_key]->field_options = $result->field_options;
1152
+				$results[$r_key]->options       = $result->options;
1153
+				$results[$r_key]->default_value = $result->default_value;
1154 1154
 
1155 1155
 				unset( $r_key, $result );
1156 1156
 			}
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
 
1247 1247
 			if ( count( $next_fields ) >= self::$transient_size ) {
1248 1248
 				// if this transient is full, check for another
1249
-				++$next;
1249
+				++ $next;
1250 1250
 				self::get_next_transient( $fields, $base_name, $next );
1251 1251
 			}
1252 1252
 		}
@@ -1282,7 +1282,7 @@  discard block
 block discarded – undo
1282 1282
 				return;
1283 1283
 			}
1284 1284
 
1285
-			++$next;
1285
+			++ $next;
1286 1286
 		}
1287 1287
 	}
1288 1288
 
@@ -1444,7 +1444,7 @@  discard block
 block discarded – undo
1444 1444
 	 * @return bool
1445 1445
 	 */
1446 1446
 	public static function is_option_true_in_array( $field, $option ) {
1447
-		return ! empty( $field[ $option ] );
1447
+		return ! empty( $field[$option] );
1448 1448
 	}
1449 1449
 
1450 1450
 	/**
@@ -1454,7 +1454,7 @@  discard block
 block discarded – undo
1454 1454
 	 * @return bool
1455 1455
 	 */
1456 1456
 	public static function is_option_true_in_object( $field, $option ) {
1457
-		return isset( $field->field_options[ $option ] ) && $field->field_options[ $option ];
1457
+		return isset( $field->field_options[$option] ) && $field->field_options[$option];
1458 1458
 	}
1459 1459
 
1460 1460
 	/**
@@ -1464,7 +1464,7 @@  discard block
 block discarded – undo
1464 1464
 	 * @return bool
1465 1465
 	 */
1466 1466
 	public static function is_option_empty_in_array( $field, $option ) {
1467
-		return empty( $field[ $option ] );
1467
+		return empty( $field[$option] );
1468 1468
 	}
1469 1469
 
1470 1470
 	/**
@@ -1474,7 +1474,7 @@  discard block
 block discarded – undo
1474 1474
 	 * @return bool
1475 1475
 	 */
1476 1476
 	public static function is_option_empty_in_object( $field, $option ) {
1477
-		return empty( $field->field_options[ $option ] );
1477
+		return empty( $field->field_options[$option] );
1478 1478
 	}
1479 1479
 
1480 1480
 	/**
@@ -1484,7 +1484,7 @@  discard block
 block discarded – undo
1484 1484
 	 * @return bool
1485 1485
 	 */
1486 1486
 	public static function is_option_value_in_object( $field, $option ) {
1487
-		return isset( $field->field_options[ $option ] ) && $field->field_options[ $option ] != '';
1487
+		return isset( $field->field_options[$option] ) && $field->field_options[$option] != '';
1488 1488
 	}
1489 1489
 
1490 1490
 	/**
@@ -1512,10 +1512,10 @@  discard block
 block discarded – undo
1512 1512
 	 * @return mixed
1513 1513
 	 */
1514 1514
 	public static function get_option_in_array( $field, $option ) {
1515
-		if ( isset( $field[ $option ] ) ) {
1516
-			$this_option = $field[ $option ];
1517
-		} elseif ( isset( $field['field_options'] ) && is_array( $field['field_options'] ) && isset( $field['field_options'][ $option ] ) ) {
1518
-			$this_option = $field['field_options'][ $option ];
1515
+		if ( isset( $field[$option] ) ) {
1516
+			$this_option = $field[$option];
1517
+		} elseif ( isset( $field['field_options'] ) && is_array( $field['field_options'] ) && isset( $field['field_options'][$option] ) ) {
1518
+			$this_option = $field['field_options'][$option];
1519 1519
 		} else {
1520 1520
 			$this_option = '';
1521 1521
 		}
@@ -1530,7 +1530,7 @@  discard block
 block discarded – undo
1530 1530
 	 * @return mixed
1531 1531
 	 */
1532 1532
 	public static function get_option_in_object( $field, $option ) {
1533
-		return $field->field_options[ $option ] ?? '';
1533
+		return $field->field_options[$option] ?? '';
1534 1534
 	}
1535 1535
 
1536 1536
 	/**
Please login to merge, or discard this patch.