Completed
Push — master ( 112a51...46d9ff )
by
unknown
21s
created
classes/models/FrmEntryShortcodeFormatter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@
 block discarded – undo
285 285
 			'type'  => $field->type,
286 286
 		);
287 287
 
288
-		$this->array_content[ $field->id ] = apply_filters( 'frm_field_shortcodes_for_default_html_email', $array, $field );
288
+		$this->array_content[$field->id] = apply_filters( 'frm_field_shortcodes_for_default_html_email', $array, $field );
289 289
 	}
290 290
 
291 291
 	/**
Please login to merge, or discard this patch.
classes/models/FrmMigrate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 				continue;
327 327
 			}
328 328
 
329
-			$this->maybe_convert_migrated_size( $widgets[ $k ]['size'] );
329
+			$this->maybe_convert_migrated_size( $widgets[$k]['size'] );
330 330
 		}
331 331
 		update_option( 'widget_frm_show_form', $widgets );
332 332
 	}
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 			if ( ! is_array( $widget ) || ! isset( $widget['size'] ) ) {
423 423
 				continue;
424 424
 			}
425
-			$this->convert_character_to_px( $widgets[ $k ]['size'] );
425
+			$this->convert_character_to_px( $widgets[$k]['size'] );
426 426
 		}
427 427
 		update_option( 'widget_frm_show_form', $widgets );
428 428
 	}
Please login to merge, or discard this patch.
classes/models/FrmInstallerSkin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	 */
22 22
 	public function set_upgrader( &$upgrader ) {
23 23
 		if ( is_object( $upgrader ) ) {
24
-			$this->upgrader =& $upgrader;
24
+			$this->upgrader = & $upgrader;
25 25
 		}
26 26
 	}
27 27
 
Please login to merge, or discard this patch.
classes/models/FrmFieldValue.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@
 block discarded – undo
