Completed
Pull Request — master (#2266)
by
unknown
52s
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/views/frm-form-actions/_action_inside.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 	$event_labels = FrmFormAction::trigger_labels();
37 37
 	foreach ( $action_control->action_options['event'] as $event ) {
38 38
 		?>
39
-		<option value="<?php echo esc_attr( $event ); ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo esc_html( isset( $event_labels[ $event ] ) ? $event_labels[ $event ] : $event ); ?></option>
39
+		<option value="<?php echo esc_attr( $event ); ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo esc_html( isset( $event_labels[$event] ) ? $event_labels[$event] : $event ); ?></option>
40 40
 <?php } ?>
41 41
 		</select>
42 42
 	</p>
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/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/fields/FrmFieldName.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -46,19 +46,19 @@  discard block
 block discarded – undo
46 46
 		$result = array();
47 47
 
48 48
 		foreach ( $names as $name ) {
49
-			if ( empty( $this->sub_fields[ $name ] ) ) {
49
+			if ( empty( $this->sub_fields[$name] ) ) {
50 50
 				continue;
51 51
 			}
52 52
 
53
-			if ( ! isset( $this->sub_fields[ $name ]['wrapper_classes'] ) ) {
54
-				$this->sub_fields[ $name ]['wrapper_classes'] = $col_class;
55
-			} elseif ( is_array( $this->sub_fields[ $name ]['wrapper_classes'] ) ) {
56
-				$this->sub_fields[ $name ]['wrapper_classes'] = implode( ' ', $this->sub_fields[ $name ]['wrapper_classes'] ) . ' ' . $col_class;
53
+			if ( ! isset( $this->sub_fields[$name]['wrapper_classes'] ) ) {
54
+				$this->sub_fields[$name]['wrapper_classes'] = $col_class;
55
+			} elseif ( is_array( $this->sub_fields[$name]['wrapper_classes'] ) ) {
56
+				$this->sub_fields[$name]['wrapper_classes'] = implode( ' ', $this->sub_fields[$name]['wrapper_classes'] ) . ' ' . $col_class;
57 57
 			} else {
58
-				$this->sub_fields[ $name ]['wrapper_classes'] .= ' ' . $col_class;
58
+				$this->sub_fields[$name]['wrapper_classes'] .= ' ' . $col_class;
59 59
 			}
60 60
 
61
-			$result[ $name ] = $this->sub_fields[ $name ];
61
+			$result[$name] = $this->sub_fields[$name];
62 62
 		}
63 63
 
64 64
 		return $result;
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
 		// Default desc.
91 91
 		foreach ( $this->sub_fields as $name => $sub_field ) {
92
-			$extra_options[ $name . '_desc' ] = $sub_field['label'];
92
+			$extra_options[$name . '_desc'] = $sub_field['label'];
93 93
 		}
94 94
 
95 95
 		return $extra_options;
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 		$name_layout = $this->get_name_layout();
126 126
 
127 127
 		if ( ! empty( $atts['show'] ) ) {
128
-			return isset( $value[ $atts['show'] ] ) ? $value[ $atts['show'] ] : '';
128
+			return isset( $value[$atts['show']] ) ? $value[$atts['show']] : '';
129 129
 		}
130 130
 
131 131
 		$value = wp_parse_args(
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 			$args['sub_fields'] = $this->sub_fields;
199 199
 
200 200
 			foreach ( $hidden_fields as $name => $hidden_field ) {
201
-				$args['sub_fields'][ $name ]['wrapper_classes'] .= ' frm_hidden';
201
+				$args['sub_fields'][$name]['wrapper_classes'] .= ' frm_hidden';
202 202
 			}
203 203
 		}
204 204
 	}
Please login to merge, or discard this patch.