Completed
Pull Request — master (#2513)
by
unknown
47s
created
classes/models/FrmEntryMeta.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
 		global $wpdb;
60 60
 
61
-		$values               = array(
61
+		$values = array(
62 62
 			'item_id'  => $entry_id,
63 63
 			'field_id' => $field_id,
64 64
 		);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 				}
139 139
 			}
140 140
 
141
-			$values_indexed_by_field_id[ $field_id ] = $meta_value;
141
+			$values_indexed_by_field_id[$field_id] = $meta_value;
142 142
 
143 143
 			self::get_value_to_save( compact( 'field', 'field_id', 'entry_id' ), $meta_value );
144 144
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
 				if ( ( is_array( $meta_value ) && empty( $meta_value ) ) || ( ! is_array( $meta_value ) && trim( $meta_value ) === '' ) ) {
148 148
 					// Remove blank fields.
149
-					unset( $values_indexed_by_field_id[ $field_id ] );
149
+					unset( $values_indexed_by_field_id[$field_id] );
150 150
 				} else {
151 151
 					// if value exists, then update it
152 152
 					self::update_entry_meta( $entry_id, $field_id, '', $meta_value );
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 	 */
225 225
 	public static function get_meta_value( $entry, $field_id ) {
226 226
 		if ( isset( $entry->metas ) ) {
227
-			return $entry->metas[ $field_id ] ?? false;
227
+			return $entry->metas[$field_id] ?? false;
228 228
 		}
229 229
 		return self::get_entry_meta_by_field( $entry->id, $field_id );
230 230
 	}
@@ -246,8 +246,8 @@  discard block
 block discarded – undo
246 246
 			$cached   = FrmDb::check_cache( $entry_id, 'frm_entry' );
247 247
 		}
248 248
 
249
-		if ( $cached && isset( $cached->metas ) && isset( $cached->metas[ $field_id ] ) ) {
250
-			$result = $cached->metas[ $field_id ];
249
+		if ( $cached && isset( $cached->metas ) && isset( $cached->metas[$field_id] ) ) {
250
+			$result = $cached->metas[$field_id];
251 251
 
252 252
 			return wp_unslash( $result );
253 253
 		}
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 			'stripslashes' => true,
281 281
 			'is_draft'     => false,
282 282
 		);
283
-		$args     = wp_parse_args( $args, $defaults );
283
+		$args = wp_parse_args( $args, $defaults );
284 284
 
285 285
 		$query = array();
286 286
 		self::meta_field_query( $field_id, $order, $limit, $args, $query );
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 
296 296
 		foreach ( $values as $k => $v ) {
297 297
 			FrmAppHelper::unserialize_or_decode( $v );
298
-			$values[ $k ] = $v;
298
+			$values[$k] = $v;
299 299
 			unset( $k, $v );
300 300
 		}
301 301
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 
363 363
 		foreach ( $results as $k => $result ) {
364 364
 			FrmAppHelper::unserialize_or_decode( $result->meta_value );
365
-			$results[ $k ]->meta_value = wp_unslash( $result->meta_value );
365
+			$results[$k]->meta_value = wp_unslash( $result->meta_value );
366 366
 			unset( $k, $result );
367 367
 		}
368 368
 
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 			'user_id'  => '',
376 376
 			'group_by' => '',
377 377
 		);
378
-		$args     = wp_parse_args( $args, $defaults );
378
+		$args = wp_parse_args( $args, $defaults );
379 379
 
380 380
 		$query = array();
