Completed
Push — master ( 67005e...6d6fde )
by
unknown
18s
created
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/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.
classes/controllers/FrmStylesController.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,7 +144,8 @@  discard block
 block discarded – undo
144 144
 	 * @return void
145 145
 	 */
146 146
 	private static function maybe_hook_into_global_settings_save() {
147
-		if ( empty( $_POST ) || ! isset( $_POST['style'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
147
+		if ( empty( $_POST ) || ! isset( $_POST['style'] ) ) {
148
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
148 149
 			// Avoid changing any style data if the style array is not sent in the request.
149 150
 			return;
150 151
 		}
@@ -765,7 +766,8 @@  discard block
 block discarded – undo
765 766
 
766 767
 		$forms = FrmForm::get_published_forms();
767 768
 		foreach ( $forms as $form ) {
768
-			if ( ! isset( $_POST['style'] ) || ! isset( $_POST['style'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
769
+			if ( ! isset( $_POST['style'] ) || ! isset( $_POST['style'][ $form->id ] ) ) {
770
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
769 771
 				continue;
770 772
 			}
771 773
 
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 			/**
161 161
 			 * Update the form data on the "Manage Styles" tab after global settings are saved.
162 162
 			 */
163
-			function () {
163
+			function() {
164 164
 				self::manage_styles();
165 165
 			}
166 166
 		);
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 		$style_id = self::get_style_id_for_styler();
348 348
 
349 349
 		if ( ! $style_id ) {
350
-			$error_args   = array(
350
+			$error_args = array(
351 351
 				'title'      => __( 'No styles', 'formidable' ),
352 352
 				'body'       => __( 'You must have a style to use the Visual Styler.', 'formidable' ),
353 353
 				'cancel_url' => admin_url( 'admin.php?page=formidable' ),
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 		$form = FrmForm::getOne( $form_id );
366 366
 
367 367
 		if ( ! is_object( $form ) ) {
368
-			$error_args   = array(
368
+			$error_args = array(
369 369
 				'title'      => __( 'No forms', 'formidable' ),
370 370
 				'body'       => __( 'You must have a form to use the Visual Styler.', 'formidable' ),
371 371
 				'cancel_url' => admin_url( 'admin.php?page=formidable' ),
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 		if ( ! $form_id ) {
443 443
 			// TODO: Show a message why a random form is being shown (because no form is assigned to the style).
444 444
 			// Fallback to any form.
445
-			$where   = array(
445
+			$where = array(
446 446
 				'status'         => 'published',
447 447
 				// Make sure it's not a repeater.
448 448
 				'parent_form_id' => array( null, 0 ),
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 	private static function disable_admin_page_styling_on_submit_buttons() {
462 462
 		add_filter(
463 463
 			'frm_submit_button_class',
464
-			function ( $classes ) {
464
+			function( $classes ) {
465 465
 				$classes[] = 'frm_no_style_button';
466 466
 				return $classes;
467 467
 			}
@@ -694,13 +694,13 @@  discard block
 block discarded – undo
694 694
 	private static function force_form_style( $style ) {
695 695
 		add_filter(
696 696
 			'frm_add_form_style_class',
697
-			function ( $class ) use ( $style ) {
698
-				$split   = array_filter(
697
+			function( $class ) use ( $style ) {
698
+				$split = array_filter(
699 699
 					explode( ' ', $class ),
700 700
 					/**
701 701
 					 * @param string $class
702 702
 					 */
703
-					function ( $class ) {
703
+					function( $class ) {
704 704
 						return $class && 0 !== strpos( $class, 'frm_style_' );
705 705
 					}
706 706
 				);
@@ -828,11 +828,11 @@  discard block
 block discarded – undo
828 828
 		$forms = FrmForm::get_published_forms();
829 829
 
830 830
 		foreach ( $forms as $form ) {
831
-			if ( ! isset( $_POST['style'] ) || ! isset( $_POST['style'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
831
+			if ( ! isset( $_POST['style'] ) || ! isset( $_POST['style'][$form->id] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
832 832
 				continue;
833 833
 			}
834 834
 
835
-			$new_style = sanitize_text_field( wp_unslash( $_POST['style'][ $form->id ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
835
+			$new_style = sanitize_text_field( wp_unslash( $_POST['style'][$form->id] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
836 836
 
837 837
 			$form->options['custom_style'] = $new_style;
838 838
 			$wpdb->update( $wpdb->prefix . 'frm_forms', array( 'options' => maybe_serialize( $form->options ) ), array( 'id' => $form->id ) );
@@ -1261,8 +1261,8 @@  discard block
 block discarded – undo
1261 1261
 	public static function get_style_val( $val, $form = 'default' ) {
1262 1262
 		$style = self::get_form_style( $form );
1263 1263
 
1264
-		if ( $style && isset( $style->post_content[ $val ] ) ) {
1265
-			return $style->post_content[ $val ];
1264
+		if ( $style && isset( $style->post_content[$val] ) ) {
1265
+			return $style->post_content[$val];
1266 1266
 		}
1267 1267
 	}
1268 1268
 
@@ -1287,7 +1287,7 @@  discard block
 block discarded – undo
1287 1287
 			} elseif ( 'alt_bg_color' == $name ) {
1288 1288
 				$setting = 'bg_color_active';
1289 1289
 			}
1290
-			$default_styles[ $name ] = $style->post_content[ $setting ];
1290
+			$default_styles[$name] = $style->post_content[$setting];
1291 1291
 			unset( $name, $val );
1292 1292
 		}
1293 1293
 
@@ -1343,16 +1343,16 @@  discard block
 block discarded – undo
1343 1343
 		$i          = 0;
1344 1344
 		$first_open = false;
1345 1345
 
1346
-		if ( isset( $wp_meta_boxes[ $page ][ $context ] ) ) {
1346
+		if ( isset( $wp_meta_boxes[$page][$context] ) ) {
1347 1347
 			foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
1348
-				if ( isset( $wp_meta_boxes[ $page ][ $context ][ $priority ] ) ) {
1349
-					foreach ( $wp_meta_boxes[ $page ][ $context ][ $priority ] as $box ) {
1348
+				if ( isset( $wp_meta_boxes[$page][$context][$priority] ) ) {
1349
+					foreach ( $wp_meta_boxes[$page][$context][$priority] as $box ) {
1350 1350
 						if ( false === $box || ! $box['title'] ) {
1351 1351
 							continue;
1352 1352
 						}
1353 1353
 
1354
-						++$i;
1355
-						$icon_id = array_key_exists( $box['id'], $icon_ids ) ? $icon_ids[ $box['id'] ] : 'frm-' . $box['id'];
1354
+						++ $i;
1355
+						$icon_id = array_key_exists( $box['id'], $icon_ids ) ? $icon_ids[$box['id']] : 'frm-' . $box['id'];
1356 1356
 
1357 1357
 						$open_class = '';
1358 1358
 
Please login to merge, or discard this patch.
classes/views/frm-entries/direct.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 add_filter(
7 7
 	'document_title',
8
-	function ( $title ) use ( $form ) {
8
+	function( $title ) use ( $form ) {
9 9
 		$form_name = '' === $form->name ? FrmFormsHelper::get_no_title_text() : $form->name;
10 10
 		return get_bloginfo( 'name', 'display' ) . ' | ' . wp_strip_all_tags( $form_name );
11 11
 	}
Please login to merge, or discard this patch.
classes/widgets/FrmElementorWidget.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
 
76 76
 			foreach ( $forms as $form ) {
77 77
 				$form_title           = '' === $form->name ? FrmFormsHelper::get_no_title_text() : FrmAppHelper::truncate( $form->name, 50 );
78
-				$options[ $form->id ] = esc_html( $form_title );
78
+				$options[$form->id] = esc_html( $form_title );
79 79
 			}
80 80
 
81 81
 			return $options;
Please login to merge, or discard this patch.
classes/controllers/FrmUsageController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -133,15 +133,15 @@
 block discarded – undo
133 133
 			return;
134 134
 		}
135 135
 
136
-		if ( ! isset( $flows_data[ $key ] ) ) {
137
-			$flows_data[ $key ] = array();
136
+		if ( ! isset( $flows_data[$key] ) ) {
137
+			$flows_data[$key] = array();
138 138
 		}
139 139
 
140
-		if ( ! isset( $flows_data[ $key ][ $value ] ) ) {
141
-			$flows_data[ $key ][ $value ] = 0;
140
+		if ( ! isset( $flows_data[$key][$value] ) ) {
141
+			$flows_data[$key][$value] = 0;
142 142
 		}
143 143
 
144
-		$flows_data[ $key ][ $value ]++;
144
+		$flows_data[$key][$value] ++;
145 145
 		update_option( self::FLOWS_ACTION_NAME, $flows_data );
146 146
 	}
147 147
 
Please login to merge, or discard this patch.