Completed
Pull Request — master (#929)
by Stephanie
41s
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/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.
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
 	}
@@ -338,16 +338,16 @@  discard block
 block discarded – undo
338 338
 				continue;
339 339
 			}
340 340
 
341
-			$wp_plugin  = isset( $wp_plugins[ $folder ] ) ? $wp_plugins[ $folder ] : array();
341
+			$wp_plugin  = isset( $wp_plugins[$folder] ) ? $wp_plugins[$folder] : array();
342 342
 			$wp_version = isset( $wp_plugin['Version'] ) ? $wp_plugin['Version'] : '1.0';
343 343
 
344 344
 			if ( version_compare( $wp_version, $plugin->new_version, '<' ) ) {
345 345
 				$slug                           = explode( '/', $folder );
346 346
 				$plugin->slug                   = $slug[0];
347
-				$transient->response[ $folder ] = $plugin;
347
+				$transient->response[$folder] = $plugin;
348 348
 			}
349 349
 
350
-			$transient->checked[ $folder ] = $wp_version;
350
+			$transient->checked[$folder] = $wp_version;
351 351
 
352 352
 		}
353 353
 
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 	 */
381 381
 	protected static function is_installed( $plugin ) {
382 382
 		$all_plugins = self::get_plugins();
383
-		return isset( $all_plugins[ $plugin ] );
383
+		return isset( $all_plugins[$plugin] );
384 384
 	}
385 385
 
386 386
 	/**
@@ -419,13 +419,13 @@  discard block
 block discarded – undo
419 419
 			}
420 420
 
421 421
 			$download_id = isset( $plugin['id'] ) ? $plugin['id'] : 0;
422
-			if ( ! empty( $download_id ) && ! isset( $version_info[ $download_id ]['package'] ) ) {
422
+			if ( ! empty( $download_id ) && ! isset( $version_info[$download_id]['package'] ) ) {
423 423
 				// if this addon is using its own license, get the update url
424 424
 				$addon_info = $api->get_api_info();
425 425
 
426
-				$version_info[ $download_id ] = $addon_info[ $download_id ];
426
+				$version_info[$download_id] = $addon_info[$download_id];
427 427
 				if ( isset( $addon_info['error'] ) ) {
428
-					$version_info[ $download_id ]['error'] = array(
428
+					$version_info[$download_id]['error'] = array(
429 429
 						'message' => $addon_info['error']['message'],
430 430
 						'code'    => $addon_info['error']['code'],
431 431
 					);
@@ -524,8 +524,8 @@  discard block
 block discarded – undo
524 524
 					return $addon;
525 525
 				}
526 526
 			}
527
-		} elseif ( isset( $addons[ $download_id ] ) ) {
528
-			$plugin = $addons[ $download_id ];
527
+		} elseif ( isset( $addons[$download_id] ) ) {
528
+			$plugin = $addons[$download_id];
529 529
 		}
530 530
 
531 531
 		return $plugin;
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 			self::prepare_addon_link( $addon['link'] );
587 587
 
588 588
 			self::set_addon_status( $addon );
589
-			$addons[ $id ] = $addon;
589
+			$addons[$id] = $addon;
590 590
 		}
591 591
 	}
592 592
 
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
 			'utm_medium'   => 'addons',
623 623
 			'utm_campaign' => 'liteplugin',
624 624
 		);
625
-		$link       = add_query_arg( $query_args, $link );
625
+		$link = add_query_arg( $query_args, $link );
626 626
 	}
627 627
 
628 628
 	/**
Please login to merge, or discard this patch.