Completed
Pull Request — master (#448)
by Stephanie
40s
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/views/xml/xml.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@  discard block
 block discarded – undo
7 7
 <?php
8 8
 foreach ( $type as $tb_type ) {
9 9
 
10
-	if ( ! isset( $tables[ $tb_type ] ) ) {
10
+	if ( ! isset( $tables[$tb_type] ) ) {
11 11
 		do_action( 'frm_xml_import_' . $tb_type, $args );
12 12
 		continue;
13 13
 	}
14 14
 
15 15
 	//no records
16
-	if ( ! isset( $records[ $tb_type ] ) ) {
16
+	if ( ! isset( $records[$tb_type] ) ) {
17 17
 		continue;
18 18
 	}
19 19
 
20
-	$item_ids = $records[ $tb_type ];
20
+	$item_ids = $records[$tb_type];
21 21
 	if ( in_array( $tb_type, array( 'styles', 'actions' ), true ) ) {
22 22
 		include( dirname( __FILE__ ) . '/posts_xml.php' );
23 23
 	} elseif ( file_exists( dirname( __FILE__ ) . '/' . $tb_type . '_xml.php' ) ) {
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		include( FrmProAppHelper::plugin_path() . '/classes/views/xml/' . $tb_type . '_xml.php' );
27 27
 	}
28 28
 
29
-	unset( $item_ids, $records[ $tb_type ], $tb_type );
29
+	unset( $item_ids, $records[$tb_type], $tb_type );
30 30
 }
31 31
 
32 32
 ?>
Please login to merge, or discard this patch.
classes/models/FrmEntryValues.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
136 136
 	 * @return array
137 137
 	 */
138 138
 	private function prepare_array_property( $index, $atts ) {
139
-		if ( isset( $atts[ $index ] ) && ! empty( $atts[ $index ] ) ) {
139
+		if ( isset( $atts[$index] ) && ! empty( $atts[$index] ) ) {
140 140
 
141
-			if ( is_array( $atts[ $index ] ) ) {
142
-				$property = $atts[ $index ];
141
+			if ( is_array( $atts[$index] ) ) {
142
+				$property = $atts[$index];
143 143
 			} else {
144
-				$property = explode( ',', $atts[ $index ] );
144
+				$property = explode( ',', $atts[$index] );
145 145
 			}
146 146
 		} else {
147 147
 			$property = array();
@@ -274,6 +274,6 @@  discard block
 block discarded – undo
274 274
 	 * @param stdClass $field
275 275
 	 */
276 276
 	protected function add_field_values( $field ) {
277
-		$this->field_values[ $field->id ] = new FrmFieldValue( $field, $this->entry );
277
+		$this->field_values[$field->id] = new FrmFieldValue( $field, $this->entry );
278 278
 	}
279 279
 }
Please login to merge, or discard this patch.
classes/models/fields/FrmFieldNumber.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
 		//validate the number format
45 45
 		if ( ! is_numeric( $args['value'] ) && '' !== $args['value'] ) {
46
-			$errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
46
+			$errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
47 47
 		}
48 48
 
49 49
 		// validate number settings
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
 			if ( $frm_settings->use_html && $maxnum !== '' && $minnum !== '' ) {
56 56
 				$value = (float) $args['value'];
57 57
 				if ( $value < $minnum ) {
58
-					$errors[ 'field' . $args['id'] ] = __( 'Please select a higher number', 'formidable' );
58
+					$errors['field' . $args['id']] = __( 'Please select a higher number', 'formidable' );
59 59
 				} elseif ( $value > $maxnum ) {
60
-					$errors[ 'field' . $args['id'] ] = __( 'Please select a lower number', 'formidable' );
60
+					$errors['field' . $args['id']] = __( 'Please select a lower number', 'formidable' );
61 61
 				}
62 62
 			}
63 63
 		}
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.
deprecated/FrmEntryFormat.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -98,15 +98,15 @@  discard block
 block discarded – undo
98 98
 		self::prepare_field_output( $atts, $val );
99 99
 
100 100
 		if ( $atts['format'] != 'text' ) {
101
-			$values[ $f->field_key ] = $val;
101
+			$values[$f->field_key] = $val;
102 102
 			if ( $atts['entry'] && $f->type != 'textarea' ) {
103
-				$prev_val = maybe_unserialize( $atts['entry']->metas[ $f->id ] );
103
+				$prev_val = maybe_unserialize( $atts['entry']->metas[$f->id] );
104 104
 				if ( $prev_val != $val ) {
105
-					$values[ $f->field_key . '-value' ] = $prev_val;
105
+					$values[$f->field_key . '-value'] = $prev_val;
106 106
 				}
107 107
 			}
108 108
 		} else {
109
-			$values[ $f->id ] = array(
109
+			$values[$f->id] = array(
110 110
 				'label' => $f->name,
111 111
 				'val'   => $val,
112 112
 				'type'  => $f->type,
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
 	private static function fill_missing_fields( $atts, &$values ) {
121 121
 		_deprecated_function( __FUNCTION__, '2.04', 'instance of FrmEntryValues or FrmProEntryValues' );
122 122
 
123
-		if ( $atts['entry'] && ! isset( $atts['entry']->metas[ $atts['field']->id ] ) ) {
123
+		if ( $atts['entry'] && ! isset( $atts['entry']->metas[$atts['field']->id] ) ) {
124 124
 			// In case include_blank is set
125
-			$atts['entry']->metas[ $atts['field']->id ] = '';
125
+			$atts['entry']->metas[$atts['field']->id] = '';
126 126
 			$atts['entry'] = apply_filters( 'frm_prepare_entry_content', $atts['entry'], array( 'field' => $atts['field'] ) );
127 127
 			self::fill_values_from_entry( $atts, $values );
128 128
 		}
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 			'type'  => $f->type,
151 151
 		);
152 152
 
153
-		$values[ $f->id ] = apply_filters( 'frm_field_shortcodes_for_default_html_email', $field_shortcodes, $f );
153
+		$values[$f->id] = apply_filters( 'frm_field_shortcodes_for_default_html_email', $field_shortcodes, $f );
154 154
 	}
155 155
 
156 156
 	/**
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
 		$f = $atts['field'];
163 163
 		if ( $atts['entry'] ) {
164
-			$prev_val = maybe_unserialize( $atts['entry']->metas[ $f->id ] );
164
+			$prev_val = maybe_unserialize( $atts['entry']->metas[$f->id] );
165 165
 			$meta = array(
166 166
 				'item_id'    => $atts['id'],
167 167
 				'field_id'   => $f->id,
Please login to merge, or discard this patch.
deprecated/FrmEDD_SL_Plugin_Updater.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		$this->beta        = ! empty( $this->api_data['beta'] ) ? true : false;
45 45
 		$this->cache_key   = md5( serialize( $this->slug . $this->version . $this->api_data['license'] . $this->beta ) );
46 46
 
47
-		$frm_edd_plugin_data[ $this->slug ] = $this->api_data;
47
+		$frm_edd_plugin_data[$this->slug] = $this->api_data;
48 48
 
49 49
 		/**
50 50
 		 * Fires after the $frm_edd_plugin_data is setup.
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 			$_transient_data = new stdClass();
94 94
 		}
95 95
 
96
-		if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) {
96
+		if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[$this->name] ) && false === $this->wp_override ) {
97 97
 			return $_transient_data;
98 98
 		}
99 99
 
@@ -120,12 +120,12 @@  discard block
 block discarded – undo
120 120
 					$version_info->plugin = $this->name;
121 121
 				}
122 122
 
123
-				$_transient_data->response[ $this->name ] = $version_info;
123
+				$_transient_data->response[$this->name] = $version_info;
124 124
 
125 125
 			}
126 126
 
127 127
 			$_transient_data->last_checked           = time();
128
-			$_transient_data->checked[ $this->name ] = $this->version;
128
+			$_transient_data->checked[$this->name] = $this->version;
129 129
 
130 130
 		}
131 131
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 		if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
190 190
 			$new_sections = array();
191 191
 			foreach ( $_data->sections as $key => $value ) {
192
-				$new_sections[ $key ] = $value;
192
+				$new_sections[$key] = $value;
193 193
 			}
194 194
 
195 195
 			$_data->sections = $new_sections;
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 		if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
200 200
 			$new_banners = array();
201 201
 			foreach ( $_data->banners as $key => $value ) {
202
-				$new_banners[ $key ] = $value;
202
+				$new_banners[$key] = $value;
203 203
 			}
204 204
 
205 205
 			$_data->banners = $new_banners;
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 		}
317 317
 
318 318
 		$slug         = sanitize_text_field( $_REQUEST['slug'] ); // WPCS: CSRF ok.
319
-		$data         = $frm_edd_plugin_data[ $slug ];
319
+		$data         = $frm_edd_plugin_data[$slug];
320 320
 		$beta         = ! empty( $data['beta'] ) ? true : false;
321 321
 		$cache_key    = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' ); // WPCS: CSRF ok.
322 322
 		$version_info = $this->get_cached_version_info( $cache_key );
Please login to merge, or discard this patch.
classes/models/FrmFormApi.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 					}
78 78
 					$cats = array_intersect( $this->skip_categories(), $addon['categories'] );
79 79
 					if ( ! empty( $cats ) ) {
80
-						unset( $addons[ $k ] );
80
+						unset( $addons[$k] );
81 81
 					}
82 82
 				}
83 83
 
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
 					return $addon;
120 120
 				}
121 121
 			}
122
-		} elseif ( isset( $addons[ $download_id ] ) ) {
123
-			$plugin = $addons[ $download_id ];
122
+		} elseif ( isset( $addons[$download_id] ) ) {
123
+			$plugin = $addons[$download_id];
124 124
 		}
125 125
 
126 126
 		return $plugin;
Please login to merge, or discard this patch.
classes/models/fields/FrmFieldEmail.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
 	public function validate( $args ) {
37 37
 		$errors = array();
38 38
 		if ( $args['value'] != '' && ! is_email( $args['value'] ) ) {
39
-			$errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
39
+			$errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
40 40
 		}
41 41
 
42 42
 		return $errors;
Please login to merge, or discard this patch.