Completed
Push — master ( bc4eda...8a4703 )
by
unknown
18s
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/fields/FrmFieldUrl.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 			'sep'  => ', ',
40 40
 			'html' => false,
41 41
 		);
42
-		$atts     = wp_parse_args( $atts, $defaults );
42
+		$atts = wp_parse_args( $atts, $defaults );
43 43
 
44 44
 		if ( $atts['html'] ) {
45 45
 			$atts['sep'] = ' ';
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
 
62 62
 		// validate the url format
63 63
 		if ( ! empty( $value ) && ! preg_match( '/^http(s)?:\/\/(?:localhost|(?:[\da-z\.-]+\.[\da-z\.-]+))/i', $value ) ) {
64
-			$errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
64
+			$errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
65 65
 		} elseif ( $this->field->required == '1' && empty( $value ) ) {
66
-			$errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'blank' );
66
+			$errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'blank' );
67 67
 		}
68 68
 
69 69
 		return $errors;
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/FrmSMTPController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -235,7 +235,7 @@
 block discarded – undo
235 235
 		if ( is_array( $upsell ) ) {
236 236
 			foreach ( $upsell as $k => $plugin ) {
237 237
 				if ( strpos( $plugin['slug'], 'wpforms' ) !== false ) {
238
-					unset( $upsell[ $k ] );
238
+					unset( $upsell[$k] );
239 239
 				}
240 240
 			}
241 241
 		}
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   +26 added lines, -26 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
 
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 		foreach ( $meta_value as $mk => $mv ) {
381 381
 			// Remove blank values.
382 382
 			if ( empty( $mv ) ) {
383
-				unset( $meta_value[ $mk ] );
383
+				unset( $meta_value[$mk] );
384 384
 			}
385 385
 		}
386 386
 
@@ -476,14 +476,14 @@  discard block
 block discarded – undo
476 476
 		);
477 477
 
478 478
 		if ( ! $form_id ) {
479
-			$columns[ $form_id . '_user_id' ] = 'user_id';
480
-			$columns[ $form_id . '_name' ]    = 'name';
481
-			$columns[ $form_id . '_form_id' ] = 'form_id';
479
+			$columns[$form_id . '_user_id'] = 'user_id';
480
+			$columns[$form_id . '_name']    = 'name';
481
+			$columns[$form_id . '_form_id'] = 'form_id';
482 482
 		}
483 483
 
484 484
 		foreach ( $fields as $field ) {
485 485
 			if ( self::field_supports_sorting( $field ) ) {
486
-				$columns[ $form_id . '_' . $field->field_key ] = 'meta_' . $field->id;
486
+				$columns[$form_id . '_' . $field->field_key] = 'meta_' . $field->id;
487 487
 			}
488 488
 		}
489 489
 
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
 			$atts['form_id'] . '_item_key' => '',
581 581
 			$atts['form_id'] . '_id'       => '',
582 582
 		);
583
-		$cols         = $remove_first + array_reverse( $frm_vars['cols'], true );
583
+		$cols = $remove_first + array_reverse( $frm_vars['cols'], true );
584 584
 
585 585
 		$i = $atts['i'];
586 586
 
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
 
592 592
 			if ( empty( $result ) || ! in_array( $col_key, $result, true ) ) {
593 593
 				$result[] = $col_key;
594
-				--$i;
594
+				-- $i;
595 595
 			}
596 596
 
597 597
 			unset( $col_key, $col );
@@ -770,9 +770,9 @@  discard block
 block discarded – undo
770 770
 		if ( ! isset( $frm_vars['form_params'] ) ) {
771 771
 			$frm_vars['form_params'] = array();
772 772
 		}
773
-		$frm_vars['form_params'][ $form->id ] = $params;
773
+		$frm_vars['form_params'][$form->id] = $params;
774 774
 
775
-		if ( isset( $frm_vars['created_entries'][ $form_id ] ) ) {
775
+		if ( isset( $frm_vars['created_entries'][$form_id] ) ) {
776 776
 			return;
777 777
 		}
778 778
 
@@ -788,17 +788,17 @@  discard block
 block discarded – undo
788 788
 		 */
789 789
 		$errors = apply_filters( 'frm_entries_before_create', $errors, $form );
790 790
 
791
-		$frm_vars['created_entries'][ $form_id ] = array( 'errors' => $errors );
791
+		$frm_vars['created_entries'][$form_id] = array( 'errors' => $errors );
792 792
 
793 793
 		if ( empty( $errors ) ) {
794 794
 			$_POST['frm_skip_cookie'] = 1;
795 795
 			$do_success               = false;
796 796
 
797 797
 			if ( $params['action'] === 'create' ) {
798
-				if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][ $form_id ]['entry_id'] ) ) {
799
-					$frm_vars['created_entries'][ $form_id ]['entry_id'] = FrmEntry::create( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
798
+				if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][$form_id]['entry_id'] ) ) {
799
+					$frm_vars['created_entries'][$form_id]['entry_id'] = FrmEntry::create( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
800 800
 
801
-					$params['id'] = $frm_vars['created_entries'][ $form_id ]['entry_id'];
801
+					$params['id'] = $frm_vars['created_entries'][$form_id]['entry_id'];
802 802
 					$do_success   = true;
803 803
 				}
804 804
 			}
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 ) {
@@ -198,8 +198,8 @@  discard block
 block discarded – undo
198 198
 		?>
199 199
 		<div class="btn-group" id="frm_<?php echo esc_attr( $name ); ?>_select">
200 200
 			<button class="multiselect dropdown-toggle btn btn-default" data-toggle="dropdown" type="button">
201
-				<?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[ $name ], '+', $type ) ); ?>
202
-				<?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[ $name ], '-', $type ) ); ?>
201
+				<?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[$name], '+', $type ) ); ?>
202
+				<?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[$name], '-', $type ) ); ?>
203 203
 				<b class="caret"></b>
