Completed
Pull Request — master (#909)
by Stephanie
44s
created
classes/models/FrmEntryValues.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -173,12 +173,12 @@  discard block
 block discarded – undo
173 173
 	 * @return array
174 174
 	 */
175 175
 	private function prepare_array_property( $index, $atts ) {
176
-		if ( isset( $atts[ $index ] ) && ! empty( $atts[ $index ] ) ) {
176
+		if ( isset( $atts[$index] ) && ! empty( $atts[$index] ) ) {
177 177
 
178
-			if ( is_array( $atts[ $index ] ) ) {
179
-				$property = $atts[ $index ];
178
+			if ( is_array( $atts[$index] ) ) {
179
+				$property = $atts[$index];
180 180
 			} else {
181
-				$property = explode( ',', $atts[ $index ] );
181
+				$property = explode( ',', $atts[$index] );
182 182
 			}
183 183
 		} else {
184 184
 			$property = array();
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 			);
253 253
 		}
254 254
 
255
-		$ip      = array(
255
+		$ip = array(
256 256
 			'label' => __( 'IP Address', 'formidable' ),
257 257
 			'value' => $this->entry->ip,
258 258
 		);
@@ -330,6 +330,6 @@  discard block
 block discarded – undo
330 330
 	 * @param stdClass $field
331 331
 	 */
332 332
 	protected function add_field_values( $field ) {
333
-		$this->field_values[ $field->id ] = new FrmFieldValue( $field, $this->entry );
333
+		$this->field_values[$field->id] = new FrmFieldValue( $field, $this->entry );
334 334
 	}
335 335
 }
Please login to merge, or discard this patch.
classes/controllers/FrmAddonsController.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 		} else {
93 93
 			foreach ( $addons as $k => $addon ) {
94 94
 				if ( empty( $addon['excerpt'] ) && $k !== 'error' ) {
95
-					unset( $addons[ $k ] );
95
+					unset( $addons[$k] );
96 96
 				}
97 97
 			}
98 98
 		}
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 
194 194
 		foreach ( $list as $k => $info ) {
195 195
 			$info['slug'] = $k;
196
-			$list[ $k ]   = array_merge( $defaults, $info );
196
+			$list[$k]   = array_merge( $defaults, $info );
197 197
 		}
198 198
 		return $list;
199 199
 	}
@@ -340,16 +340,16 @@  discard block
 block discarded – undo
340 340
 				continue;
341 341
 			}
342 342
 
343
-			$wp_plugin  = isset( $wp_plugins[ $folder ] ) ? $wp_plugins[ $folder ] : array();
343
+			$wp_plugin  = isset( $wp_plugins[$folder] ) ? $wp_plugins[$folder] : array();
344 344
 			$wp_version = isset( $wp_plugin['Version'] ) ? $wp_plugin['Version'] : '1.0';
345 345
 
346 346
 			if ( version_compare( $wp_version, $plugin->new_version, '<' ) ) {
347 347
 				$slug                           = explode( '/', $folder );
348 348
 				$plugin->slug                   = $slug[0];
349
-				$transient->response[ $folder ] = $plugin;
349
+				$transient->response[$folder] = $plugin;
350 350
 			}
351 351
 
352
-			$transient->checked[ $folder ] = $wp_version;
352
+			$transient->checked[$folder] = $wp_version;
353 353
 
354 354
 		}
355 355
 
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
 	 */
368 368
 	protected static function is_installed( $plugin ) {
369 369
 		$all_plugins = FrmAppHelper::get_plugins();
370
-		return isset( $all_plugins[ $plugin ] );
370
+		return isset( $all_plugins[$plugin] );
371 371
 	}
372 372
 
