Completed
Pull Request — master (#1580)
by Stephanie
41s
created
classes/models/FrmEmail.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 		$to = $this->prepare_email_setting( $this->settings['email_to'], $user_id_args );
163 163
 		$to = $this->explode_emails( $to );
164 164
 
165
-		$where  = array(
165
+		$where = array(
166 166
 			'it.field_id !' => 0,
167 167
 			'it.item_id'    => $this->entry->id,
168 168
 		);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 			'entry'     => $this->entry,
173 173
 			'form'      => $this->form,
174 174
 		);
175
-		$to     = apply_filters( 'frm_to_email', $to, $values, $this->form->id, $args );
175
+		$to = apply_filters( 'frm_to_email', $to, $values, $this->form->id, $args );
176 176
 
177 177
 		$this->to = array_unique( (array) $to );
178 178
 
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 
409 409
 		// Add the user info if it isn't already included
410 410
 		if ( $this->include_user_info && $prev_mail_body === $mail_body ) {
411
-			$data      = $this->entry->description;
411
+			$data = $this->entry->description;
412 412
 			$mail_body .= "\r\n\r\n" . __( 'User Information', 'formidable' ) . "\r\n";
413 413
 			$this->maybe_add_ip( $mail_body );
414 414
 			$mail_body .= __( 'User-Agent (Browser/OS)', 'formidable' ) . ': ' . FrmEntriesHelper::get_browser( $data['browser'] ) . "\r\n";
@@ -702,12 +702,12 @@  discard block
 block discarded – undo
702 702
 					$name = trim( str_replace( $email, '', $val ) );
703 703
 				} else {
704 704
 					// If user enters a name without an email
705
-					unset( $recipients[ $key ] );
705
+					unset( $recipients[$key] );
706 706
 					continue;
707 707
 				}
708 708
 			}
709 709
 
710
-			$recipients[ $key ] = $this->format_from_email( $name, $email );
710
+			$recipients[$key] = $this->format_from_email( $name, $email );
711 711
 		}//end foreach
712 712
 
713 713
 		return $recipients;
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
 				);
858 858
 
859 859
 				// Remove phone number from to addresses
860
-				unset( $this->to[ $key ] );
860
+				unset( $this->to[$key] );
861 861
 			}//end if
862 862
 		}//end foreach
863 863
 	}
Please login to merge, or discard this patch.
classes/helpers/FrmListHelper.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
 			return $this->get_pagenum();
236 236
 		}
237 237
 
238
-		if ( isset( $this->_pagination_args[ $key ] ) ) {
239
-			return $this->_pagination_args[ $key ];
238
+		if ( isset( $this->_pagination_args[$key] ) ) {
239
+			return $this->_pagination_args[$key];
240 240
 		}
241 241
 	}
242 242
 
@@ -284,8 +284,8 @@  discard block
 block discarded – undo
284 284
 	}
285 285
 
286 286
 	private function hidden_search_inputs( $param_name ) {
287
-		if ( ! empty( $_REQUEST[ $param_name ] ) ) {
288
-			$value = sanitize_text_field( wp_unslash( $_REQUEST[ $param_name ] ) );
287
+		if ( ! empty( $_REQUEST[$param_name] ) ) {
288
+			$value = sanitize_text_field( wp_unslash( $_REQUEST[$param_name] ) );
289 289
 			echo '<input type="hidden" name="' . esc_attr( $param_name ) . '" value="' . esc_attr( $value ) . '" />';
290 290
 		}
291 291
 	}
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 
330 330
 		echo "<ul class='subsubsub'>\n";
331 331
 		foreach ( $views as $class => $view ) {
332
-			$views[ $class ] = "\t" . '<li class="' . esc_attr( $class ) . '">' . $view;
332
+			$views[$class] = "\t" . '<li class="' . esc_attr( $class ) . '">' . $view;
333 333
 		}
334 334
 		echo implode( " |</li>\n", $views ) . "</li>\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
335 335
 		echo '</ul>';
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
 			'next'  => __( 'Next page', 'formidable' ),
710 710
 		);
711 711
 
712
-		return $labels[ $link ];
712
+		return $labels[$link];
713 713
 	}
714 714
 
