Completed
Pull Request — master (#1580)
by Stephanie
39s
created
classes/models/FrmEntryMeta.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 		global $wpdb;
56 56
 
57
-		$values               = array(
57
+		$values = array(
58 58
 			'item_id'  => $entry_id,
59 59
 			'field_id' => $field_id,
60 60
 		);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
 				if ( ( is_array( $meta_value ) && empty( $meta_value ) ) || ( ! is_array( $meta_value ) && trim( $meta_value ) == '' ) ) {
130 130
 					// remove blank fields
131
-					unset( $values[ $field_id ] );
131
+					unset( $values[$field_id] );
132 132
 				} else {
133 133
 					// if value exists, then update it
134 134
 					self::update_entry_meta( $entry_id, $field_id, '', $meta_value );
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 	 */
194 194
 	public static function get_meta_value( $entry, $field_id ) {
195 195
 		if ( isset( $entry->metas ) ) {
196
-			return isset( $entry->metas[ $field_id ] ) ? $entry->metas[ $field_id ] : false;
196
+			return isset( $entry->metas[$field_id] ) ? $entry->metas[$field_id] : false;
197 197
 		} else {
198 198
 			return self::get_entry_meta_by_field( $entry->id, $field_id );
199 199
 		}
@@ -211,8 +211,8 @@  discard block
 block discarded – undo
211 211
 			$cached   = FrmDb::check_cache( $entry_id, 'frm_entry' );
212 212
 		}
213 213
 
214
-		if ( $cached && isset( $cached->metas ) && isset( $cached->metas[ $field_id ] ) ) {
215
-			$result = $cached->metas[ $field_id ];
214
+		if ( $cached && isset( $cached->metas ) && isset( $cached->metas[$field_id] ) ) {
215
+			$result = $cached->metas[$field_id];
216 216
 
217 217
 			return wp_unslash( $result );
218 218
 		}
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 		if ( is_numeric( $field_id ) ) {
223 223
 			$query['field_id'] = $field_id;
224 224
 		} else {
225
-			$get_table             .= ' it LEFT OUTER JOIN ' . $wpdb->prefix . 'frm_fields fi ON it.field_id=fi.id';
225
+			$get_table .= ' it LEFT OUTER JOIN ' . $wpdb->prefix . 'frm_fields fi ON it.field_id=fi.id';
226 226
 			$query['fi.field_key'] = $field_id;
227 227
 		}
228 228
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 			'stripslashes' => true,
241 241
 			'is_draft'     => false,
242 242
 		);
243
-		$args     = wp_parse_args( $args, $defaults );
243
+		$args = wp_parse_args( $args, $defaults );
244 244
 
245 245
 		$query = array();
246 246
 		self::meta_field_query( $field_id, $order, $limit, $args, $query );
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 
256 256
 		foreach ( $values as $k => $v ) {
257 257
 			FrmAppHelper::unserialize_or_decode( $v );
258
-			$values[ $k ] = $v;
258
+			$values[$k] = $v;
259 259
 			unset( $k, $v );
260 260
 		}
261 261
 
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 
313 313
 		foreach ( $results as $k => $result ) {
314 314
 			FrmAppHelper::unserialize_or_decode( $result->meta_value );
315
-			$results[ $k ]->meta_value = wp_unslash( $result->meta_value );
315
+			$results[$k]->meta_value = wp_unslash( $result->meta_value );
316 316
 			unset( $k, $result );
317 317
 		}
318 318
 
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 			'user_id'  => '',
326 326
 			'group_by' => '',
327 327
 		);
328
-		$args     = wp_parse_args( $args, $defaults );
328
+		$args = wp_parse_args( $args, $defaults );
329 329
 
330 330
 		$query = array();
331 331
 		self::get_ids_query( $where, $order_by, $limit, $unique, $args, $query );
Please login to merge, or discard this patch.
classes/views/frm-forms/add_field_links.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@
 block discarded – undo
49 49
 foreach ( $pro_fields as $field_key => $field_type ) {
50 50
 
51 51
 	if ( isset( $field_type['section'] ) ) {
52
-		if ( ! isset( $field_sections[ $field_type['section'] ] ) ) {
53
-			$field_sections[ $field_type['section'] ] = array();
52
+		if ( ! isset( $field_sections[$field_type['section']] ) ) {
53
+			$field_sections[$field_type['section']] = array();
54 54
 		}
55
-		$field_sections[ $field_type['section'] ][ $field_key ] = $field_type;
55
+		$field_sections[$field_type['section']][$field_key] = $field_type;
56 56
 		continue;
57 57
 	}
58 58
 
Please login to merge, or discard this patch.
classes/models/FrmFormMigrator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 	protected function create_fields( $form_id, &$form ) {
397 397
 		foreach ( $form['fields'] as $key => $new_field ) {
398 398
 			$new_field['form_id']         = $form_id;
399
-			$form['fields'][ $key ]['id'] = FrmField::create( $new_field );
399
+			$form['fields'][$key]['id'] = FrmField::create( $new_field );
400 400
 		}
401 401
 	}
402 402
 
@@ -426,9 +426,9 @@  discard block
 block discarded – undo
426 426
 			} elseif ( $key === 'the_post_title' ) {
427 427
 				$new_action->post_content['post_title'] = $value;
428 428
 			} elseif ( is_string( $value ) ) {
429
-				$new_action->post_content[ $key ] = $this->replace_smart_tags( $value, $form['fields'] );
429
+				$new_action->post_content[$key] = $this->replace_smart_tags( $value, $form['fields'] );
430 430
 			} else {
431
-				$new_action->post_content[ $key ] = $value;
431
+				$new_action->post_content[$key] = $value;
432 432
 			}
433 433
 		}
434 434
 
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 
448 448
 		$imported = $this->get_tracked_import();
449 449
 
450
-		$imported[ $this->slug ][ $new_form_id ] = $source_id;
450
+		$imported[$this->slug][$new_form_id] = $source_id;
451 451
 
452 452
 		update_option( $this->tracking, $imported, false );
453 453
 	}
@@ -467,11 +467,11 @@  discard block
 block discarded – undo
467 467
 	private function is_imported( $source_id ) {
468 468
 		$imported    = $this->get_tracked_import();
469 469
 		$new_form_id = 0;
470
-		if ( ! isset( $imported[ $this->slug ] ) || ! in_array( $source_id, $imported[ $this->slug ] ) ) {
470
+		if ( ! isset( $imported[$this->slug] ) || ! in_array( $source_id, $imported[$this->slug] ) ) {
471 471
 			return $new_form_id;
472 472
 		}
473 473
 
474
-		$new_form_id = array_search( $source_id, array_reverse( $imported[ $this->slug ], true ) );
474
+		$new_form_id = array_search( $source_id, array_reverse( $imported[$this->slug], true ) );
475 475
 		if ( ! empty( $new_form_id ) && empty( FrmForm::get_key_by_id( $new_form_id ) ) ) {
476 476
 			// Allow reimport if the form was deleted.
477 477
 			$new_form_id = 0;
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.
css/_single_theme.css.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -129,11 +129,11 @@  discard block
 block discarded – undo
129 129
 <?php } ?>
130 130
 
131 131
 .<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_minus_icon:before{
132
-	content:"\e<?php echo esc_html( isset( $minus_icons[ $repeat_icon ] ) ? $minus_icons[ $repeat_icon ]['-'] : $minus_icons[1]['-'] ); ?>";
132
+	content:"\e<?php echo esc_html( isset( $minus_icons[$repeat_icon] ) ? $minus_icons[$repeat_icon]['-'] : $minus_icons[1]['-'] ); ?>";
133 133
 }
134 134
 
135 135
 .<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_plus_icon:before{
136
-	content:"\e<?php echo esc_html( isset( $minus_icons[ $repeat_icon ] ) ? $minus_icons[ $repeat_icon ]['+'] : $minus_icons[1]['+'] ); ?>";
136
+	content:"\e<?php echo esc_html( isset( $minus_icons[$repeat_icon] ) ? $minus_icons[$repeat_icon]['+'] : $minus_icons[1]['+'] ); ?>";
137 137
 }
138 138
 
139 139
 .<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_minus_icon:before,
@@ -145,14 +145,14 @@  discard block
 block discarded – undo
145 145
 }
146 146
 
147 147
 .<?php echo esc_html( $style_class ); ?> .frm_trigger.active .frm_icon_font.frm_arrow_icon:before{
148
-	content:"\e<?php echo esc_html( isset( $arrow_icons[ $collapse_icon ] ) ? $arrow_icons[ $collapse_icon ]['-'] : $arrow_icons[1]['-'] ); ?>";
148
+	content:"\e<?php echo esc_html( isset( $arrow_icons[$collapse_icon] ) ? $arrow_icons[$collapse_icon]['-'] : $arrow_icons[1]['-'] ); ?>";
149 149
 	<?php if ( ! empty( $section_color ) ) { ?>
150 150
 		color:<?php echo esc_html( $section_color . $important ); ?>;
151 151
 	<?php } ?>
152 152
 }
153 153
 
154 154
 .<?php echo esc_html( $style_class ); ?> .frm_trigger .frm_icon_font.frm_arrow_icon:before{
155
-	content:"\e<?php echo esc_html( isset( $arrow_icons[ $collapse_icon ] ) ? $arrow_icons[ $collapse_icon ]['+'] : $arrow_icons[1]['+'] ); ?>";
155
+	content:"\e<?php echo esc_html( isset( $arrow_icons[$collapse_icon] ) ? $arrow_icons[$collapse_icon]['+'] : $arrow_icons[1]['+'] ); ?>";
156 156
 	<?php if ( ! empty( $section_color ) ) { ?>
157 157
 		color:<?php echo esc_html( $section_color . $important ); ?>;
158 158
 	<?php } ?>
Please login to merge, or discard this patch.
classes/views/frm-fields/back-end/field-multiple.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,6 +9,6 @@
 block discarded – undo
9 9
 	$type = $field['type'];
10 10
 	do_action( 'frm_after_checkbox', compact( 'field', 'field_name', 'type' ) );
11 11
 } else {
12
-	$read_only  = $field['read_only'];
12
+	$read_only = $field['read_only'];
13 13
 	include dirname( __FILE__ ) . '/' . $field['type'] . '-field.php';
14 14
 }
Please login to merge, or discard this patch.
classes/views/frm-fields/back-end/combo-field/sub-field-options.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
 							type="text"
52 52
 							name="<?php echo esc_attr( $input_name ); ?>"
53 53
 							id="<?php echo esc_attr( $input_id ); ?>"
54
-							value="<?php echo esc_attr( isset( $default_value[ $sub_field['name'] ] ) ? $default_value[ $sub_field['name'] ] : '' ); ?>"
54
+							value="<?php echo esc_attr( isset( $default_value[$sub_field['name']] ) ? $default_value[$sub_field['name']] : '' ); ?>"
55 55
 							data-changeme="field_<?php echo esc_attr( $field_key . '_' . $sub_field['name'] ); ?>"
56 56
 							data-changeatt="value"
57 57
 						/>
58 58
 					</span>
59 59
 					<label class="frm_description" for="<?php echo esc_attr( $input_id ); ?>">
60
-						<?php echo esc_html( $labels[ $option ] ); ?>
60
+						<?php echo esc_html( $labels[$option] ); ?>
61 61
 					</label>
62 62
 				</p>
63 63
 				<?php
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
 						type="text"
75 75
 						name="<?php echo esc_attr( $input_name ); ?>"
76 76
 						id="<?php echo esc_attr( $input_id ); ?>"
77
-						value="<?php echo esc_attr( isset( $input_value[ $sub_field['name'] ] ) ? $input_value[ $sub_field['name'] ] : '' ); ?>"
77
+						value="<?php echo esc_attr( isset( $input_value[$sub_field['name']] ) ? $input_value[$sub_field['name']] : '' ); ?>"
78 78
 						data-changeme="field_<?php echo esc_attr( $field_key . '_' . $sub_field['name'] ); ?>"
79 79
 						data-changeatt="<?php echo esc_attr( $option ); ?>"
80 80
 					/>
81 81
 					<label class="frm_description" for="<?php echo esc_attr( $input_id ); ?>">
82
-						<?php echo esc_html( $labels[ $option ] ); ?>
82
+						<?php echo esc_html( $labels[$option] ); ?>
83 83
 					</label>
84 84
 				</p>
85 85
 				<?php
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 						data-changeme="frm_field_<?php echo esc_attr( $field_id . '_' . $sub_field['name'] ); ?>_desc"
101 101
 					/>
102 102
 					<label class="frm_description" for="<?php echo esc_attr( $input_id ); ?>">
103
-						<?php echo esc_html( $labels[ $option ] ); ?>
103
+						<?php echo esc_html( $labels[$option] ); ?>
104 104
 					</label>
105 105
 				</p>
106 106
 				<?php
Please login to merge, or discard this patch.
classes/models/FrmAntiSpam.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -213,10 +213,10 @@
 block discarded – undo
213 213
 			return false;
214 214
 		}
215 215
 		$form_params = $frm_vars['form_params'];
216
-		if ( ! isset( $form_params[ $this->form_id ] ) ) {
216
+		if ( ! isset( $form_params[$this->form_id] ) ) {
217 217
 			return false;
218 218
 		}
219
-		$this_form_params = $form_params[ $this->form_id ];
219
+		$this_form_params = $form_params[$this->form_id];
220 220
 		return ! empty( $this_form_params['action'] ) && 'update' === $this_form_params['action'];
221 221
 	}
222 222
 
Please login to merge, or discard this patch.
classes/models/FrmHoneypot.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 	private function check_honeypot_setting() {
49 49
 		$form = $this->get_form();
50 50
 		$key  = $this->get_option_key();
51
-		return $form->options[ $key ];
51
+		return $form->options[$key];
52 52
 	}
53 53
 
54 54
 	/**
Please login to merge, or discard this patch.