59 59
 	protected function init_saved_value( $entry ) {
60 60
 		if ( $this->field->type === 'html' ) {
61 61
 			$this->saved_value = $this->field->description;
62
-		} elseif ( isset( $entry->metas[ $this->field->id ] ) ) {
63
-			$this->saved_value = $entry->metas[ $this->field->id ];
62
+		} elseif ( isset( $entry->metas[$this->field->id] ) ) {
63
+			$this->saved_value = $entry->metas[$this->field->id];
64 64
 		} else {
65 65
 			$this->saved_value = '';
66 66
 		}
Please login to merge, or discard this patch.
classes/controllers/FrmEntriesController.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -491,7 +491,8 @@
 block discarded – undo
491 491
 
492 492
 	public static function process_entry( $errors = '', $ajax = false ) {
493 493
 		$form_id = FrmAppHelper::get_post_param( 'form_id', '', 'absint' );
494
-		if ( FrmAppHelper::is_admin() || empty( $_POST ) || empty( $form_id ) || ! isset( $_POST['item_key'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
494
+		if ( FrmAppHelper::is_admin() || empty( $_POST ) || empty( $form_id ) || ! isset( $_POST['item_key'] ) ) {
495
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
495 496
 			return;
496 497
 		}
497 498
 
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -170,20 +170,20 @@  discard block
 block discarded – undo
170 170
 		global $frm_vars;
171 171
 		$form_id = FrmForm::get_current_form_id();
172 172
 
173
-		$columns[ $form_id . '_id' ]       = 'ID';
174
-		$columns[ $form_id . '_item_key' ] = esc_html__( 'Entry Key', 'formidable' );
173
+		$columns[$form_id . '_id']       = 'ID';
174
+		$columns[$form_id . '_item_key'] = esc_html__( 'Entry Key', 'formidable' );
175 175
 
176 176
 		if ( $form_id ) {
177 177
 			self::get_columns_for_form( $form_id, $columns );
178 178
 		} else {
179
-			$columns[ $form_id . '_form_id' ] = esc_html__( 'Form', 'formidable' );
180
-			$columns[ $form_id . '_name' ]    = esc_html__( 'Entry Name', 'formidable' );
181
-			$columns[ $form_id . '_user_id' ] = esc_html__( 'Created By', 'formidable' );
179
+			$columns[$form_id . '_form_id'] = esc_html__( 'Form', 'formidable' );
180
+			$columns[$form_id . '_name']    = esc_html__( 'Entry Name', 'formidable' );
181
+			$columns[$form_id . '_user_id'] = esc_html__( 'Created By', 'formidable' );
182 182
 		}
183 183
 
184
-		$columns[ $form_id . '_is_draft' ]   = esc_html__( 'Entry Status', 'formidable' );
185
-		$columns[ $form_id . '_created_at' ] = __( 'Entry creation date', 'formidable' );
186
-		$columns[ $form_id . '_updated_at' ] = __( 'Entry update date', 'formidable' );
184
+		$columns[$form_id . '_is_draft']   = esc_html__( 'Entry Status', 'formidable' );
185
+		$columns[$form_id . '_created_at'] = __( 'Entry creation date', 'formidable' );
186
+		$columns[$form_id . '_updated_at'] = __( 'Entry update date', 'formidable' );
187 187
 		self::maybe_add_ip_col( $form_id, $columns );
188 188
 
189 189
 		$frm_vars['cols'] = $columns;
@@ -256,10 +256,10 @@  discard block
 block discarded – undo
256 256
 
257 257
 		foreach ( $sub_form_cols as $k => $sub_form_col ) {
258 258
 			if ( FrmField::is_no_save_field( $sub_form_col->type ) ) {
259
-				unset( $sub_form_cols[ $k ] );
259
+				unset( $sub_form_cols[$k] );
260 260
 				continue;
261 261
 			}
262
-			$columns[ $form_id . '_' . $sub_form_col->field_key . '-_-' . $field->id ] = FrmAppHelper::truncate( $sub_form_col->name, 35 );
262
+			$columns[$form_id . '_' . $sub_form_col->field_key . '-_-' . $field->id] = FrmAppHelper::truncate( $sub_form_col->name, 35 );
263 263
 			unset( $sub_form_col );
264 264
 		}
265 265
 	}
@@ -285,10 +285,10 @@  discard block
 block discarded – undo
285 285
 		$include_column_for_sep_val = $has_separate_value && ! $is_post_status;
286 286
 
287 287
 		if ( $include_column_for_sep_val ) {
288
-			$columns[ $form_id . '_frmsep_' . $col_id ] = self::maybe_format_field_name_for_column_title( $field, $include_column_for_sep_val );
288
+			$columns[$form_id . '_frmsep_' . $col_id] = self::maybe_format_field_name_for_column_title( $field, $include_column_for_sep_val );
289 289
 		}
290 290
 
291
-		$columns[ $form_id . '_' . $col_id ] = self::maybe_format_field_name_for_column_title( $field, $include_column_for_sep_val, false );
291
+		$columns[$form_id . '_' . $col_id] = self::maybe_format_field_name_for_column_title( $field, $include_column_for_sep_val, false );
292 292
 	}
293 293
 
294 294
 	/**
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 	 */
323 323
 	private static function maybe_add_ip_col( $form_id, &$columns ) {
324 324
 		if ( FrmAppHelper::ips_saved() ) {
325
-			$columns[ $form_id . '_ip' ] = 'IP';
325
+			$columns[$form_id . '_ip'] = 'IP';
326 326
 		}
327 327
 	}
328 328
 
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 		foreach ( $meta_value as $mk => $mv ) {
383 383
 			// Remove blank values.
384 384
 			if ( empty( $mv ) ) {
385
-				unset( $meta_value[ $mk ] );
385
+				unset( $meta_value[$mk] );
386 386
 			}
387 387
 		}
388 388
 
@@ -479,14 +479,14 @@  discard block
 block discarded – undo
479 479
 		);
480 480
 
481 481
 		if ( ! $form_id ) {
482
-			$columns[ $form_id . '_user_id' ] = 'user_id';
483
-			$columns[ $form_id . '_name' ]    = 'name';
484
-			$columns[ $form_id . '_form_id' ] = 'form_id';
482
+			$columns[$form_id . '_user_id'] = 'user_id';
483
+			$columns[$form_id . '_name']    = 'name';
484
+			$columns[$form_id . '_form_id'] = 'form_id';
485 485
 		}
486 486
 
487 487
 		foreach ( $fields as $field ) {
488 488
 			if ( self::field_supports_sorting( $field ) ) {
489
-				$columns[ $form_id . '_' . $field->field_key ] = 'meta_' . $field->id;
489
+				$columns[$form_id . '_' . $field->field_key] = 'meta_' . $field->id;
490 490
 			}
491 491
 		}
492 492
 
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
 			$atts['form_id'] . '_item_key' => '',
584 584
 			$atts['form_id'] . '_id'       => '',
585 585
 		);
586
-		$cols         = $remove_first + array_reverse( $frm_vars['cols'], true );
586
+		$cols = $remove_first + array_reverse( $frm_vars['cols'], true );
587 587
 
588 588
 		$i = $atts['i'];
589 589
 
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
 
595 595
 			if ( ! $result || ! in_array( $col_key, $result, true ) ) {
596 596
 				$result[] = $col_key;
597
-				--$i;
597
+				-- $i;
598 598
 			}
599 599
 
600 600
 			unset( $col_key, $col );
@@ -773,9 +773,9 @@  discard block
 block discarded – undo
773 773
 		if ( ! isset( $frm_vars['form_params'] ) ) {
774 774
 			$frm_vars['form_params'] = array();
775 775
 		}
776
-		$frm_vars['form_params'][ $form->id ] = $params;
776
+		$frm_vars['form_params'][$form->id] = $params;
777 777
 
778
-		if ( isset( $frm_vars['created_entries'][ $form_id ] ) ) {
778
+		if ( isset( $frm_vars['created_entries'][$form_id] ) ) {
779 779
 			return;
780 780
 		}
781 781
 
@@ -792,17 +792,17 @@  discard block
 block discarded – undo
792 792
 		 */
793 793
 		$errors = apply_filters( 'frm_entries_before_create', $errors, $form );
794 794
 
795
-		$frm_vars['created_entries'][ $form_id ] = array( 'errors' => $errors );
795
+		$frm_vars['created_entries'][$form_id] = array( 'errors' => $errors );
796 796
 
797 797
 		if ( ! $errors ) {
798 798
 			$_POST['frm_skip_cookie'] = 1;
799 799
 			$do_success               = false;
800 800
 
801 801
 			if ( $params['action'] === 'create' ) {
802
-				if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][ $form_id ]['entry_id'] ) ) {
803
-					$frm_vars['created_entries'][ $form_id ]['entry_id'] = FrmEntry::create( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
802
+				if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][$form_id]['entry_id'] ) ) {
803
+					$frm_vars['created_entries'][$form_id]['entry_id'] = FrmEntry::create( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
804 804
 
805
-					$params['id'] = $frm_vars['created_entries'][ $form_id ]['entry_id'];
805
+					$params['id'] = $frm_vars['created_entries'][$form_id]['entry_id'];
806 806
 					$do_success   = true;
807 807
 				}
808 808
 			}
