Completed
Pull Request — master (#2563)
by
unknown
53s
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.
classes/models/FrmField.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -279,11 +279,11 @@  discard block
 block discarded – undo
279 279
 			'coupon' => '2026-01-01',
280 280
 		);
281 281
 
282
-		if ( ! isset( $release_dates[ $type ] ) ) {
282
+		if ( ! isset( $release_dates[$type] ) ) {
283 283
 			return false;
284 284
 		}
285 285
 
286
-		$release_date = $release_dates[ $type ];
286
+		$release_date = $release_dates[$type];
287 287
 
288 288
 		$three_months_after_release = gmdate( 'Y-m-d', strtotime( $release_date . ' + 90 days' ) );
289 289
 		return gmdate( 'Y-m-d' ) < $three_months_after_release;
@@ -316,8 +316,8 @@  discard block
 block discarded – undo
316 316
 		$values = FrmAppHelper::maybe_filter_array( $values, array( 'name', 'description' ) );
317 317
 
318 318
 		foreach ( array( 'name', 'description', 'type', 'default_value' ) as $col ) {
319
-			if ( isset( $values[ $col ] ) ) {
320
-				$new_values[ $col ] = $values[ $col ];
319
+			if ( isset( $values[$col] ) ) {
320
+				$new_values[$col] = $values[$col];
321 321
 			}
322 322
 		}
323 323
 
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 		$new_values['created_at']    = current_time( 'mysql', 1 );
330 330
 
331 331
 		if ( isset( $values['id'] ) ) {
332
-			$frm_duplicate_ids[ $values['field_key'] ] = $new_values['field_key'];
332
+			$frm_duplicate_ids[$values['field_key']] = $new_values['field_key'];
333 333
 			$new_values                                = apply_filters( 'frm_duplicated_field', $new_values );
334 334
 		}
335 335
 
@@ -338,9 +338,9 @@  discard block
 block discarded – undo
338 338
 		foreach ( $new_values as $k => $v ) {
339 339
 			if ( is_array( $v ) ) {
340 340
 				if ( $k === 'default_value' ) {
341
-					$new_values[ $k ] = FrmAppHelper::maybe_json_encode( $v );
341
+					$new_values[$k] = FrmAppHelper::maybe_json_encode( $v );
342 342
 				} else {
343
-					$new_values[ $k ] = serialize( $v );
343
+					$new_values[$k] = serialize( $v );
344 344
 				}
345 345
 			}
346 346
 			unset( $k, $v );
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 		}
361 361
 
362 362
 		if ( isset( $values['id'] ) ) {
363
-			$frm_duplicate_ids[ $values['id'] ] = $new_id;
363
+			$frm_duplicate_ids[$values['id']] = $new_id;
364 364
 		}
365 365
 
366 366
 		return $new_id;
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
 			 * @param array $match Shortcode data.
412 412
 			 * @return string
413 413
 			 */
414
-			function ( $match ) {
414
+			function( $match ) {
415 415
 				$attr = shortcode_parse_atts( $match[3] );
416 416
 
417 417
 				if ( ! is_array( $attr ) ) {
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 					}
437 437
 
438 438
 					if ( FrmAppHelper::input_key_is_safe( $key, 'update' ) ) {
439
-						$safe_atts[ $key ] = $value;
439
+						$safe_atts[$key] = $value;
440 440
 					}
441 441
 				}
442 442
 
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 	public static function duplicate( $old_form_id, $form_id, $copy_keys = false, $blog_id = false ) {
495 495
 		global $frm_duplicate_ids;
496 496
 
497
-		$where  = array(
497
+		$where = array(
498 498
 			array(
499 499
 				'or'                => 1,
500 500
 				'fi.form_id'        => $old_form_id,
@@ -540,8 +540,8 @@  discard block
 block discarded – undo
540 540
 
541 541
 			$values                                 = apply_filters( 'frm_duplicated_field', $values );
542 542
 			$new_id                                 = self::create( $values );
543
-			$frm_duplicate_ids[ $field->id ]        = $new_id;
544
-			$frm_duplicate_ids[ $field->field_key ] = $new_id;
543
+			$frm_duplicate_ids[$field->id]        = $new_id;
544
+			$frm_duplicate_ids[$field->field_key] = $new_id;
545 545
 			unset( $field );
546 546
 		}//end foreach
547 547
 	}
@@ -590,11 +590,11 @@  discard block
 block discarded – undo
590 590
 
591 591
 		// serialize array values
592 592
 		foreach ( array( 'field_options', 'options' ) as $opt ) {
593
-			if ( isset( $values[ $opt ] ) && is_array( $values[ $opt ] ) ) {
593
+			if ( isset( $values[$opt] ) && is_array( $values[$opt] ) ) {
594 594
 				if ( 'field_options' === $opt ) {
595
-					$values[ $opt ] = self::maybe_filter_options( $values[ $opt ] );
595
+					$values[$opt] = self::maybe_filter_options( $values[$opt] );
596 596
 				}
597
-				$values[ $opt ] = serialize( $values[ $opt ] );
597
+				$values[$opt] = serialize( $values[$opt] );
598 598
 			}
599 599
 		}
600 600
 		if ( isset( $values['default_value'] ) && is_array( $values['default_value'] ) ) {
@@ -781,8 +781,8 @@  discard block
 block discarded – undo
781 781
 					continue;
782 782
 				}
783 783
 
784
-				$fields[ $result->id ] = $result;
785
-				++$count;
784
+				$fields[$result->id] = $result;
785
+				++ $count;
786 786
 				if ( $limit == 1 ) {
787 787
 					$fields = $result;
788 788
 					break;
@@ -833,8 +833,8 @@  discard block
 block discarded – undo
833 833
 			$fields = array();
834 834
 			$count  = 0;
835 835
 			foreach ( $results as $result ) {
836
-				++$count;
837
-				$fields[ $result->id ] = $result;
836
+				++ $count;
837
+				$fields[$result->id] = $result;
838 838
 				if ( ! empty( $limit ) && $count >= $limit ) {
839 839
 					break;
840 840
 				}
@@ -948,7 +948,7 @@  discard block
 block discarded – undo
948 948
 		$query_type = $limit === ' LIMIT 1' || $limit == 1 ? 'row' : 'results';
949 949
 
950 950
 		if ( is_array( $where ) ) {
951
-			$args    = array(
951
+			$args = array(
952 952
 				'order_by' => $order_by,
953 953
 				'limit'    => $limit,
954 954
 			);
@@ -981,9 +981,9 @@  discard block
 block discarded – undo
981 981
 				FrmDb::set_cache( $result->field_key, $result, 'frm_field' );
982 982
 
983 983
 				self::prepare_options( $result );
984
-				$results[ $r_key ]->field_options = $result->field_options;
985
-				$results[ $r_key ]->options       = $result->options;
986
-				$results[ $r_key ]->default_value = $result->default_value;
984
+				$results[$r_key]->field_options = $result->field_options;
985
+				$results[$r_key]->options       = $result->options;
986
+				$results[$r_key]->default_value = $result->default_value;
987 987
 
988 988
 				unset( $r_key, $result );
989 989
 			}
@@ -1062,7 +1062,7 @@  discard block
 block discarded – undo
1062 1062
 
1063 1063
 			if ( count( $next_fields ) >= self::$transient_size ) {
1064 1064
 				// if this transient is full, check for another
1065
-				++$next;
1065
+				++ $next;
1066 1066
 				self::get_next_transient( $fields, $base_name, $next );
1067 1067
 			}
1068 1068
 		}
@@ -1090,7 +1090,7 @@  discard block
 block discarded – undo
1090 1090
 				return;
1091 1091
 			}
1092 1092
 
1093
-			++$next;
1093
+			++ $next;
1094 1094
 		}
1095 1095
 	}
1096 1096
 
@@ -1238,7 +1238,7 @@  discard block
 block discarded – undo
1238 1238
 	 * @return bool
1239 1239
 	 */
1240 1240
 	public static function is_option_true_in_array( $field, $option ) {
1241
-		return ! empty( $field[ $option ] );
1241
+		return ! empty( $field[$option] );
1242 1242
 	}
1243 1243
 
1244 1244
 	/**
@@ -1247,7 +1247,7 @@  discard block
 block discarded – undo
1247 1247
 	 * @return bool
1248 1248
 	 */
1249 1249
 	public static function is_option_true_in_object( $field, $option ) {
1250
-		return isset( $field->field_options[ $option ] ) && $field->field_options[ $option ];
1250
+		return isset( $field->field_options[$option] ) && $field->field_options[$option];
1251 1251
 	}
1252 1252
 
1253 1253
 	/**
@@ -1256,7 +1256,7 @@  discard block
 block discarded – undo
1256 1256
 	 * @return bool
1257 1257
 	 */
1258 1258
 	public static function is_option_empty_in_array( $field, $option ) {
1259
-		return empty( $field[ $option ] );
1259
+		return empty( $field[$option] );
1260 1260
 	}
1261 1261
 
1262 1262
 	/**
@@ -1265,7 +1265,7 @@  discard block
 block discarded – undo
1265 1265
 	 * @return bool
1266 1266
 	 */
1267 1267
 	public static function is_option_empty_in_object( $field, $option ) {
1268
-		return empty( $field->field_options[ $option ] );
1268
+		return empty( $field->field_options[$option] );
1269 1269
 	}
1270 1270
 
1271 1271
 	/**
@@ -1274,7 +1274,7 @@  discard block
 block discarded – undo
1274 1274
 	 * @return bool
1275 1275
 	 */
1276 1276
 	public static function is_option_value_in_object( $field, $option ) {
1277
-		return isset( $field->field_options[ $option ] ) && $field->field_options[ $option ] != '';
1277
+		return isset( $field->field_options[$option] ) && $field->field_options[$option] != '';
1278 1278
 	}
1279 1279
 
1280 1280
 	/**
@@ -1300,10 +1300,10 @@  discard block
 block discarded – undo
1300 1300
 	 * @return mixed
1301 1301
 	 */
1302 1302
 	public static function get_option_in_array( $field, $option ) {
1303
-		if ( isset( $field[ $option ] ) ) {
1304
-			$this_option = $field[ $option ];
1305
-		} elseif ( isset( $field['field_options'] ) && is_array( $field['field_options'] ) && isset( $field['field_options'][ $option ] ) ) {
1306
-			$this_option = $field['field_options'][ $option ];
1303
+		if ( isset( $field[$option] ) ) {
1304
+			$this_option = $field[$option];
1305
+		} elseif ( isset( $field['field_options'] ) && is_array( $field['field_options'] ) && isset( $field['field_options'][$option] ) ) {
1306
+			$this_option = $field['field_options'][$option];
1307 1307
 		} else {
1308 1308
 			$this_option = '';
1309 1309
 		}
@@ -1317,7 +1317,7 @@  discard block
 block discarded – undo
1317 1317
 	 * @return mixed
1318 1318
 	 */
1319 1319
 	public static function get_option_in_object( $field, $option ) {
1320
-		return $field->field_options[ $option ] ?? '';
1320
+		return $field->field_options[$option] ?? '';
1321 1321
 	}
1322 1322
 
1323 1323
 	/**
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.