204 204
 			</button>
205 205
 			<ul class="multiselect-container frm-dropdown-menu">
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 					<li <?php echo $style->post_content['collapse_icon'] == $key ? 'class="active"' : ''; ?>>
208 208
 						<a href="javascript:void(0);">
209 209
 							<label>
210
-								<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 ); ?> />
210
+								<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 ); ?> />
211 211
 								<span>
212 212
 									<?php
213 213
 									FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $key, '+', $type ) );
@@ -487,12 +487,12 @@  discard block
 block discarded – undo
487 487
 		$vars = array_diff( $vars, self::get_style_keys_to_remove_from_output_vars() );
488 488
 
489 489
 		foreach ( $vars as $var ) {
490
-			if ( ! isset( $settings[ $var ] ) || ! self::css_key_is_valid( $var ) ) {
490
+			if ( ! isset( $settings[$var] ) || ! self::css_key_is_valid( $var ) ) {
491 491
 				continue;
492 492
 			}
493 493
 
494
-			if ( ! isset( $defaults[ $var ] ) ) {
495
-				$defaults[ $var ] = '';
494
+			if ( ! isset( $defaults[$var] ) ) {
495
+				$defaults[$var] = '';
496 496
 			}
497 497
 
498 498
 			$prepared_value = '';
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
 			return false;
550 550
 		}
551 551
 
552
-		if ( $defaults && $defaults[ $var ] === $prepared_value ) {
552
+		if ( $defaults && $defaults[$var] === $prepared_value ) {
553 553
 			return false;
554 554
 		}
555 555
 
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
 	 * @return string
629 629
 	 */
630 630
 	private static function css_var_prepare_value( $settings, $key ) {
631
-		$value = $settings[ $key ];
631
+		$value = $settings[$key];
632 632
 
633 633
 		if ( ! is_string( $value ) && ! is_numeric( $value ) ) {
634 634
 			return '';
@@ -718,8 +718,8 @@  discard block
 block discarded – undo
718 718
 		$checkbox_opts = array( 'important_style', 'auto_width', 'submit_style', 'collapse_icon', 'center_form' );
719 719
 
720 720
 		foreach ( $checkbox_opts as $opt ) {
721
-			if ( ! isset( $settings[ $opt ] ) ) {
722
-				$settings[ $opt ] = 0;
721
+			if ( ! isset( $settings[$opt] ) ) {
722
+				$settings[$opt] = 0;
723 723
 			}
724 724
 		}
725 725
 
@@ -769,9 +769,9 @@  discard block
 block discarded – undo
769 769
 		);
770 770
 
771 771
 		array_map(
772
-			function ( $key ) use ( $defaults, $font_size, $base_font_size, &$settings ) {
773
-				if ( isset( $settings[ $key ] ) ) {
774
-					$settings[ $key ] = round( self::get_base_font_size_scale( $key, $font_size, $defaults ) * $base_font_size ) . 'px';
772
+			function( $key ) use ( $defaults, $font_size, $base_font_size, &$settings ) {
773
+				if ( isset( $settings[$key] ) ) {
774
+					$settings[$key] = round( self::get_base_font_size_scale( $key, $font_size, $defaults ) * $base_font_size ) . 'px';
775 775
 				}
776 776
 			},
777 777
 			$font_sizes_to_update
@@ -792,11 +792,11 @@  discard block
 block discarded – undo
792 792
 	 * @return float
793 793
 	 */
794 794
 	private static function get_base_font_size_scale( $key, $value, $defaults ) {
795
-		if ( empty( $defaults[ $key ] ) || ! is_numeric( (int) $defaults[ $key ] ) || ! is_numeric( (int) $value ) || 0 === (int) $value ) {
795
+		if ( empty( $defaults[$key] ) || ! is_numeric( (int) $defaults[$key] ) || ! is_numeric( (int) $value ) || 0 === (int) $value ) {
796 796
 			return 1;
797 797
 		}
798 798
 
799
-		return round( (int) $defaults[ $key ] / (int) $value, 2 );
799
+		return round( (int) $defaults[$key] / (int) $value, 2 );
800 800
 	}
801 801
 
802 802
 	/**
@@ -816,7 +816,7 @@  discard block
 block discarded – undo
816 816
 			}
817 817
 
818 818
 			foreach ( $opts as $opt ) {
819
-				self::get_color_output( $css, $settings[ $opt ] );
819
+				self::get_color_output( $css, $settings[$opt] );
820 820
 			}
821 821
 		}
822 822
 	}
@@ -1045,13 +1045,13 @@  discard block
 block discarded – undo
1045 1045
 	 */
1046 1046
 	private static function get_default_style_count( $style_id, $conversational_style_id ) {
1047 1047
 		$substrings = array_map(
1048
-			function ( $value ) {
1048
+			function( $value ) {
1049 1049
 				$substring = serialize( array( 'custom_style' => $value ) );
1050 1050
 				return substr( $substring, 5, -1 );
1051 1051
 			},
1052 1052
 			array( '1', 1 )
1053 1053
 		);
1054
-		$where      = array(
1054
+		$where = array(
1055 1055
 			'status' => 'published',
1056 1056
 			0        => array(
1057 1057
 				'options NOT LIKE' => 'custom_style',
Please login to merge, or discard this patch.