381 381
 		self::get_ids_query( $where, $order_by, $limit, $unique, $args, $query );
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
 			} elseif ( false !== strpos( $args['is_draft'], ',' ) ) {
479 479
 				$is_draft = array_reduce(
480 480
 					explode( ',', $args['is_draft'] ),
481
-					function ( $total, $current ) {
481
+					function( $total, $current ) {
482 482
 						if ( is_numeric( $current ) ) {
483 483
 							$total[] = absint( $current );
484 484
 						}
Please login to merge, or discard this patch.
classes/controllers/FrmFormActionsController.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -133,19 +133,19 @@  discard block
 block discarded – undo
133 133
 		}
134 134
 
135 135
 		foreach ( $action_controls as $action ) {
136
-			if ( isset( $groups[ $action->id_base ] ) || in_array( $action->id_base, $grouped ) ) {
136
+			if ( isset( $groups[$action->id_base] ) || in_array( $action->id_base, $grouped ) ) {
137 137
 				continue;
138 138
 			}
139 139
 
140 140
 			$this_group = $action->action_options['group'];
141
-			if ( ! isset( $groups[ $this_group ] ) ) {
141
+			if ( ! isset( $groups[$this_group] ) ) {
142 142
 				$this_group = 'misc';
143 143
 			}
144 144
 
145
-			if ( ! isset( $groups[ $this_group ]['actions'] ) ) {
146
-				$groups[ $this_group ]['actions'] = array();
145
+			if ( ! isset( $groups[$this_group]['actions'] ) ) {
146
+				$groups[$this_group]['actions'] = array();
147 147
 			}
148
-			$groups[ $this_group ]['actions'][] = $action->id_base;
148
+			$groups[$this_group]['actions'][] = $action->id_base;
149 149
 
150 150
 			unset( $action );
151 151
 		}
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 				return $a;
320 320
 			}
321 321
 
322
-			$actions[ $a->id_base ] = $a;
322
+			$actions[$a->id_base] = $a;
323 323
 		}
324 324
 
325 325
 		return $actions;
@@ -358,18 +358,18 @@  discard block
 block discarded – undo
358 358
 		$action_map = array();
359 359
 
360 360
 		foreach ( $action_controls as $key => $control ) {
361
-			$action_map[ $control->id_base ] = $key;
361
+			$action_map[$control->id_base] = $key;
362 362
 		}
363 363
 
364 364
 		self::maybe_show_limit_warning( $form->id, $form_actions );
365 365
 
366 366
 		foreach ( $form_actions as $action ) {
367
-			if ( ! isset( $action_map[ $action->post_excerpt ] ) ) {
367
+			if ( ! isset( $action_map[$action->post_excerpt] ) ) {
368 368
 				// don't try and show settings if action no longer exists
369 369
 				continue;
370 370
 			}
371 371
 
372
-			self::action_control( $action, $form, $action->ID, $action_controls[ $action_map[ $action->post_excerpt ] ], $values );
372
+			self::action_control( $action, $form, $action->ID, $action_controls[$action_map[$action->post_excerpt]], $values );
373 373
 		}
374 374
 	}
375 375
 
@@ -681,8 +681,8 @@  discard block
 block discarded – undo
681 681
 			}
682 682
 
683 683
 			// Store actions so they can be triggered with the correct priority.
684
-			$stored_actions[ $action->ID ]  = $action;
685
-			$action_priority[ $action->ID ] = $link_settings[ $action->post_excerpt ]->action_options['priority'];
684
+			$stored_actions[$action->ID]  = $action;
685
+			$action_priority[$action->ID] = $link_settings[$action->post_excerpt]->action_options['priority'];
686 686
 
687 687
 			unset( $action );
688 688
 		}//end foreach
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
 			new FrmNotification();
695 695
 
696 696
 			foreach ( $action_priority as $action_id => $priority ) {
697
-				$action = $stored_actions[ $action_id ];
697
+				$action = $stored_actions[$action_id];
698 698
 
699 699
 				/**
700 700
 				 * Allows custom form action trigger.
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
 	 * @return void
792 792
 	 */
793 793
 	public function register( $action_class ) {
794
-		$this->actions[ $action_class ] = new $action_class();
794
+		$this->actions[$action_class] = new $action_class();
795 795
 	}
796 796
 
797 797
 	/**
@@ -800,8 +800,8 @@  discard block
 block discarded – undo
800 800
 	 * @return void
801 801
 	 */
802 802
 	public function unregister( $action_class ) {
803
-		if ( isset( $this->actions[ $action_class ] ) ) {
804
-			unset( $this->actions[ $action_class ] );
803
+		if ( isset( $this->actions[$action_class] ) ) {
804
+			unset( $this->actions[$action_class] );
805 805
 		}
806 806
 	}
807 807
 
@@ -810,8 +810,8 @@  discard block
 block discarded – undo
810 810
 
811 811
 		foreach ( $keys as $key ) {
812 812
 			// don't register new action if old action with the same id is already registered
813
-			if ( ! isset( $this->actions[ $key ] ) ) {
814
-				$this->actions[ $key ]->_register();
813
+			if ( ! isset( $this->actions[$key] ) ) {
814
+				$this->actions[$key]->_register();
815 815
 			}
816 816
 		}
817 817
 	}
Please login to merge, or discard this patch.
classes/models/FrmAddon.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -593,7 +593,8 @@
 block discarded – undo
593 593
 	 * @return void
594 594
 	 */
595 595
 	private function is_license_revoked() {
596
-		if ( empty( $this->license ) || empty( $this->plugin_slug ) || isset( $_POST['license'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
596
+		if ( empty( $this->license ) || empty( $this->plugin_slug ) || isset( $_POST['license'] ) ) {
597
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
597 598
 			return;
598 599
 		}
599 600
 
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	 * @return array
140 140
 	 */
141 141
 	public function insert_installed_addon( $plugins ) {
142
-		$plugins[ $this->plugin_slug ] = $this;
142
+		$plugins[$this->plugin_slug] = $this;
143 143
 
144 144
 		return $plugins;
145 145
 	}
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
 		$plugins = apply_filters( 'frm_installed_addons', array() );
154 154
 		$plugin  = false;
155 155
 
156
-		if ( isset( $plugins[ $plugin_slug ] ) ) {
157
-			$plugin = $plugins[ $plugin_slug ];
156
+		if ( isset( $plugins[$plugin_slug] ) ) {
157
+			$plugin = $plugins[$plugin_slug];
158 158
 		}
159 159
 
160 160
 		return $plugin;
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 		} else {
220 220
 			$api     = new FrmFormApi( $this->license );
221 221
 			$plugins = $api->get_api_info();
222
-			$_data   = $plugins[ $item_id ];
222
+			$_data   = $plugins[$item_id];
223 223
 		}
224 224
 
225 225
 		$_data['sections'] = array(
@@ -520,19 +520,19 @@  discard block
 block discarded – undo
520 520
 
521 521
 		if ( $this->is_current_version( $transient ) ) {
522 522
 			// Make sure it doesn't show there is an update if plugin is up-to-date.
523
-			if ( isset( $transient->response[ $this->plugin_folder ] ) ) {
524
-				unset( $transient->response[ $this->plugin_folder ] );
523
+			if ( isset( $transient->response[$this->plugin_folder] ) ) {
524
+				unset( $transient->response[$this->plugin_folder] );
525 525
 			}
526
-		} elseif ( isset( $transient->response ) && isset( $transient->response[ $this->plugin_folder ] ) ) {
527
-			$this->prepare_update_details( $transient->response[ $this->plugin_folder ] );
526
+		} elseif ( isset( $transient->response ) && isset( $transient->response[$this->plugin_folder] ) ) {
527
+			$this->prepare_update_details( $transient->response[$this->plugin_folder] );
528 528
 
529 529
 			// if the transient has expired, clear the update and trigger it again
530
-			if ( $transient->response[ $this->plugin_folder ] === false ) {
530
+			if ( $transient->response[$this->plugin_folder] === false ) {
531 531
 				if ( ! $this->has_been_cleared() ) {
532 532
 					$this->cleared_plugins();
533 533
 					$this->manually_queue_update();
534 534
 				}
535
-				unset( $transient->response[ $this->plugin_folder ] );
535
+				unset( $transient->response[$this->plugin_folder] );
536 536
 			}
537 537
 		}
538 538
 
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
 	 * @return bool
646 646
 	 */
647 647
 	private function is_current_version( $transient ) {
648
-		if ( empty( $transient->checked ) || ! isset( $transient->checked[ $this->plugin_folder ] ) ) {
648
+		if ( empty( $transient->checked ) || ! isset( $transient->checked[$this->plugin_folder] ) ) {
649 649
 			return false;
650 650
 		}
651 651
 
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
 			return true;
656 656
 		}
657 657
 
658
-		return isset( $transient->response ) && isset( $transient->response[ $this->plugin_folder ] ) && $transient->checked[ $this->plugin_folder ] === $transient->response[ $this->plugin_folder ]->new_version;
658
+		return isset( $transient->response ) && isset( $transient->response[$this->plugin_folder] ) && $transient->checked[$this->plugin_folder] === $transient->response[$this->plugin_folder]->new_version;
659 659
 	}
660 660
 
661 661
 	/**
@@ -826,8 +826,8 @@  discard block
 block discarded – undo
826 826
 		} else {
827 827
 			$messages = $this->get_messages();
828 828
 
829
-			if ( is_string( $response['status'] ) && isset( $messages[ $response['status'] ] ) ) {
830
-				$response['message'] = $messages[ $response['status'] ];
829
+			if ( is_string( $response['status'] ) && isset( $messages[$response['status']] ) ) {
830
+				$response['message'] = $messages[$response['status']];
831 831
 			} else {
832 832
 				$response['message'] = FrmAppHelper::kses( $response['status'], array( 'a' ) );
833 833
 			}
@@ -1010,7 +1010,7 @@  discard block
 block discarded – undo
1010 1010
 			'user-agent' => $this->plugin_slug . '/' . $this->version . '; ' . get_bloginfo( 'url' ),
1011 1011
 		);
1012 1012
 
1013
-		$resp              = wp_remote_post(
1013
+		$resp = wp_remote_post(
1014 1014
 			$this->store_url . '?l=' . urlencode( base64_encode( $this->license ) ),
1015 1015
 			$arg_array
1016 1016
 		);
Please login to merge, or discard this patch.
classes/helpers/FrmFieldsHelper.php 2 patches
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -231,7 +231,8 @@  discard block
 block discarded – undo
231 231
 				return false;
232 232
 			}
233 233
 
234
-			if ( ! $_POST || ! isset( $_POST['field_options'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
234
+			if ( ! $_POST || ! isset( $_POST['field_options'] ) ) {
235
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
235 236
 				return false;
236 237
 			}
237 238
 
@@ -338,7 +339,8 @@  discard block
 block discarded – undo
338 339
 	 * @return void
339 340
 	 */
340 341
 	private static function get_posted_field_setting( $setting, &$value ) {
341
-		if ( ! isset( $_POST['field_options'][ $setting ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
342
+		if ( ! isset( $_POST['field_options'][ $setting ] ) ) {
343
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
342 344
 			return;
343 345
 		}
344 346
 
@@ -1531,7 +1533,8 @@  discard block
 block discarded – undo
1531 1533
 
1532 1534
 		// Check posted vals before checking saved values
1533 1535
 		// For fields inside repeating sections - note, don't check if $pointer is true because it will often be zero
1534
-		if ( $parent && isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1536
+		if ( $parent && isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ) {
1537
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
1535 1538
 			if ( FrmField::is_field_with_multiple_values( $field ) ) {
1536 1539
 				// phpcs:ignore WordPress.Security.NonceVerification.Missing
1537 1540
 				$other_val = isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ][ $opt_key ] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ][ $opt_key ] ) ) : '';
@@ -1542,7 +1545,8 @@  discard block
 block discarded – undo
1542 1545
 			return $other_val;
1543 1546
 		}
1544 1547
 
1545
-		if ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][ $field['id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1548
+		if ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][ $field['id'] ] ) ) {
1549
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
1546 1550
 			// For normal fields
1547 1551
 
1548 1552
 			if ( FrmField::is_field_with_multiple_values( $field ) ) {
Please login to merge, or discard this patch.
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 			if ( in_array( $type, array( 'data', 'lookup' ), true ) ) {
45 45
 				$values['field_options']['data_type'] = $setting;
46 46
 			} else {
47
-				$values['field_options'][ $setting ] = 1;
47
+				$values['field_options'][$setting] = 1;
48 48
 			}
49 49
 		}
50 50
 
@@ -209,10 +209,10 @@  discard block
 block discarded – undo
209 209
 		}
210 210
 
211 211
 		foreach ( $defaults as $opt => $default ) {
212
-			$values[ $opt ] = $field->field_options[ $opt ] ?? $default;
212
+			$values[$opt] = $field->field_options[$opt] ?? $default;
213 213
 
214 214
 			if ( $check_post ) {
215
-				self::get_posted_field_setting( $opt . '_' . $field->id, $values[ $opt ] );
215
+				self::get_posted_field_setting( $opt . '_' . $field->id, $values[$opt] );
216 216
 			}
217 217
 		}
218 218
 	}
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 			return self::$context_is_safe_to_load_field_options_from_request_data;
230 230
 		}
231 231
 
232
-		$function = function () {
232
+		$function = function() {
233 233
 			if ( ! FrmAppHelper::is_admin_page() ) {
234 234
 				return false;
235 235
 			}
@@ -343,12 +343,12 @@  discard block
 block discarded – undo
343 343
 	 * @return void
344 344
 	 */
345 345
 	private static function get_posted_field_setting( $setting, &$value ) {
346
-		if ( ! isset( $_POST['field_options'][ $setting ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
346
+		if ( ! isset( $_POST['field_options'][$setting] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
347 347
 			return;
348 348
 		}
349 349
 
350 350
 		if ( strpos( $setting, 'html' ) !== false ) {
351
-			$value = wp_unslash( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
351
+			$value = wp_unslash( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
352 352
 
353 353
 			// Conditionally strip script tags if the user sending $_POST data is not allowed to use unfiltered HTML.
354 354
 			if ( ! FrmAppHelper::allow_unfiltered_html() ) {
@@ -356,9 +356,9 @@  discard block
 block discarded – undo
356 356
 			}
357 357
 		} elseif ( strpos( $setting, 'format_' ) === 0 ) {
358 358
 			// TODO: Remove stripslashes on output, and use on input only.
359
-			$value = sanitize_text_field( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.NonceVerification.Missing
359
+			$value = sanitize_text_field( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.NonceVerification.Missing
360 360
 		} else {
361
-			$value = wp_unslash( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
361
+			$value = wp_unslash( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
362 362
 			FrmAppHelper::sanitize_value( 'wp_kses_post', $value );
363 363
 		}
364 364
 	}
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 		$values['default_value'] = FrmAppHelper::maybe_json_encode( $field->default_value );
443 443
 
444 444
 		foreach ( array( 'name', 'description', 'type', 'field_order', 'field_options', 'required' ) as $col ) {
445
-			$values[ $col ] = $field->{$col};
445
+			$values[$col] = $field->{$col};
446 446
 		}
447 447
 	}
448 448
 
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 		$defaults = apply_filters( 'frm_default_field_validation_messages', $defaults, $field );
489 489
 
490 490
 		$msg = FrmField::get_option( $field, $error );
491
-		$msg = empty( $msg ) ? $defaults[ $error ]['part'] : $msg;
491
+		$msg = empty( $msg ) ? $defaults[$error]['part'] : $msg;
492 492
 		$msg = do_shortcode( $msg );
493 493
 
494 494
 		$msg = self::maybe_replace_substrings_with_field_name( $msg, $error, $field );
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
 			'inside_class' => 'inside',
826 826
 			'dismiss-icon' => true,
827 827
 		);
828
-		$args     = array_merge( $defaults, $args );
828
+		$args = array_merge( $defaults, $args );
829 829
 
830 830
 		include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/inline-modal.php';
831 831
 	}
@@ -1116,7 +1116,7 @@  discard block
 block discarded – undo
1116 1116
 				continue;
1117 1117
 			}
1118 1118
 
1119
-			$atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[3][ $short_key ] );
1119
+			$atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[3][$short_key] );
1120 1120
 			$tag  = FrmShortcodeHelper::get_shortcode_tag( $shortcodes, $short_key );
1121 1121
 
1122 1122
 			$atts['entry'] = $entry;
@@ -1126,7 +1126,7 @@  discard block
 block discarded – undo
1126 1126
 			if ( $replace_with !== null ) {
1127 1127
 				$replace_with = self::trigger_shortcode_atts( $replace_with, $atts );
1128 1128
 				self::sanitize_embedded_shortcodes( compact( 'entry' ), $replace_with );
1129
-				$content = str_replace( $shortcodes[0][ $short_key ], $replace_with, $content );
1129
+				$content = str_replace( $shortcodes[0][$short_key], $replace_with, $content );
1130 1130
 			}
1131 1131
 
1132 1132
 			unset( $atts, $replace_with );
@@ -1146,7 +1146,7 @@  discard block
 block discarded – undo
1146 1146
 		$included_atts  = array_intersect( $supported_atts, array_keys( $atts ) );
1147 1147
 
1148 1148
 		foreach ( $included_atts as $included_att ) {
1149
-			if ( '0' === $atts[ $included_att ] ) {
1149
+			if ( '0' === $atts[$included_att] ) {
1150 1150
 				// Skip any option that uses 0 so sanitize_url=0 does not encode.
1151 1151
 				continue;
1152 1152
 			}
@@ -1229,8 +1229,8 @@  discard block
 block discarded – undo
1229 1229
 
1230 1230
 		$dynamic_default = array( 'admin_email', 'siteurl', 'frmurl', 'sitename', 'get', 'default-email', 'default-from-email' );
1231 1231
 
1232
-		if ( isset( $shortcode_values[ $atts['tag'] ] ) ) {
1233
-			$replace_with = $shortcode_values[ $atts['tag'] ];
1232
+		if ( isset( $shortcode_values[$atts['tag']] ) ) {
1233
+			$replace_with = $shortcode_values[$atts['tag']];
1234 1234
 		} elseif ( in_array( $atts['tag'], $dynamic_default, true ) ) {
1235 1235
 			$replace_with = self::dynamic_default_values( $atts['tag'], $atts );
1236 1236
 		} elseif ( $clean_tag === 'user_agent' ) {
@@ -1479,8 +1479,8 @@  discard block
 block discarded – undo
1479 1479
 			self::field_types_for_input( $single_input, $field_selection, $field_types );
1480 1480
 		} elseif ( in_array( $type, $multiple_input, true ) ) {
1481 1481
 			self::field_types_for_input( $multiple_input, $field_selection, $field_types );
1482
-		} elseif ( isset( $field_selection[ $type ] ) ) {
1483
-			$field_types[ $type ] = $field_selection[ $type ];
1482
+		} elseif ( isset( $field_selection[$type] ) ) {
1483
+			$field_types[$type] = $field_selection[$type];
1484 1484
 		}
1485 1485
 
1486 1486
 		$field_types = apply_filters( 'frm_switch_field_types', $field_types, compact( 'type', 'field_selection' ) );
@@ -1525,7 +1525,7 @@  discard block
 block discarded – undo
1525 1525
 		foreach ( $inputs as $input ) {
1526 1526
 			// This may not be set if a field type was removed using the frm_available_fields or frm_pro_available_fields filters.
1527 1527
 			if ( array_key_exists( $input, $fields ) ) {
1528
-				$field_types[ $input ] = $fields[ $input ];
1528
+				$field_types[$input] = $fields[$input];
1529 1529
 			}
1530 1530
 			unset( $input );
1531 1531
 		}
@@ -1560,7 +1560,7 @@  discard block
 block discarded – undo
1560 1560
 			'parent'  => false,
1561 1561
 			'pointer' => false,
1562 1562
 		);
1563
-		$args     = wp_parse_args( $args, $defaults );
1563
+		$args = wp_parse_args( $args, $defaults );
1564 1564
 
1565 1565
 		$opt_key   = $args['opt_key'];
1566 1566
 		$field     = $args['field'];
@@ -1576,25 +1576,25 @@  discard block
 block discarded – undo
1576 1576
 
1577 1577
 		// Check posted vals before checking saved values
1578 1578
 		// For fields inside repeating sections - note, don't check if $pointer is true because it will often be zero
1579
-		if ( $parent && isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1579
+		if ( $parent && isset( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1580 1580
 			if ( FrmField::is_field_with_multiple_values( $field ) ) {
1581 1581
 				// phpcs:ignore WordPress.Security.NonceVerification.Missing
1582
-				$other_val = isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ][ $opt_key ] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ][ $opt_key ] ) ) : '';
1582
+				$other_val = isset( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']][$opt_key] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']][$opt_key] ) ) : '';
1583 1583
 			} else {
1584
-				$other_val = sanitize_text_field( wp_unslash( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
1584
+				$other_val = sanitize_text_field( wp_unslash( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
1585 1585
 			}
1586 1586
 
1587 1587
 			return $other_val;
1588 1588
 		}
1589 1589
 
1590
-		if ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][ $field['id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1590
+		if ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][$field['id']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1591 1591
 			// For normal fields
1592 1592
 
1593 1593
 			if ( FrmField::is_field_with_multiple_values( $field ) ) {
1594 1594
 				// phpcs:ignore WordPress.Security.NonceVerification.Missing
1595
-				$other_val = isset( $_POST['item_meta']['other'][ $field['id'] ][ $opt_key ] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][ $field['id'] ][ $opt_key ] ) ) : '';
1595
+				$other_val = isset( $_POST['item_meta']['other'][$field['id']][$opt_key] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][$field['id']][$opt_key] ) ) : '';
1596 1596
 			} else {
1597
-				$other_val = sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][ $field['id'] ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
1597
+				$other_val = sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][$field['id']] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
1598 1598
 			}
1599 1599
 
1600 1600
 			return $other_val;
@@ -1604,8 +1604,8 @@  discard block
 block discarded – undo
1604 1604
 		if ( $field['type'] === 'checkbox' && is_array( $field['value'] ) ) {
1605 1605
 			// Check if there is an "other" val in saved value and make sure the
1606 1606
 			// "other" val is not equal to the Other checkbox option
1607
-			if ( isset( $field['value'][ $opt_key ] ) && $field['options'][ $opt_key ] != $field['value'][ $opt_key ] ) {
1608
-				$other_val = $field['value'][ $opt_key ];
1607
+			if ( isset( $field['value'][$opt_key] ) && $field['options'][$opt_key] != $field['value'][$opt_key] ) {
1608
+				$other_val = $field['value'][$opt_key];
1609 1609
 			}
1610 1610
 		} else {
1611 1611
 			/**
@@ -1619,8 +1619,8 @@  discard block
 block discarded – undo
1619 1619
 				if ( is_array( $field['value'] ) ) {
1620 1620
 					$o_key = array_search( $temp_val, $field['value'] );
1621 1621
 
1622
-					if ( isset( $field['value'][ $o_key ] ) ) {
1623
-						unset( $field['value'][ $o_key ], $o_key );
1622
+					if ( isset( $field['value'][$o_key] ) ) {
1623
+						unset( $field['value'][$o_key], $o_key );
1624 1624
 					}
1625 1625
 				} elseif ( $temp_val == $field['value'] ) {
1626 1626
 					// For radio and regular dropdowns
@@ -1850,11 +1850,11 @@  discard block
 block discarded – undo
1850 1850
 			foreach ( $val as $k => $v ) {
1851 1851
 				if ( is_string( $v ) ) {
1852 1852
 					if ( 'custom_html' === $k ) {
1853
-						$val[ $k ] = self::switch_ids_except_strings( $replace, $replace_with, array( '[if description]', '[description]', '[/if description]' ), $v );
1853
+						$val[$k] = self::switch_ids_except_strings( $replace, $replace_with, array( '[if description]', '[description]', '[/if description]' ), $v );
1854 1854
 						unset( $k, $v );
1855 1855
 						continue;
1856 1856
 					}
1857
-					$val[ $k ] = str_replace( $replace, $replace_with, $v );
1857
+					$val[$k] = str_replace( $replace, $replace_with, $v );
1858 1858
 					unset( $k, $v );
1859 1859
 				}
1860 1860
 			}
@@ -1884,8 +1884,8 @@  discard block
 block discarded – undo
1884 1884
 			if ( false === $index ) {
1885 1885
 				continue;
1886 1886
 			}
1887
-			unset( $replace[ $index ] );
1888
-			unset( $replace_with[ $index ] );
1887
+			unset( $replace[$index] );
1888
+			unset( $replace_with[$index] );
1889 1889
 		}
1890 1890
 
1891 1891
 		$value = str_replace( $replace, $replace_with, $value );
@@ -2245,7 +2245,7 @@  discard block
 block discarded – undo
2245 2245
 			$countries['class'] = 'frm-countries-opts';
2246 2246
 		}
2247 2247
 
2248
-		$prepop[ __( 'Countries', 'formidable' ) ] = $countries;
2248
+		$prepop[__( 'Countries', 'formidable' )] = $countries;
2249 2249
 
2250 2250
 		// State abv.
2251 2251
 		$states    = self::get_us_states();
@@ -2256,7 +2256,7 @@  discard block
 block discarded – undo
2256 2256
 			$state_abv['class'] = 'frm-state-abv-opts';
2257 2257
 		}
2258 2258
 
2259
-		$prepop[ __( 'U.S. State Abbreviations', 'formidable' ) ] = $state_abv;
2259
+		$prepop[__( 'U.S. State Abbreviations', 'formidable' )] = $state_abv;
2260 2260
 
2261 2261
 		// States.
2262 2262
 		$states = array_values( $states );
@@ -2266,7 +2266,7 @@  discard block
 block discarded – undo
2266 2266
 			$states['class'] = 'frm-states-opts';
2267 2267
 		}
2268 2268
 
2269
-		$prepop[ __( 'U.S. States', 'formidable' ) ] = $states;
2269
+		$prepop[__( 'U.S. States', 'formidable' )] = $states;
2270 2270
 		unset( $state_abv, $states );
2271 2271
 
2272 2272
 		// Age.
@@ -2285,7 +2285,7 @@  discard block
 block discarded – undo
2285 2285
 			$ages['class'] = 'frm-age-opts';
2286 2286
 		}
2287 2287
 
2288
-		$prepop[ __( 'Age', 'formidable' ) ] = $ages;
2288
+		$prepop[__( 'Age', 'formidable' )] = $ages;
2289 2289
 
2290 2290
 		// Satisfaction.
2291 2291
 		$satisfaction = array(
@@ -2301,7 +2301,7 @@  discard block
 block discarded – undo
2301 2301
 			$satisfaction['class'] = 'frm-satisfaction-opts';
2302 2302
 		}
2303 2303
 
2304
-		$prepop[ __( 'Satisfaction', 'formidable' ) ] = $satisfaction;
2304
+		$prepop[__( 'Satisfaction', 'formidable' )] = $satisfaction;
2305 2305
 
2306 2306
 		// Importance.
2307 2307
 		$importance = array(
@@ -2317,7 +2317,7 @@  discard block
 block discarded – undo
2317 2317
 			$importance['class'] = 'frm-importance-opts';
2318 2318
 		}
2319 2319
 
2320
-		$prepop[ __( 'Importance', 'formidable' ) ] = $importance;
2320
+		$prepop[__( 'Importance', 'formidable' )] = $importance;
2321 2321
 
2322 2322
 		// Agreement.
2323 2323
 		$agreement = array(
@@ -2333,7 +2333,7 @@  discard block
 block discarded – undo
2333 2333
 			$agreement['class'] = 'frm-agreement-opts';
2334 2334
 		}
2335 2335
 
2336
-		$prepop[ __( 'Agreement', 'formidable' ) ] = $agreement;
2336
+		$prepop[__( 'Agreement', 'formidable' )] = $agreement;
2337 2337
 
2338 2338
 		// Likely.
2339 2339
 		$likely = array(
@@ -2349,7 +2349,7 @@  discard block
 block discarded – undo
2349 2349
 			$likely['class'] = 'frm-likely-opts';
2350 2350
 		}
2351 2351
 
2352
-		$prepop[ __( 'Likely', 'formidable' ) ] = $likely;
2352
+		$prepop[__( 'Likely', 'formidable' )] = $likely;
2353 2353
 
2354 2354
 		$prepop = apply_filters( 'frm_bulk_field_choices', $prepop );
2355 2355
 	}
@@ -2599,17 +2599,17 @@  discard block
 block discarded – undo
2599 2599
 	 */
2600 2600
 	private static function fill_image_setting_options( $options, &$args ) {
2601 2601
 		foreach ( $options as $key => $option ) {
2602
-			$args['options'][ $key ] = $option;
2602
+			$args['options'][$key] = $option;
2603 2603
 
2604 2604
 			if ( ! empty( $option['addon'] ) ) {
2605
-				$args['options'][ $key ]['custom_attrs'] = self::fill_image_setting_addon_link( $option );
2605
+				$args['options'][$key]['custom_attrs'] = self::fill_image_setting_addon_link( $option );
2606 2606
 			}
2607 2607
 
2608
-			unset( $args['options'][ $key ]['addon'] );
2608
+			unset( $args['options'][$key]['addon'] );
2609 2609
 			$fill = array( 'upgrade', 'message', 'content' );
2610 2610
 
2611 2611
 			foreach ( $fill as $f ) {
2612
-				unset( $args['options'][ $key ][ $f ], $f );
2612
+				unset( $args['options'][$key][$f], $f );
2613 2613
 			}
2614 2614
 		}
2615 2615
 	}
@@ -2633,8 +2633,8 @@  discard block
 block discarded – undo
2633 2633
 		$fill = array( 'upgrade', 'message', 'content' );
2634 2634
 
2635 2635
 		foreach ( $fill as $f ) {
2636
-			if ( isset( $option[ $f ] ) ) {
2637
-				$custom_attrs[ 'data-' . $f ] = $option[ $f ];
2636
+			if ( isset( $option[$f] ) ) {
2637
+				$custom_attrs['data-' . $f] = $option[$f];
2638 2638
 			}
2639 2639
 		}
2640 2640
 
@@ -2703,7 +2703,7 @@  discard block
 block discarded – undo
2703 2703
 
2704 2704
 		return array_filter(
2705 2705
 			$rows,
2706
-			function ( $row ) {
2706
+			function( $row ) {
2707 2707
 				FrmAppHelper::unserialize_or_decode( $row->field_options );
2708 2708
 				return is_array( $row->field_options ) && ! empty( $row->field_options['draft'] );
2709 2709
 			}
@@ -2770,7 +2770,7 @@  discard block
 block discarded – undo
2770 2770
 			unset( $data['plugin-status'] );
2771 2771
 
2772 2772
 			foreach ( $data as $key => $value ) {
2773
-				$attributes[ 'data-' . $key ] = $value;
2773
+				$attributes['data-' . $key] = $value;
2774 2774
 			}
2775 2775
 		}
2776 2776
 
Please login to merge, or discard this patch.
classes/models/FrmFieldFormHtml.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 	 * @return void
47 47
 	 */
48 48
 	private function _set( $param, $atts ) {
49
-		if ( isset( $atts[ $param ] ) ) {
50
-			$this->{$param} = $atts[ $param ];
49
+		if ( isset( $atts[$param] ) ) {
50
+			$this->{$param} = $atts[$param];
51 51
 		}
52 52
 	}
53 53
 
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
 
98 98
 		$exclude = array( 'field_obj', 'html' );
99 99
 		foreach ( $exclude as $ex ) {
100
-			if ( isset( $atts[ $ex ] ) ) {
101
-				unset( $this->pass_args[ $ex ] );
100
+			if ( isset( $atts[$ex] ) ) {
101
+				unset( $this->pass_args[$ex] );
102 102
 			}
103 103
 		}
104 104
 	}
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
 	 * @return void
113 113
 	 */
114 114
 	private function set_from_field( $atts, $set ) {
115
-		if ( isset( $atts[ $set['param'] ] ) ) {
116
-			$this->{$set['param']} = $atts[ $set['param'] ];
115
+		if ( isset( $atts[$set['param']] ) ) {
116
+			$this->{$set['param']} = $atts[$set['param']];
117 117
 		} else {
118 118
 			$this->{$set['param']} = $this->field_obj->get_field_column( $set['default'] );
119 119
 		}
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 	 */
265 265
 	private function replace_error_shortcode() {
266 266
 		$this->maybe_add_error_id();
267
-		$error = $this->pass_args['errors'][ 'field' . $this->field_id ] ?? false;
267
+		$error = $this->pass_args['errors']['field' . $this->field_id] ?? false;
268 268
 
269 269
 		if ( ! empty( $error ) && false === strpos( $this->html, 'role="alert"' ) && FrmAppHelper::should_include_alert_role_on_field_errors() ) {
270 270
 			$error_body = self::get_error_body( $this->html );
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 	 * @return void
308 308
 	 */
309 309
 	private function maybe_add_error_id() {
310
-		if ( ! isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ) {
310
+		if ( ! isset( $this->pass_args['errors']['field' . $this->field_id] ) ) {
311 311
 			return;
312 312
 		}
313 313
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 		preg_match_all( "/\[(input|deletelink)\b(.*?)(?:(\/))?\]/s", $this->html, $shortcodes, PREG_PATTERN_ORDER );
400 400
 
401 401
 		foreach ( $shortcodes[0] as $short_key => $tag ) {
402
-			$shortcode_atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[2][ $short_key ] );
402
+			$shortcode_atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[2][$short_key] );
403 403
 			$tag            = FrmShortcodeHelper::get_shortcode_tag( $shortcodes, $short_key );
404 404
 
405 405
 			$replace_with = '';
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 				$replace_with = $this->replace_input_shortcode( $shortcode_atts );
411 411
 			}
412 412
 
413
-			$this->html = str_replace( $shortcodes[0][ $short_key ], $replace_with, $this->html );
413
+			$this->html = str_replace( $shortcodes[0][$short_key], $replace_with, $this->html );
414 414
 		}
415 415
 	}
416 416
 
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 	 */
433 433
 	private function prepare_input_shortcode_atts( $shortcode_atts ) {
434 434
 		if ( isset( $shortcode_atts['opt'] ) ) {
435
-			--$shortcode_atts['opt'];
435
+			-- $shortcode_atts['opt'];
436 436
 		}
437 437
 
438 438
 		$field_class = $shortcode_atts['class'] ?? '';
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
 	 */
503 503
 	private function get_field_div_classes() {
504 504
 		// Add error class
505
-		$classes = isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ? ' frm_blank_field' : '';
505
+		$classes = isset( $this->pass_args['errors']['field' . $this->field_id] ) ? ' frm_blank_field' : '';
506 506
 
507 507
 		// Add label position class
508 508
 		$settings = $this->field_obj->display_field_settings();
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
 		}
584 584
 
585 585
 		// Add 'aria-invalid' attribute to the group if there are errors.
586
-		if ( isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ) {
586
+		if ( isset( $this->pass_args['errors']['field' . $this->field_id] ) ) {
587 587
 			$attributes['aria-invalid'] = 'true';
588 588
 		}
589 589
 
Please login to merge, or discard this patch.
classes/models/FrmEntryFormatter.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
 
170 170
 		$conditionally_add = array( 'include_fields', 'fields', 'exclude_fields', 'entry' );
171 171
 		foreach ( $conditionally_add as $index ) {
172
-			if ( isset( $atts[ $index ] ) ) {
173
-				$entry_atts[ $index ] = $atts[ $index ];
172
+			if ( isset( $atts[$index] ) ) {
173
+				$entry_atts[$index] = $atts[$index];
174 174
 			}
175 175
 		}
176 176
 
@@ -376,8 +376,8 @@  discard block
 block discarded – undo
376 376
 
377 377
 		$unset = array( 'id', 'form_id', 'format' );
378 378
 		foreach ( $unset as $param ) {
379
-			if ( isset( $atts[ $param ] ) ) {
380
-				unset( $atts[ $param ] );
379
+			if ( isset( $atts[$param] ) ) {
380
+				unset( $atts[$param] );
381 381
 			}
382 382
 		}
383 383
 
@@ -553,11 +553,11 @@  discard block
 block discarded – undo
553 553
 
554 554
 			$displayed_value = $this->prepare_display_value_for_array( $field_value->get_displayed_value() );
555 555
 
556
-			$output[ $this->get_key_or_id( $field_value ) ] = $displayed_value;
556
+			$output[$this->get_key_or_id( $field_value )] = $displayed_value;
557 557
 
558 558
 			$has_separate_value = (bool) $field_value->get_field_option( 'separate_value' );
559 559
 			if ( $has_separate_value || $displayed_value !== $field_value->get_saved_value() ) {
560
-				$output[ $this->get_key_or_id( $field_value ) . '-value' ] = $field_value->get_saved_value();
560
+				$output[$this->get_key_or_id( $field_value ) . '-value'] = $field_value->get_saved_value();
561 561
 			}
562 562
 		}
563 563
 	}
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
 		if ( $this->is_plain_text ) {
976 976
 			if ( is_array( $value ) ) {
977 977
 				foreach ( $value as $key => $single_value ) {
978
-					$value[ $key ] = $this->strip_html( $single_value );
978
+					$value[$key] = $this->strip_html( $single_value );
979 979
 				}
980 980
 			} elseif ( $this->is_plain_text && ! is_array( $value ) ) {
981 981
 				if ( strpos( $value, '<img' ) !== false ) {
Please login to merge, or discard this patch.
classes/models/FrmCreateFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,12 +33,12 @@
 block discarded – undo
33 33
 	/**
34 34
 	 * @var int
35 35
 	 */
36
-	public $chmod_dir       = 0755;
36
+	public $chmod_dir = 0755;
37 37
 
38 38
 	/**
39 39
 	 * @var int
40 40
 	 */
41
-	public $chmod_file      = 0644;
41
+	public $chmod_file = 0644;
42 42
 
43 43
 	/**
44 44
 	 * @var bool
Please login to merge, or discard this patch.
classes/helpers/FrmTipsHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 			'page'  => '',
46 46
 			'class' => 'frm-mt-0',
47 47
 		);
48
-		$tip      = array_merge( $defaults, $tip );
48
+		$tip = array_merge( $defaults, $tip );
49 49
 
50 50
 		if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) ) {
51 51
 			$tip['link']['medium'] = 'tip';
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 		}
403 403
 
404 404
 		$random = random_int( 0, $count - 1 );
405
-		return $tips[ $random ];
405
+		return $tips[$random];
406 406
 	}
407 407
 
408 408
 	/**
Please login to merge, or discard this patch.
stripe/controllers/FrmStrpLiteAppController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -152,13 +152,13 @@  discard block
 block discarded – undo
152 152
 
153 153
 		$is_setup_intent = 0 === strpos( $intent->id, 'seti_' );
154 154
 		if ( $is_setup_intent ) {
155
-			$errors[ 'field' . $cc_field_id ] = is_object( $intent->last_setup_error ) ? $intent->last_setup_error->message : '';
155
+			$errors['field' . $cc_field_id] = is_object( $intent->last_setup_error ) ? $intent->last_setup_error->message : '';
156 156
 		} else {
157
-			$errors[ 'field' . $cc_field_id ] = is_object( $intent->last_payment_error ) ? $intent->last_payment_error->message : '';
157
+			$errors['field' . $cc_field_id] = is_object( $intent->last_payment_error ) ? $intent->last_payment_error->message : '';
158 158
 		}
159 159
 
160
-		if ( ! $errors[ 'field' . $cc_field_id ] ) {
161
-			$errors[ 'field' . $cc_field_id ] = 'Payment was not successfully processed.';
160
+		if ( ! $errors['field' . $cc_field_id] ) {
161
+			$errors['field' . $cc_field_id] = 'Payment was not successfully processed.';
162 162
 		}
163 163
 
164 164
 		global $frm_vars;
@@ -187,10 +187,10 @@  discard block
 block discarded – undo
187 187
 		$save_draft = ! empty( $form->options['save_draft'] );
188 188
 
189 189
 		global $frm_vars;
190
-		$frm_vars['created_entries'][ $form_id ]['errors'] = $errors;
190
+		$frm_vars['created_entries'][$form_id]['errors'] = $errors;
191 191
 
192 192
 		// Set to true to get FrmProFieldsHelper::get_page_with_error() run.
193
-		$_POST[ 'frm_page_order_' . $form_id ] = true;
193
+		$_POST['frm_page_order_' . $form_id] = true;
194 194
 
195 195
 		if ( ! $save_draft ) {
196 196
 			// If draft saving is not on, delete the entry.
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 		}
200 200
 
201 201
 		// If draft saving is on, load the draft entry.
202
-		$frm_vars['created_entries'][ $form_id ]['entry_id'] = $entry_id;
202
+		$frm_vars['created_entries'][$form_id]['entry_id'] = $entry_id;
203 203
 		add_action(
204 204
 			'frm_filter_final_form',
205 205
 			/**
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 			 *
211 211
 			 * @return string
212 212
 			 */
213
-			function ( $html ) use ( $entry_id ) {
213
+			function( $html ) use ( $entry_id ) {
214 214
 				global $wpdb;
215 215
 				$wpdb->update( $wpdb->prefix . 'frm_items', array( 'is_draft' => 1 ), array( 'id' => $entry_id ) );
216 216
 				return $html;
Please login to merge, or discard this patch.