715 715
 	private function current_url() {
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
 
803 803
 		// If the primary column doesn't exist fall back to the
804 804
 		// first non-checkbox column.
805
-		if ( ! isset( $columns[ $default ] ) ) {
805
+		if ( ! isset( $columns[$default] ) ) {
806 806
 			$default = self::get_default_primary_column_name();
807 807
 		}
808 808
 
@@ -816,7 +816,7 @@  discard block
 block discarded – undo
816 816
 		 */
817 817
 		$column = apply_filters( 'list_table_primary_column', $default, $this->screen->id );
818 818
 
819
-		if ( empty( $column ) || ! isset( $columns[ $column ] ) ) {
819
+		if ( empty( $column ) || ! isset( $columns[$column] ) ) {
820 820
 			$column = $default;
821 821
 		}
822 822
 
@@ -838,7 +838,7 @@  discard block
 block discarded – undo
838 838
 			// In 4.3, we added a fourth argument for primary column.
839 839
 			$column_headers = array( array(), array(), array(), $this->get_primary_column_name() );
840 840
 			foreach ( $this->_column_headers as $key => $value ) {
841
-				$column_headers[ $key ] = $value;
841
+				$column_headers[$key] = $value;
842 842
 			}
843 843
 
844 844
 			return $column_headers;
@@ -871,7 +871,7 @@  discard block
 block discarded – undo
871 871
 				$data[1] = false;
872 872
 			}
873 873
 
874
-			$sortable[ $id ] = $data;
874
+			$sortable[$id] = $data;
875 875
 		}
876 876
 
877 877
 		$primary = $this->get_primary_column_name();
@@ -948,8 +948,8 @@  discard block
 block discarded – undo
948 948
 				$class[] = 'column-primary';
949 949
 			}
950 950
 