373 373
 	/**
@@ -406,13 +406,13 @@  discard block
 block discarded – undo
406 406
 			}
407 407
 
408 408
 			$download_id = isset( $plugin['id'] ) ? $plugin['id'] : 0;
409
-			if ( ! empty( $download_id ) && ! isset( $version_info[ $download_id ]['package'] ) ) {
409
+			if ( ! empty( $download_id ) && ! isset( $version_info[$download_id]['package'] ) ) {
410 410
 				// if this addon is using its own license, get the update url
411 411
 				$addon_info = $api->get_api_info();
412 412
 
413
-				$version_info[ $download_id ] = $addon_info[ $download_id ];
413
+				$version_info[$download_id] = $addon_info[$download_id];
414 414
 				if ( isset( $addon_info['error'] ) ) {
415
-					$version_info[ $download_id ]['error'] = array(
415
+					$version_info[$download_id]['error'] = array(
416 416
 						'message' => $addon_info['error']['message'],
417 417
 						'code'    => $addon_info['error']['code'],
418 418
 					);
@@ -511,8 +511,8 @@  discard block
 block discarded – undo
511 511
 					return $addon;
512 512
 				}
513 513
 			}
514
-		} elseif ( isset( $addons[ $download_id ] ) ) {
515
-			$plugin = $addons[ $download_id ];
514
+		} elseif ( isset( $addons[$download_id] ) ) {
515
+			$plugin = $addons[$download_id];
516 516
 		}
517 517
 
518 518
 		return $plugin;
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 			self::prepare_addon_link( $addon['link'] );
574 574
 
575 575
 			self::set_addon_status( $addon );
576
-			$addons[ $id ] = $addon;
576
+			$addons[$id] = $addon;
577 577
 		}
578 578
 	}
579 579
 
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
 			'utm_medium'   => 'addons',
610 610
 			'utm_campaign' => 'liteplugin',
611 611
 		);
612
-		$link       = add_query_arg( $query_args, $link );
612
+		$link = add_query_arg( $query_args, $link );
613 613
 	}
614 614
 
615 615
 	/**
Please login to merge, or discard this patch.
classes/models/FrmPluginSearch.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -75,20 +75,20 @@  discard block
 block discarded – undo
75 75
 			'name'                => sprintf(
76 76
 				/* translators: Formidable addon name */
77 77
 				esc_html_x( 'Formidable %s', 'Formidable Addon Name', 'formidable' ),
78
-				$addon_list[ $matching_addon ]['name']
78
+				$addon_list[$matching_addon]['name']
79 79
 			),
80
-			'addon'               => $addon_list[ $matching_addon ]['slug'],
81
-			'short_description'   => $addon_list[ $matching_addon ]['excerpt'],
80
+			'addon'               => $addon_list[$matching_addon]['slug'],
81
+			'short_description'   => $addon_list[$matching_addon]['excerpt'],
82 82
 			'slug'                => self::$slug,
83
-			'version'             => $addon_list[ $matching_addon ]['version'],
83
+			'version'             => $addon_list[$matching_addon]['version'],
84 84
 		);
85 85
 
86
-		if ( ! empty( $addon_list[ $matching_addon ]['external'] ) ) {
86
+		if ( ! empty( $addon_list[$matching_addon]['external'] ) ) {
87 87
 			unset( $overrides['name'] );
88 88
 		}
89 89
 
90 90
 		// Splice in the base addon data.
91
-		$inject = array_merge( $inject, $addon_list[ $matching_addon ], $overrides );
91
+		$inject = array_merge( $inject, $addon_list[$matching_addon], $overrides );
92 92
 
93 93
 		// Add it to the top of the list.
94 94
 		array_unshift( $result->plugins, $inject );
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 	 */
340 340
 	protected function is_installed( $plugin ) {
341 341
 		$all_plugins = FrmAppHelper::get_plugins();
342
-		return isset( $all_plugins[ $plugin ] );
342
+		return isset( $all_plugins[$plugin] );
343 343
 	}
344 344
 
345 345
 	/**
Please login to merge, or discard this patch.