@@ -930,7 +930,7 @@  discard block
 block discarded – undo
930 930
 		$atts = shortcode_atts( $defaults, $atts );
931 931
 
932 932
 		if ( $atts['default_email'] ) {
933
-			$shortcode_atts  = array(
933
+			$shortcode_atts = array(
934 934
 				'format'     => $atts['format'],
935 935
 				'plain_text' => $atts['plain_text'],
936 936
 			);
Please login to merge, or discard this patch.
classes/models/FrmSolution.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,8 @@
 block discarded – undo
42 42
 		}
43 43
 
44 44
 		// Only do this for single site installs.
45
-		if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
45
+		if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) {
46
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
46 47
 			return;
47 48
 		}
48 49
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	 */
208 208
 	public function add_settings( $sections ) {
209 209
 		wp_enqueue_style( 'formidable-pro-fields' );
210
-		$sections[ $this->plugin_slug ] = array(
210
+		$sections[$this->plugin_slug] = array(
211 211
 			'class'    => $this,
212 212
 			'function' => 'settings_page',
213 213
 			'name'     => $this->plugin_name(),
@@ -380,9 +380,9 @@  discard block
 block discarded – undo
380 380
 			// Set the current step.
381 381
 			if ( ! isset( $step['current'] ) ) {
382 382
 				if ( $step['complete'] ) {
383
-					$steps[ $k ]['current'] = false;
383
+					$steps[$k]['current'] = false;
384 384
 				} else {
385
-					$steps[ $k ]['current'] = ! $has_current;
385
+					$steps[$k]['current'] = ! $has_current;
386 386
 					$has_current            = true;
387 387
 				}
388 388
 			} elseif ( $step['current'] ) {
@@ -393,10 +393,10 @@  discard block
 block discarded – undo
393 393
 			$class  = $step['button_class'] ?? '';
394 394
 			$class .= ' button-primary frm-button-primary';
395 395
 
396
-			if ( ! $steps[ $k ]['current'] ) {
396
+			if ( ! $steps[$k]['current'] ) {
397 397
 				$class .= ' frm_grey disabled';
398 398
 			}
399
-			$steps[ $k ]['button_class'] = $class;
399
+			$steps[$k]['button_class'] = $class;
400 400
 		}//end foreach
401 401
 
402 402
 		return $steps;
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
 		$addons = $api->get_api_info();
568 568
 
569 569
 		$id       = $this->download_id();
570
-		$has_file = isset( $addons[ $id ] ) && isset( $addons[ $id ]['beta'] );
570
+		$has_file = isset( $addons[$id] ) && isset( $addons[$id]['beta'] );
571 571
 
572 572
 		if ( ! $step['current'] ) {
573 573
 			?>
@@ -582,10 +582,10 @@  discard block
 block discarded – undo
582 582
 
583 583
 		if ( ! $has_file ) {
584 584
 			echo '<p class="frm_error_style">' . esc_html__( 'We didn\'t find anything to import. Please contact our team.', 'formidable' ) . '</p>';
585
-		} elseif ( ! isset( $addons[ $id ]['beta']['package'] ) ) {
585
+		} elseif ( ! isset( $addons[$id]['beta']['package'] ) ) {
586 586
 			echo '<p class="frm_error_style">' . esc_html__( 'Looks like you may not have a current subscription for this solution. Please check your account.', 'formidable' ) . '</p>';
587 587
 		} else {
588
-			$xml = $addons[ $id ]['beta']['package'];
588
+			$xml = $addons[$id]['beta']['package'];
589 589
 
590 590
 			if ( is_array( $xml ) ) {
591 591
 				$xml = reset( $xml );
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
 		foreach ( $options as $info ) {
667 667
 			// Count the number of options displayed for css.
668 668
 			if ( $count > 1 && ! isset( $info['img'] ) ) {
669
-				--$count;
669
+				-- $count;
670 670
 			}
671 671
 		}
672 672
 
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
 			$was_imported = isset( $form['form'] ) ? FrmForm::get_id_by_key( $form['form'] ) : false;
765 765
 
766 766
 			if ( $was_imported ) {
767
-				$imported[ $form['form'] ] = $was_imported;
767
+				$imported[$form['form']] = $was_imported;
768 768
 			}
769 769
 		}
770 770
 
Please login to merge, or discard this patch.
classes/helpers/FrmStylesHelper.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -336,7 +336,8 @@
 block discarded – undo
336 336
 		if ( self::previewing_style() ) {
337 337
 
338 338
 			$frm_style = new FrmStyle();
339
-			if ( isset( $_POST['frm_style_setting'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
339
+			if ( isset( $_POST['frm_style_setting'] ) ) {
340
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
340 341
 
341 342
 				// Sanitizing is done later.
342 343
 				$posted = wp_unslash( $_POST['frm_style_setting'] ); //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 				'-' => 'down',
163 163
 				'+' => 'up',
164 164
 			);
165
-			$class = 'frm_arrow' . $arrow[ $icon ];
165
+			$class = 'frm_arrow' . $arrow[$icon];
166 166
 		} else {
167 167
 			// frm_minus1_icon.
168 168
 			$key   = str_replace( 'p', '', $key );
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 				'-' => 'minus',
171 171
 				'+' => 'plus',
172 172
 			);
173
-			$class = 'frm_' . $plus[ $icon ];
173
+			$class = 'frm_' . $plus[$icon];
174 174
 		}
175 175
 
176 176
 		if ( $key ) {
@@ -196,8 +196,8 @@  discard block
 block discarded – undo
196 196
 		?>
197 197
 		<div class="btn-group" id="frm_<?php echo esc_attr( $name ); ?>_select">
198 198
 			<button class="multiselect dropdown-toggle btn btn-default" data-toggle="dropdown" type="button">
199
-				<?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[ $name ], '+', $type ) ); ?>
200
-				<?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[ $name ], '-', $type ) ); ?>
199
+				<?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[$name], '+', $type ) ); ?>
200
+				<?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[$name], '-', $type ) ); ?>
201 201
 				<b class="caret"></b>
202 202
 			</button>
203 203
 			<ul class="multiselect-container frm-dropdown-menu">
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 					<li <?php echo $style->post_content['collapse_icon'] == $key ? 'class="active"' : ''; // phpcs:ignore Universal.Operators.StrictComparisons ?>>
206 206
 						<a href="javascript:void(0);">
207 207
 							<label>
208
-								<input type="radio" value="<?php echo esc_attr( $key ); ?>" name="<?php echo esc_attr( $frm_style->get_field_name( $name ) ); ?>" <?php checked( $style->post_content[ $name ], $key ); ?> />
208
+								<input type="radio" value="<?php echo esc_attr( $key ); ?>" name="<?php echo esc_attr( $frm_style->get_field_name( $name ) ); ?>" <?php checked( $style->post_content[$name], $key ); ?> />
209 209
 								<span>
210 210
 									<?php
211 211
 									FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $key, '+', $type ) );