951
-			if ( isset( $sortable[ $column_key ] ) ) {
952
-				list( $orderby, $desc_first ) = $sortable[ $column_key ];
951
+			if ( isset( $sortable[$column_key] ) ) {
952
+				list( $orderby, $desc_first ) = $sortable[$column_key];
953 953
 
954 954
 				if ( $current_orderby == $orderby ) {
955 955
 					$order   = 'asc' == $current_order ? 'desc' : 'asc';
@@ -1033,7 +1033,7 @@  discard block
 block discarded – undo
1033 1033
 	 * @return bool Returns true if the setting is not set or if it is not false; otherwise, returns false.
1034 1034
 	 */
1035 1035
 	protected function should_display( $args, $settings ) {
1036
-		return ! isset( $args[ $settings ] ) || false !== $args[ $settings ];
1036
+		return ! isset( $args[$settings] ) || false !== $args[$settings];
1037 1037
 	}
1038 1038
 
1039 1039
 	/**
Please login to merge, or discard this patch.
stripe/controllers/FrmStrpLiteActionsController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 			$gateway   = $payment_action->post_content['gateway'];
48 48
 			$is_stripe = $gateway === 'stripe' || ( is_array( $gateway ) && in_array( 'stripe', $gateway, true ) );
49 49
 			if ( ! $is_stripe || empty( $payment_action->post_content['amount'] ) ) {
50
-				unset( $payment_actions[ $k ] );
50
+				unset( $payment_actions[$k] );
51 51
 			}
52 52
 		}
53 53
 		return $payment_actions;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 			'run_triggers' => false,
85 85
 			'show_errors'  => true,
86 86
 		);
87
-		$atts     = compact( 'action', 'entry', 'form' );
87
+		$atts = compact( 'action', 'entry', 'form' );
88 88
 
89 89
 		$amount = self::prepare_amount( $action->post_content['amount'], $atts );
90 90
 		if ( empty( $amount ) || $amount == 000 ) {
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
 		$disallowed = array( ';', ':', '!important' );
503 503
 		foreach ( $settings as $k => $s ) {
504 504
 			if ( is_string( $s ) ) {
505
-				$settings[ $k ] = str_replace( $disallowed, '', $s );
505
+				$settings[$k] = str_replace( $disallowed, '', $s );
506 506
 			}
507 507
 		}
508 508
 
@@ -574,18 +574,18 @@  discard block
 block discarded – undo
574 574
 	 * @return array
575 575
 	 */
576 576
 	public static function remove_cc_validation( $errors, $field, $values ) {
577
-		$has_processed = isset( $_POST[ 'frmintent' . $field->form_id ] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
577
+		$has_processed = isset( $_POST['frmintent' . $field->form_id] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
578 578
 		if ( ! $has_processed ) {
579 579
 			return $errors;
580 580
 		}
581 581
 
582 582
 		$field_id = isset( $field->temp_id ) ? $field->temp_id : $field->id;
583 583
 
584
-		if ( isset( $errors[ 'field' . $field_id . '-cc' ] ) ) {
585
-			unset( $errors[ 'field' . $field_id . '-cc' ] );
584
+		if ( isset( $errors['field' . $field_id . '-cc'] ) ) {
585
+			unset( $errors['field' . $field_id . '-cc'] );
586 586
 		}
587
-		if ( isset( $errors[ 'field' . $field_id ] ) ) {
588
-			unset( $errors[ 'field' . $field_id ] );
587
+		if ( isset( $errors['field' . $field_id] ) ) {
588
+			unset( $errors['field' . $field_id] );
589 589
 		}
590 590
 
591 591
 		return $errors;
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
@@ -164,8 +164,8 @@  discard block
 block discarded – undo
164 164
 
165 165
 		$conditionally_add = array( 'include_fields', 'fields', 'exclude_fields', 'entry' );
166 166
 		foreach ( $conditionally_add as $index ) {
167
-			if ( isset( $atts[ $index ] ) ) {
168
-				$entry_atts[ $index ] = $atts[ $index ];
167
+			if ( isset( $atts[$index] ) ) {
168
+				$entry_atts[$index] = $atts[$index];
169 169
 			}
170 170
 		}
171 171
 
@@ -351,8 +351,8 @@  discard block
 block discarded – undo
351 351
 
352 352
 		$unset = array( 'id', 'form_id', 'format' );
353 353
 		foreach ( $unset as $param ) {
354
-			if ( isset( $atts[ $param ] ) ) {
355
-				unset( $atts[ $param ] );
354
+			if ( isset( $atts[$param] ) ) {
355
+				unset( $atts[$param] );
356 356
 			}
357 357
 		}
358 358
 
@@ -523,11 +523,11 @@  discard block
 block discarded – undo
523 523
 
524 524
 			$displayed_value = $this->prepare_display_value_for_array( $field_value->get_displayed_value() );
525 525
 
526
-			$output[ $this->get_key_or_id( $field_value ) ] = $displayed_value;
526
+			$output[$this->get_key_or_id( $field_value )] = $displayed_value;
527 527
 
528 528
 			$has_separate_value = (bool) $field_value->get_field_option( 'separate_value' );
529 529
 			if ( $has_separate_value || $displayed_value !== $field_value->get_saved_value() ) {
530
-				$output[ $this->get_key_or_id( $field_value ) . '-value' ] = $field_value->get_saved_value();
530
+				$output[$this->get_key_or_id( $field_value ) . '-value'] = $field_value->get_saved_value();
531 531
 			}
532 532
 		}
533 533
 	}
@@ -917,7 +917,7 @@  discard block
 block discarded – undo
917 917
 
918 918
 			if ( is_array( $value ) ) {
919 919
 				foreach ( $value as $key => $single_value ) {
920
-					$value[ $key ] = $this->strip_html( $single_value );
920
+					$value[$key] = $this->strip_html( $single_value );
921 921
 				}
922 922
 			} elseif ( $this->is_plain_text && ! is_array( $value ) ) {
923 923
 				if ( strpos( $value, '<img' ) !== false ) {
Please login to merge, or discard this patch.
classes/controllers/FrmFormTemplatesController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -330,11 +330,11 @@  discard block
 block discarded – undo
330 330
 
331 331
 		// Perform add or remove operation.
332 332
 		if ( 'add' === $operation ) {
333
-			self::$favorite_templates[ $key ][] = $template_id;
333
+			self::$favorite_templates[$key][] = $template_id;
334 334
 		} elseif ( 'remove' === $operation ) {
335
-			$position = array_search( $template_id, self::$favorite_templates[ $key ], true );
335
+			$position = array_search( $template_id, self::$favorite_templates[$key], true );
336 336
 			if ( $position !== false ) {
337
-				unset( self::$favorite_templates[ $key ][ $position ] );
337
+				unset( self::$favorite_templates[$key][$position] );
338 338
 			}
339 339
 		}
340 340
 
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 		foreach ( self::$templates as $key => &$template ) {
464 464
 			// Skip the template if the categories are not set.
465 465
 			if ( ! isset( $template['categories'] ) ) {
466
-				unset( self::$templates[ $key ] );
466
+				unset( self::$templates[$key] );
467 467
 				continue;
468 468
 			}
469 469
 
@@ -477,14 +477,14 @@  discard block
 block discarded – undo
477 477
 				// Add the slug to the new array.
478 478
 				$template['category_slugs'][] = $category_slug;
479 479
 
480
-				if ( ! isset( self::$categories[ $category_slug ] ) ) {
481
-					self::$categories[ $category_slug ] = array(
480
+				if ( ! isset( self::$categories[$category_slug] ) ) {
481
+					self::$categories[$category_slug] = array(
482 482
 						'name'  => $category,
483 483
 						'count' => 0,
484 484
 					);
485 485
 				}
486 486
 
487
-				self::$categories[ $category_slug ]['count']++;
487
+				self::$categories[$category_slug]['count'] ++;
488 488
 			}
489 489
 
490 490
 			// Mark the template as favorite if it's in the favorite templates list.
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 		$redundant_cats = array_merge( array( 'PayPal', 'Stripe', 'Twilio' ), FrmFormsHelper::ignore_template_categories() );
500 500
 		foreach ( $redundant_cats as $redundant_cat ) {
501 501
 			$category_slug = sanitize_title( $redundant_cat );
502
-			unset( self::$categories[ $category_slug ] );
502
+			unset( self::$categories[$category_slug] );
503 503
 		}
504 504
 
505 505
 		// Sort the categories by keys alphabetically.
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 				'count' => 0,
525 525
 			);
526 526
 		}
527
-		$special_categories['all-templates']  = array(
527
+		$special_categories['all-templates'] = array(
528 528
 			'name'  => __( 'All Templates', 'formidable' ),
529 529
 			'count' => self::get_template_count(),
530 530
 		);
@@ -552,9 +552,9 @@  discard block
 block discarded – undo
552 552
 	 */
553 553
 	private static function assign_featured_templates() {
554 554
 		foreach ( self::FEATURED_TEMPLATES_KEYS as $key ) {
555
-			if ( isset( self::$templates[ $key ] ) ) {
556
-				self::$templates[ $key ]['is_featured'] = true;
557
-				self::$featured_templates[]             = self::$templates[ $key ];
555
+			if ( isset( self::$templates[$key] ) ) {
556
+				self::$templates[$key]['is_featured'] = true;
557
+				self::$featured_templates[]             = self::$templates[$key];
558 558
 			}
559 559
 		}
560 560
 	}
Please login to merge, or discard this patch.
classes/views/frm-fields/back-end/html-content.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 		<?php esc_html_e( 'Content', 'formidable' ); ?>
10 10
 	</label>
11 11
 	<?php
12
-	$e_args  = array(
12
+	$e_args = array(
13 13
 		'textarea_name' => 'field_options[description_' . absint( $field['id'] ) . ']',
14 14
 		'textarea_rows' => 8,
15 15
 	);
Please login to merge, or discard this patch.
classes/helpers/FrmDashboardHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,8 +89,8 @@
 block discarded – undo
89 89
 	public function __construct( $data ) {
90 90
 		$sections = array( 'counters', 'license', 'payments', 'entries', 'inbox', 'video', 'payments' );
91 91
 		foreach ( $sections as $section ) {
92
-			if ( isset( $data[ $section ] ) ) {
93
-				$this->view[ $section ] = $data[ $section ];
92
+			if ( isset( $data[$section] ) ) {
93
+				$this->view[$section] = $data[$section];
94 94
 			}
95 95
 		}
96 96
 	}
Please login to merge, or discard this patch.
stripe/controllers/FrmStrpLiteAppController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -148,13 +148,13 @@  discard block
 block discarded – undo
148 148
 
149 149
 		$is_setup_intent = 0 === strpos( $intent->id, 'seti_' );
150 150
 		if ( $is_setup_intent ) {
151
-			$errors[ 'field' . $cc_field_id ] = is_object( $intent->last_setup_error ) ? $intent->last_setup_error->message : '';
151
+			$errors['field' . $cc_field_id] = is_object( $intent->last_setup_error ) ? $intent->last_setup_error->message : '';
152 152
 		} else {
153
-			$errors[ 'field' . $cc_field_id ] = is_object( $intent->last_payment_error ) ? $intent->last_payment_error->message : '';
153
+			$errors['field' . $cc_field_id] = is_object( $intent->last_payment_error ) ? $intent->last_payment_error->message : '';
154 154
 		}
155 155
 
156
-		if ( ! $errors[ 'field' . $cc_field_id ] ) {
157
-			$errors[ 'field' . $cc_field_id ] = 'Payment was not successfully processed.';
156
+		if ( ! $errors['field' . $cc_field_id] ) {
157
+			$errors['field' . $cc_field_id] = 'Payment was not successfully processed.';
158 158
 		}
159 159
 
160 160
 		global $frm_vars;
@@ -182,10 +182,10 @@  discard block
 block discarded – undo
182 182
 		$save_draft = ! empty( $form->options['save_draft'] );
183 183
 
184 184
 		global $frm_vars;
185
-		$frm_vars['created_entries'][ $form_id ]['errors'] = $errors;
185
+		$frm_vars['created_entries'][$form_id]['errors'] = $errors;
186 186
 
187 187
 		// Set to true to get FrmProFieldsHelper::get_page_with_error() run.
188
-		$_POST[ 'frm_page_order_' . $form_id ] = true;
188
+		$_POST['frm_page_order_' . $form_id] = true;
189 189
 
190 190
 		if ( ! $save_draft ) {
191 191
 			// If draft saving is not on, delete the entry.
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 		}
195 195
 
196 196
 		// If draft saving is on, load the draft entry.
197
-		$frm_vars['created_entries'][ $form_id ]['entry_id'] = $entry_id;
197
+		$frm_vars['created_entries'][$form_id]['entry_id'] = $entry_id;
198 198
 		add_action(
199 199
 			'frm_filter_final_form',
200 200
 			/**
Please login to merge, or discard this patch.
classes/models/fields/FrmFieldType.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
 		$field_val = '';
150 150
 		if ( is_object( $this->field ) ) {
151 151
 			$field_val = $this->field->{$column};
152
-		} elseif ( is_array( $this->field ) && isset( $this->field[ $column ] ) ) {
153
-			$field_val = $this->field[ $column ];
152
+		} elseif ( is_array( $this->field ) && isset( $this->field[$column] ) ) {
153
+			$field_val = $this->field[$column];
154 154
 		}
155 155
 
156 156
 		return $field_val;
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 		if ( is_object( $this->field ) ) {
165 165
 			$this->field->{$column} = $value;
166 166
 		} elseif ( is_array( $this->field ) ) {
167
-			$this->field[ $column ] = $value;
167
+			$this->field[$column] = $value;
168 168
 		}
169 169
 	}
170 170
 
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
 			printf(
557 557
 				/* translators: %s: Field type */
558 558
 				esc_html__( '%s Options', 'formidable' ),
559
-				esc_html( $all_field_types[ $args['display']['type'] ]['name'] )
559
+				esc_html( $all_field_types[$args['display']['type']]['name'] )
560 560
 			);
561 561
 			FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown6_icon', array( 'aria-hidden' => 'true' ) );
562 562
 			?>
@@ -664,8 +664,8 @@  discard block
 block discarded – undo
664 664
 
665 665
 		$fields = array_merge( $fields, $pro_fields );
666 666
 
667
-		if ( isset( $fields[ $this->type ] ) ) {
668
-			$name = is_array( $fields[ $this->type ] ) ? $fields[ $this->type ]['name'] : $fields[ $this->type ];
667
+		if ( isset( $fields[$this->type] ) ) {
668
+			$name = is_array( $fields[$this->type] ) ? $fields[$this->type]['name'] : $fields[$this->type];
669 669
 		}
670 670
 
671 671
 		return $name;
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
 	 * @return array
683 683
 	 */
684 684
 	public function get_default_field_options() {
685
-		$opts        = array(
685
+		$opts = array(
686 686
 			'size'               => '',
687 687
 			'max'                => '',
688 688
 			'label'              => '',
@@ -1078,7 +1078,7 @@  discard block
 block discarded – undo
1078 1078
 			}
1079 1079
 		} else {
1080 1080
 			$args['save_array'] = $this->is_readonly_array();
1081
-			$hidden             .= $this->show_single_hidden( $selected_value, $args );
1081
+			$hidden .= $this->show_single_hidden( $selected_value, $args );
1082 1082
 		}
1083 1083
 
1084 1084
 		return $hidden;
@@ -1087,7 +1087,7 @@  discard block
 block discarded – undo
1087 1087
 	protected function show_single_hidden( $selected, $args ) {
1088 1088
 		if ( $args['save_array'] ) {
1089 1089
 			$args['field_name'] .= '[]';
1090
-			$id                 = '';
1090
+			$id = '';
1091 1091
 		} else {
1092 1092
 			$id = ' id="' . esc_attr( $args['html_id'] ) . '"';
1093 1093
 		}
@@ -1103,8 +1103,8 @@  discard block
 block discarded – undo
1103 1103
 		$selected = $values['field_value'];
1104 1104
 
1105 1105
 		if ( isset( $values['combo_name'] ) ) {
1106
-			$options  = $options[ $values['combo_name'] ];
1107
-			$selected = ( is_array( $selected ) && isset( $selected[ $values['combo_name'] ] ) ) ? $selected[ $values['combo_name'] ] : '';
1106
+			$options  = $options[$values['combo_name']];
1107
+			$selected = ( is_array( $selected ) && isset( $selected[$values['combo_name']] ) ) ? $selected[$values['combo_name']] : '';
1108 1108
 		}
1109 1109
 
1110 1110
 		$input = $this->select_tag( $values );
@@ -1155,7 +1155,7 @@  discard block
 block discarded – undo
1155 1155
 	}
1156 1156
 
1157 1157
 	protected function fill_display_field_values( $args = array() ) {
1158
-		$defaults        = array(
1158
+		$defaults = array(
1159 1159
 			'field_name'    => 'item_meta[' . $this->get_field_column( 'id' ) . ']',
1160 1160
 			'field_id'      => $this->get_field_column( 'id' ),
1161 1161
 			'field_plus_id' => '',
@@ -1208,7 +1208,7 @@  discard block
 block discarded – undo
1208 1208
 			}
1209 1209
 		}
1210 1210
 
1211
-		if ( isset( $args['errors'][ 'field' . $args['field_id'] ] ) && ! $custom_error_fields ) {
1211
+		if ( isset( $args['errors']['field' . $args['field_id']] ) && ! $custom_error_fields ) {
1212 1212
 			if ( $error_comes_first ) {
1213 1213
 				array_unshift( $describedby, 'frm_error_' . $args['html_id'] );
1214 1214
 			} else {
@@ -1287,11 +1287,11 @@  discard block
 block discarded – undo
1287 1287
 
1288 1288
 		$field_id = $this->get_field_column( 'id' );
1289 1289
 		if ( ! array_key_exists( $field_id, $frm_validated_unique_values ) ) {
1290
-			$frm_validated_unique_values[ $field_id ] = array();
1290
+			$frm_validated_unique_values[$field_id] = array();
1291 1291
 			return false;
1292 1292
 		}
1293 1293
 
1294
-		$already_validated_this_value = in_array( $value, $frm_validated_unique_values[ $field_id ], true );
1294
+		$already_validated_this_value = in_array( $value, $frm_validated_unique_values[$field_id], true );
1295 1295
 		return $already_validated_this_value;
1296 1296
 	}
1297 1297
 
@@ -1316,7 +1316,7 @@  discard block
 block discarded – undo
1316 1316
 	private function value_validated_as_unique( $value ) {
1317 1317
 		global $frm_validated_unique_values;
1318 1318
 		$field_id                                   = $this->get_field_column( 'id' );
1319
-		$frm_validated_unique_values[ $field_id ][] = $value;
1319
+		$frm_validated_unique_values[$field_id][] = $value;
1320 1320
 	}
1321 1321
 
1322 1322
 	public function get_value_to_save( $value, $atts ) {
@@ -1353,8 +1353,8 @@  discard block
 block discarded – undo
1353 1353
 		$value = $this->prepare_display_value( $value, $atts );
1354 1354
 
1355 1355
 		if ( is_array( $value ) ) {
1356
-			if ( isset( $atts['show'] ) && $atts['show'] && isset( $value[ $atts['show'] ] ) ) {
1357
-				$value = $value[ $atts['show'] ];
1356
+			if ( isset( $atts['show'] ) && $atts['show'] && isset( $value[$atts['show']] ) ) {
1357
+				$value = $value[$atts['show']];
1358 1358
 			} elseif ( ! isset( $atts['return_array'] ) || ! $atts['return_array'] ) {
1359 1359
 				$sep   = isset( $atts['sep'] ) ? $atts['sep'] : ', ';
1360 1360
 				$value = implode( $sep, $value );
@@ -1484,8 +1484,8 @@  discard block
 block discarded – undo
1484 1484
 		$saved_entries = $atts['ids'];
1485 1485
 		$new_value     = array();
1486 1486
 		foreach ( (array) $value as $old_child_id ) {
1487
-			if ( isset( $saved_entries[ $old_child_id ] ) ) {
1488
-				$new_value[] = $saved_entries[ $old_child_id ];
1487
+			if ( isset( $saved_entries[$old_child_id] ) ) {
1488
+				$new_value[] = $saved_entries[$old_child_id];
1489 1489
 			}
1490 1490
 		}
1491 1491
 
Please login to merge, or discard this patch.