@@ -478,12 +478,12 @@  discard block
 block discarded – undo
478 478
 		$vars = array_diff( $vars, self::get_style_keys_to_remove_from_output_vars() );
479 479
 
480 480
 		foreach ( $vars as $var ) {
481
-			if ( ! isset( $settings[ $var ] ) || ! self::css_key_is_valid( $var ) ) {
481
+			if ( ! isset( $settings[$var] ) || ! self::css_key_is_valid( $var ) ) {
482 482
 				continue;
483 483
 			}
484 484
 
485
-			if ( ! isset( $defaults[ $var ] ) ) {
486
-				$defaults[ $var ] = '';
485
+			if ( ! isset( $defaults[$var] ) ) {
486
+				$defaults[$var] = '';
487 487
 			}
488 488
 
489 489
 			$prepared_value = '';
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
 			return false;
545 545
 		}
546 546
 
547
-		if ( $defaults && $defaults[ $var ] === $prepared_value ) {
547
+		if ( $defaults && $defaults[$var] === $prepared_value ) {
548 548
 			return false;
549 549
 		}
550 550
 
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
 	 * @return string
624 624
 	 */
625 625
 	private static function css_var_prepare_value( $settings, $key ) {
626
-		$value = $settings[ $key ];
626
+		$value = $settings[$key];
627 627
 
628 628
 		if ( ! is_string( $value ) && ! is_numeric( $value ) ) {
629 629
 			return '';
@@ -713,8 +713,8 @@  discard block
 block discarded – undo
713 713
 		$checkbox_opts = array( 'important_style', 'auto_width', 'submit_style', 'collapse_icon', 'center_form' );
714 714
 
715 715
 		foreach ( $checkbox_opts as $opt ) {
716
-			if ( ! isset( $settings[ $opt ] ) ) {
717
-				$settings[ $opt ] = 0;
716
+			if ( ! isset( $settings[$opt] ) ) {
717
+				$settings[$opt] = 0;
718 718
 			}
719 719
 		}
720 720
 
@@ -764,9 +764,9 @@  discard block
 block discarded – undo
764 764
 		);
765 765
 
766 766
 		array_map(
767
-			function ( $key ) use ( $defaults, $font_size, $base_font_size, &$settings ) {
768
-				if ( isset( $settings[ $key ] ) ) {
769
-					$settings[ $key ] = round( self::get_base_font_size_scale( $key, $font_size, $defaults ) * $base_font_size ) . 'px';
767
+			function( $key ) use ( $defaults, $font_size, $base_font_size, &$settings ) {
768
+				if ( isset( $settings[$key] ) ) {
769
+					$settings[$key] = round( self::get_base_font_size_scale( $key, $font_size, $defaults ) * $base_font_size ) . 'px';
770 770
 				}
771 771
 			},
772 772
 			$font_sizes_to_update
@@ -787,11 +787,11 @@  discard block
 block discarded – undo
787 787
 	 * @return float
788 788
 	 */
789 789
 	private static function get_base_font_size_scale( $key, $value, $defaults ) {
790
-		if ( empty( $defaults[ $key ] ) || ! is_numeric( (int) $defaults[ $key ] ) || ! is_numeric( (int) $value ) || 0 === (int) $value ) {
790
+		if ( empty( $defaults[$key] ) || ! is_numeric( (int) $defaults[$key] ) || ! is_numeric( (int) $value ) || 0 === (int) $value ) {
791 791
 			return 1;
792 792
 		}
793 793
 
794
-		return round( (int) $defaults[ $key ] / (int) $value, 2 );
794
+		return round( (int) $defaults[$key] / (int) $value, 2 );
795 795
 	}
796 796
 
797 797
 	/**
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
 			}
812 812
 
813 813
 			foreach ( $opts as $opt ) {
814
-				self::get_color_output( $css, $settings[ $opt ] );
814
+				self::get_color_output( $css, $settings[$opt] );
815 815
 			}
816 816
 		}
817 817
 	}
@@ -1039,13 +1039,13 @@  discard block
 block discarded – undo
1039 1039
 	 */
1040 1040
 	private static function get_default_style_count( $style_id, $conversational_style_id ) {
1041 1041
 		$substrings = array_map(
1042
-			function ( $value ) {
1042
+			function( $value ) {
1043 1043
 				$substring = serialize( array( 'custom_style' => $value ) );
1044 1044
 				return substr( $substring, 5, -1 );
1045 1045
 			},
1046 1046
 			array( '1', 1 )
1047 1047
 		);
1048
-		$where      = array(
1048
+		$where = array(
1049 1049
 			'status' => 'published',
1050 1050
 			0        => array(
1051 1051
 				'options NOT LIKE' => 'custom_style',
Please login to merge, or discard this patch.
classes/models/FrmStyleApi.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 		// Remove 'Styling Template' from titles.
51 51
 		foreach ( $api_info as $id => $template ) {
52 52
 			if ( isset( $template['name'] ) ) {
53
-				$api_info[ $id ]['name'] = preg_replace( '/(\sStyle|Styling)?(\sTemplate)?$/', '', $template['name'] );
53
+				$api_info[$id]['name'] = preg_replace( '/(\sStyle|Styling)?(\sTemplate)?$/', '', $template['name'] );
54 54
 			}
55 55
 		}
56 56
 
Please login to merge, or discard this patch.
classes/models/FrmReviews.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
 		$show_intervals = array( 50, 200, 500 );
81 81
 		$asked          = $this->review_status['asked'];
82 82
 
83
-		if ( ! isset( $show_intervals[ $asked ] ) ) {
83
+		if ( ! isset( $show_intervals[$asked] ) ) {
84 84
 			return;
85 85
 		}
86 86
 
87 87
 		$entries = FrmEntry::getRecordCount();
88
-		$count   = $show_intervals[ $asked ];
88
+		$count   = $show_intervals[$asked];
89 89
 		$user    = wp_get_current_user();
90 90
 
91 91
 		// Only show review request if the site has collected enough entries
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 		$requests = $message->get_messages();
135 135
 		$key      = $this->inbox_key . ( $asked ? $asked : '' );
136 136
 
137
-		if ( isset( $requests[ $key ] ) ) {
137
+		if ( isset( $requests[$key] ) ) {
138 138
 			return;
139 139
 		}
140 140
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	 * @return bool
174 174
 	 */
175 175
 	private function has_later_request( $requests, $asked ) {
176
-		return isset( $requests[ $this->inbox_key . ( $asked + 1 ) ] ) || isset( $requests[ $this->inbox_key . ( $asked + 2 ) ] );
176
+		return isset( $requests[$this->inbox_key . ( $asked + 1 )] ) || isset( $requests[$this->inbox_key . ( $asked + 2 )] );
177 177
 	}
178 178
 
179 179
 	/**
Please login to merge, or discard this patch.