Completed
Push — master ( fd7552...ca3d95 )
by Stephanie
02:56
created
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/controllers/FrmAddonsController.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -430,6 +430,7 @@
 block discarded – undo
430 430
 
431 431
 	/**
432 432
 	 * @since 3.04.02
433
+	 * @param string $link
433 434
 	 */
434 435
 	private static function prepare_addon_link( &$link ) {
435 436
 		$site_url = 'https://formidableforms.com/';
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
 
168 168
 		$response = wp_remote_get( $url );
169 169
 		if ( is_array( $response ) && ! is_wp_error( $response ) ) {
170
-		    $addons = $response['body'];
170
+			$addons = $response['body'];
171 171
 			if ( ! empty( $addons ) ) {
172 172
 				$addons = json_decode( $addons, true );
173 173
 
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 		} else {
52 52
 			foreach ( $addons as $k => $addon ) {
53 53
 				if ( empty( $addon['excerpt'] ) && $k !== 'error' ) {
54
-					unset( $addons[ $k ] );
54
+					unset( $addons[$k] );
55 55
 				}
56 56
 			}
57 57
 		}
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 					}
179 179
 					$cats = array_intersect( $skip_categories, $addon['categories'] );
180 180
 					if ( ! empty( $cats ) ) {
181
-						unset( $addons[ $k ] );
181
+						unset( $addons[$k] );
182 182
 					}
183 183
 				}
184 184
 
@@ -289,16 +289,16 @@  discard block
 block discarded – undo
289 289
 				continue;
290 290
 			}
291 291
 
292
-			$wp_plugin  = isset( $wp_plugins[ $folder ] ) ? $wp_plugins[ $folder ] : array();
292
+			$wp_plugin  = isset( $wp_plugins[$folder] ) ? $wp_plugins[$folder] : array();
293 293
 			$wp_version = isset( $wp_plugin['Version'] ) ? $wp_plugin['Version'] : '1.0';
294 294
 
295 295
 			if ( version_compare( $wp_version, $plugin->new_version, '<' ) ) {
296 296
 				$slug = explode( '/', $folder );
297 297
 				$plugin->slug = $slug[0];
298
-				$transient->response[ $folder ] = $plugin;
298
+				$transient->response[$folder] = $plugin;
299 299
 			}
300 300
 
301
-			$transient->checked[ $folder ] = $wp_version;
301
+			$transient->checked[$folder] = $wp_version;
302 302
 
303 303
 		}
304 304
 
@@ -340,13 +340,13 @@  discard block
 block discarded – undo
340 340
 			}
341 341
 
342 342
 			$download_id = isset( $plugin['id'] ) ? $plugin['id'] : 0;
343
-			if ( ! empty( $download_id ) && ! isset( $version_info[ $download_id ]['package'] ) ) {
343
+			if ( ! empty( $download_id ) && ! isset( $version_info[$download_id]['package'] ) ) {
344 344
 				// if this addon is using its own license, get the update url
345 345
 				$addon_info = self::get_addon_info( $new_license );
346 346
 
347
-				$version_info[ $download_id ] = $addon_info[ $download_id ];
347
+				$version_info[$download_id] = $addon_info[$download_id];
348 348
 				if ( isset( $addon_info['error'] ) ) {
349
-					$version_info[ $download_id ]['error'] = array(
349
+					$version_info[$download_id]['error'] = array(
350 350
 						'message' => $addon_info['error']['message'],
351 351
 						'code'    => $addon_info['error']['code'],
352 352
 					);
@@ -372,8 +372,8 @@  discard block
 block discarded – undo
372 372
 					return $addon;
373 373
 				}
374 374
 			}
375
-		} elseif ( isset( $addons[ $download_id ] ) ) {
376
-			$plugin = $addons[ $download_id ];
375
+		} elseif ( isset( $addons[$download_id] ) ) {
376
+			$plugin = $addons[$download_id];
377 377
 		}
378 378
 
379 379
 		return $plugin;
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
 			self::prepare_addon_link( $addon['link'] );
425 425
 
426 426
 			self::set_addon_status( $addon );
427
-			$addons[ $id ] = $addon;
427
+			$addons[$id] = $addon;
428 428
 		}
429 429
 	}
430 430
 
Please login to merge, or discard this patch.
deprecated/FrmDeprecated.php 3 patches
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -10,6 +10,8 @@  discard block
 block discarded – undo
10 10
 
11 11
 	/**
12 12
 	 * @deprecated 2.3
13
+	 * @param string $function
14
+	 * @param string $version
13 15
 	 */
14 16
 	public static function deprecated( $function, $version ) {
15 17
 		_deprecated_function( $function, $version );
@@ -68,6 +70,7 @@  discard block
 block discarded – undo
68 70
 
69 71
 	/**
70 72
 	 * @deprecated 3.04.03
73
+	 * @param string $url
71 74
 	 */
72 75
 	private static function send_api_request( $url, $transient = array() ) {
73 76
 		$data = get_transient( $transient['name'] );
@@ -318,6 +321,7 @@  discard block
 block discarded – undo
318 321
 
319 322
 	/**
320 323
 	 * @deprecated 3.0
324
+	 * @param string $field
321 325
 	 */
322 326
 	private static function edit_in_place_value( $field ) {
323 327
 		_deprecated_function( __FUNCTION__, '3.0' );
@@ -714,6 +718,7 @@  discard block
 block discarded – undo
714 718
 
715 719
 	/**
716 720
 	 * @deprecated 3.02.03
721
+	 * @return string
717 722
 	 */
718 723
 	public static function get_form_for_page() {
719 724
 		_deprecated_function( __FUNCTION__, '3.02.03' );
Please login to merge, or discard this patch.
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -624,8 +624,8 @@  discard block
 block discarded – undo
624 624
 	 */
625 625
 	public static function get_shortcode_tag( $shortcodes, $short_key, $args ) {
626 626
 		_deprecated_function( __FUNCTION__, '3.0', 'FrmShortcodeHelper::get_shortcode_tag' );
627
-        return FrmShortcodeHelper::get_shortcode_tag( $shortcodes, $short_key, $args );
628
-    }
627
+		return FrmShortcodeHelper::get_shortcode_tag( $shortcodes, $short_key, $args );
628
+	}
629 629
 
630 630
 	/**
631 631
 	 * @deprecated 3.01
@@ -638,52 +638,52 @@  discard block
 block discarded – undo
638 638
 	/**
639 639
 	 * @deprecated 3.02.03
640 640
 	 */
641
-    public static function jquery_themes() {
641
+	public static function jquery_themes() {
642 642
 		_deprecated_function( __FUNCTION__, '3.02.03', 'FrmProStylesController::jquery_themes' );
643 643
 
644
-        $themes = array(
645
-            'ui-lightness'  => 'UI Lightness',
646
-            'ui-darkness'   => 'UI Darkness',
647
-            'smoothness'    => 'Smoothness',
648
-            'start'         => 'Start',
649
-            'redmond'       => 'Redmond',
650
-            'sunny'         => 'Sunny',
651
-            'overcast'      => 'Overcast',
652
-            'le-frog'       => 'Le Frog',
653
-            'flick'         => 'Flick',
644
+		$themes = array(
645
+			'ui-lightness'  => 'UI Lightness',
646
+			'ui-darkness'   => 'UI Darkness',
647
+			'smoothness'    => 'Smoothness',
648
+			'start'         => 'Start',
649
+			'redmond'       => 'Redmond',
650
+			'sunny'         => 'Sunny',
651
+			'overcast'      => 'Overcast',
652
+			'le-frog'       => 'Le Frog',
653
+			'flick'         => 'Flick',
654 654
 			'pepper-grinder' => 'Pepper Grinder',
655
-            'eggplant'      => 'Eggplant',
656
-            'dark-hive'     => 'Dark Hive',
657
-            'cupertino'     => 'Cupertino',
658
-            'south-street'  => 'South Street',
659
-            'blitzer'       => 'Blitzer',
660
-            'humanity'      => 'Humanity',
661
-            'hot-sneaks'    => 'Hot Sneaks',
662
-            'excite-bike'   => 'Excite Bike',
663
-            'vader'         => 'Vader',
664
-            'dot-luv'       => 'Dot Luv',
665
-            'mint-choc'     => 'Mint Choc',
666
-            'black-tie'     => 'Black Tie',
667
-            'trontastic'    => 'Trontastic',
668
-            'swanky-purse'  => 'Swanky Purse',
669
-        );
655
+			'eggplant'      => 'Eggplant',
656
+			'dark-hive'     => 'Dark Hive',
657
+			'cupertino'     => 'Cupertino',
658
+			'south-street'  => 'South Street',
659
+			'blitzer'       => 'Blitzer',
660
+			'humanity'      => 'Humanity',
661
+			'hot-sneaks'    => 'Hot Sneaks',
662
+			'excite-bike'   => 'Excite Bike',
663
+			'vader'         => 'Vader',
664
+			'dot-luv'       => 'Dot Luv',
665
+			'mint-choc'     => 'Mint Choc',
666
+			'black-tie'     => 'Black Tie',
667
+			'trontastic'    => 'Trontastic',
668
+			'swanky-purse'  => 'Swanky Purse',
669
+		);
670 670
 
671 671
 		$themes = apply_filters( 'frm_jquery_themes', $themes );
672
-        return $themes;
673
-    }
672
+		return $themes;
673
+	}
674 674
 
675 675
 	/**
676 676
 	 * @deprecated 3.02.03
677 677
 	 */
678
-    public static function enqueue_jquery_css() {
678
+	public static function enqueue_jquery_css() {
679 679
 		_deprecated_function( __FUNCTION__, '3.02.03', 'FrmProStylesController::enqueue_jquery_css' );
680 680
 
681 681
 		$form = self::get_form_for_page();
682 682
 		$theme_css = FrmStylesController::get_style_val( 'theme_css', $form );
683
-        if ( $theme_css != -1 ) {
683
+		if ( $theme_css != -1 ) {
684 684
 			wp_enqueue_style( 'jquery-theme', self::jquery_css_url( $theme_css ), array(), FrmAppHelper::plugin_version() );
685
-        }
686
-    }
685
+		}
686
+	}
687 687
 
688 688
 	/**
689 689
 	 * @deprecated 3.02.03
@@ -691,26 +691,26 @@  discard block
 block discarded – undo
691 691
 	public static function jquery_css_url( $theme_css ) {
692 692
 		_deprecated_function( __FUNCTION__, '3.02.03', 'FrmProStylesController::jquery_css_url' );
693 693
 
694
-        if ( $theme_css == -1 ) {
695
-            return;
696
-        }
694
+		if ( $theme_css == -1 ) {
695
+			return;
696
+		}
697 697
 
698
-        if ( ! $theme_css || $theme_css == '' || $theme_css == 'ui-lightness' ) {
699
-            $css_file = FrmAppHelper::plugin_url() . '/css/ui-lightness/jquery-ui.css';
698
+		if ( ! $theme_css || $theme_css == '' || $theme_css == 'ui-lightness' ) {
699
+			$css_file = FrmAppHelper::plugin_url() . '/css/ui-lightness/jquery-ui.css';
700 700
 		} elseif ( preg_match( '/^http.?:\/\/.*\..*$/', $theme_css ) ) {
701
-            $css_file = $theme_css;
702
-        } else {
703
-            $uploads = FrmStylesHelper::get_upload_base();
701
+			$css_file = $theme_css;
702
+		} else {
703
+			$uploads = FrmStylesHelper::get_upload_base();
704 704
 			$file_path = '/formidable/css/' . $theme_css . '/jquery-ui.css';
705 705
 			if ( file_exists( $uploads['basedir'] . $file_path ) ) {
706
-                $css_file = $uploads['baseurl'] . $file_path;
707
-            } else {
706
+				$css_file = $uploads['baseurl'] . $file_path;
707
+			} else {
708 708
 				$css_file = FrmAppHelper::jquery_ui_base_url() . '/themes/' . $theme_css . '/jquery-ui.min.css';
709
-            }
710
-        }
709
+			}
710
+		}
711 711
 
712
-        return $css_file;
713
-    }
712
+		return $css_file;
713
+	}
714 714
 
715 715
 	/**
716 716
 	 * @deprecated 3.02.03
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -343,8 +343,8 @@  discard block
 block discarded – undo
343 343
 		$path = untrailingslashit( trim( $path ) );
344 344
 		$templates = glob( $path . '/*.php' );
345 345
 
346
-		for ( $i = count( $templates ) - 1; $i >= 0; $i-- ) {
347
-			$filename = str_replace( '.php', '', str_replace( $path . '/', '', $templates[ $i ] ) );
346
+		for ( $i = count( $templates ) - 1; $i >= 0; $i -- ) {
347
+			$filename = str_replace( '.php', '', str_replace( $path . '/', '', $templates[$i] ) );
348 348
 			$template_query = array( 'form_key' => $filename );
349 349
 			if ( $template ) {
350 350
 				$template_query['is_template'] = 1;
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 				$values['default_template'] = 1;
363 363
 			}
364 364
 
365
-			include( $templates[ $i ] );
365
+			include( $templates[$i] );
366 366
 
367 367
 			//get updated form
368 368
 			if ( isset( $form ) && ! empty( $form ) ) {
Please login to merge, or discard this patch.
deprecated/FrmEDD_SL_Plugin_Updater.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 * @uses api_request()
74 74
 	 *
75 75
 	 * @param array   $_transient_data Update array build by WordPress.
76
-	 * @return array Modified update array with custom plugin data.
76
+	 * @return stdClass Modified update array with custom plugin data.
77 77
 	 */
78 78
 	public function check_update( $_transient_data ) {
79 79
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 	 *
220 220
 	 * @param string  $_action The requested action.
221 221
 	 * @param array   $_data   Parameters for the API action.
222
-	 * @return false|object
222
+	 * @return string
223 223
 	 */
224 224
 	private function api_request( $_action, $_data ) {
225 225
 
Please login to merge, or discard this 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
 
@@ -117,12 +117,12 @@  discard block
 block discarded – undo
117 117
 					$version_info->plugin = $this->name;
118 118
 				}
119 119
 
120
-				$_transient_data->response[ $this->name ] = $version_info;
120
+				$_transient_data->response[$this->name] = $version_info;
121 121
 
122 122
 			}
123 123
 
124 124
 			$_transient_data->last_checked           = time();
125
-			$_transient_data->checked[ $this->name ] = $this->version;
125
+			$_transient_data->checked[$this->name] = $this->version;
126 126
 
127 127
 		}
128 128
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 		if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
187 187
 			$new_sections = array();
188 188
 			foreach ( $_data->sections as $key => $value ) {
189
-				$new_sections[ $key ] = $value;
189
+				$new_sections[$key] = $value;
190 190
 			}
191 191
 
192 192
 			$_data->sections = $new_sections;
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 		if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
197 197
 			$new_banners = array();
198 198
 			foreach ( $_data->banners as $key => $value ) {
199
-				$new_banners[ $key ] = $value;
199
+				$new_banners[$key] = $value;
200 200
 			}
201 201
 
202 202
 			$_data->banners = $new_banners;
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 		}
311 311
 
312 312
 		$slug         = sanitize_text_field( $_REQUEST['slug'] ); // WPCS: CSRF ok.
313
-		$data         = $frm_edd_plugin_data[ $slug ];
313
+		$data         = $frm_edd_plugin_data[$slug];
314 314
 		$beta         = ! empty( $data['beta'] ) ? true : false;
315 315
 		$cache_key    = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' ); // WPCS: CSRF ok.
316 316
 		$version_info = $this->get_cached_version_info( $cache_key );
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -297,11 +297,13 @@
 block discarded – undo
297 297
 
298 298
 		global $frm_edd_plugin_data;
299 299
 
300
-		if ( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' !== $_REQUEST['edd_sl_action'] ) { // WPCS: CSRF ok.
300
+		if ( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' !== $_REQUEST['edd_sl_action'] ) {
301
+// WPCS: CSRF ok.
301 302
 			return;
302 303
 		}
303 304
 
304
-		if ( empty( $_REQUEST['plugin'] ) || empty( $_REQUEST['slug'] ) ) { // WPCS: CSRF ok.
305
+		if ( empty( $_REQUEST['plugin'] ) || empty( $_REQUEST['slug'] ) ) {
306
+// WPCS: CSRF ok.
305 307
 			return;
306 308
 		}
307 309
 
Please login to merge, or discard this patch.
deprecated/FrmEntryFormat.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -151,6 +151,7 @@
 block discarded – undo
151 151
 
152 152
 	/**
153 153
 	 * @deprecated 2.04
154
+	 * @param string $val
154 155
 	 */
155 156
 	private static function get_field_value( $atts, &$val ) {
156 157
 		_deprecated_function( __FUNCTION__, '2.04', 'instance of FrmEntryValues or FrmProEntryValues' );
Please login to merge, or discard this 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/FrmPointers.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 	/**
14 14
 	 * Get the singleton instance of this class
15 15
 	 *
16
-	 * @return object
16
+	 * @return FrmPointers
17 17
 	 */
18 18
 	public static function get_instance() {
19 19
 		_deprecated_function( __FUNCTION__, '3.01.03' );
Please login to merge, or discard this patch.
classes/models/FrmAddon.php 3 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -41,15 +41,15 @@  discard block
 block discarded – undo
41 41
 	}
42 42
 
43 43
 	public function insert_installed_addon( $plugins ) {
44
-		$plugins[ $this->plugin_slug ] = $this;
44
+		$plugins[$this->plugin_slug] = $this;
45 45
 		return $plugins;
46 46
 	}
47 47
 
48 48
 	public static function get_addon( $plugin_slug ) {
49 49
 		$plugins = apply_filters( 'frm_installed_addons', array() );
50 50
 		$plugin = false;
51
-		if ( isset( $plugins[ $plugin_slug ] ) ) {
52
-			$plugin = $plugins[ $plugin_slug ];
51
+		if ( isset( $plugins[$plugin_slug] ) ) {
52
+			$plugin = $plugins[$plugin_slug];
53 53
 		}
54 54
 		return $plugin;
55 55
 	}
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 			);
106 106
 		} else {
107 107
 			$plugins = FrmAddonsController::get_addon_info( $this->license );
108
-			$_data = $plugins[ $item_id ];
108
+			$_data = $plugins[$item_id];
109 109
 		}
110 110
 
111 111
 		$_data['sections'] = array(
@@ -272,19 +272,19 @@  discard block
 block discarded – undo
272 272
 
273 273
 		if ( $this->is_current_version( $transient ) ) {
274 274
 			//make sure it doesn't show there is an update if plugin is up-to-date
275
-			if ( isset( $transient->response[ $this->plugin_folder ] ) ) {
276
-				unset( $transient->response[ $this->plugin_folder ] );
275
+			if ( isset( $transient->response[$this->plugin_folder] ) ) {
276
+				unset( $transient->response[$this->plugin_folder] );
277 277
 			}
278
-		} elseif ( isset( $transient->response ) && isset( $transient->response[ $this->plugin_folder ] ) ) {
279
-			$this->prepare_update_details( $transient->response[ $this->plugin_folder ] );
278
+		} elseif ( isset( $transient->response ) && isset( $transient->response[$this->plugin_folder] ) ) {
279
+			$this->prepare_update_details( $transient->response[$this->plugin_folder] );
280 280
 
281 281
 			// if the transient has expired, clear the update and trigger it again
282
-			if ( $transient->response[ $this->plugin_folder ] === false ) {
282
+			if ( $transient->response[$this->plugin_folder] === false ) {
283 283
 				if ( ! $this->has_been_cleared() ) {
284 284
 					$this->cleared_plugins();
285 285
 					$this->manually_queue_update();
286 286
 				}
287
-				unset( $transient->response[ $this->plugin_folder ] );
287
+				unset( $transient->response[$this->plugin_folder] );
288 288
 			}
289 289
 		}
290 290
 
@@ -365,13 +365,13 @@  discard block
 block discarded – undo
365 365
 			$version_info->new_version = $version_info->beta['version'];
366 366
 			$version_info->package     = $version_info->beta['package'];
367 367
 			if ( isset( $version_info->plugin ) && ! empty( $version_info->plugin ) ) {
368
-				$version_info->plugin  = $version_info->beta['plugin'];
368
+				$version_info->plugin = $version_info->beta['plugin'];
369 369
 			}
370 370
 		}
371 371
 	}
372 372
 
373 373
 	private function is_current_version( $transient ) {
374
-		if ( empty( $transient->checked ) || ! isset( $transient->checked[ $this->plugin_folder ] ) ) {
374
+		if ( empty( $transient->checked ) || ! isset( $transient->checked[$this->plugin_folder] ) ) {
375 375
 			return false;
376 376
 		}
377 377
 
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 			return true;
381 381
 		}
382 382
 
383
-		return isset( $transient->response ) && isset( $transient->response[ $this->plugin_folder ] ) && $transient->checked[ $this->plugin_folder ] === $transient->response[ $this->plugin_folder ]->new_version;
383
+		return isset( $transient->response ) && isset( $transient->response[$this->plugin_folder] ) && $transient->checked[$this->plugin_folder] === $transient->response[$this->plugin_folder]->new_version;
384 384
 	}
385 385
 
386 386
 	private function has_been_cleared() {
@@ -460,8 +460,8 @@  discard block
 block discarded – undo
460 460
 			$response['message'] = $response['status'];
461 461
 		} else {
462 462
 			$messages = $this->get_messages();
463
-			if ( is_string( $response['status'] ) && isset( $messages[ $response['status'] ] ) ) {
464
-				$response['message'] = $messages[ $response['status'] ];
463
+			if ( is_string( $response['status'] ) && isset( $messages[$response['status']] ) ) {
464
+				$response['message'] = $messages[$response['status']];
465 465
 			} else {
466 466
 				$response['message'] = FrmAppHelper::kses( $response['status'], array( 'a' ) );
467 467
 			}
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -306,7 +306,8 @@  discard block
 block discarded – undo
306 306
 
307 307
 		if ( isset( $version_info->new_version ) && ! empty( $version_info->new_version ) ) {
308 308
 			$this->clear_old_plugin_version( $version_info );
309
-			if ( $version_info === false ) { // was cleared with timeout
309
+			if ( $version_info === false ) {
310
+// was cleared with timeout
310 311
 				$transient = false;
311 312
 			} else {
312 313
 				$this->maybe_use_beta_url( $version_info );
@@ -393,7 +394,8 @@  discard block
 block discarded – undo
393 394
 	}
394 395
 
395 396
 	private function is_license_revoked() {
396
-		if ( empty( $this->license ) || empty( $this->plugin_slug ) || isset( $_POST['license'] ) ) { // WPCS: CSRF ok.
397
+		if ( empty( $this->license ) || empty( $this->plugin_slug ) || isset( $_POST['license'] ) ) {
398
+// WPCS: CSRF ok.
397 399
 			return;
398 400
 		}
399 401
 
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -222,6 +222,9 @@  discard block
 block discarded – undo
222 222
 		$this->delete_cache();
223 223
 	}
224 224
 
225
+	/**
226
+	 * @param string|false $is_active
227
+	 */
225 228
 	public function set_active( $is_active ) {
226 229
 		update_option( $this->option_name . 'active', $is_active );
227 230
 		$this->delete_cache();
@@ -560,6 +563,9 @@  discard block
 block discarded – undo
560 563
 		wp_die();
561 564
 	}
562 565
 
566
+	/**
567
+	 * @param string $action
568
+	 */
563 569
 	public function send_mothership_request( $action ) {
564 570
 		$api_params = array(
565 571
 			'edd_action' => $action,
Please login to merge, or discard this patch.
classes/controllers/FrmHooksController.php 1 patch
Indentation   +131 added lines, -131 removed lines patch added patch discarded remove patch
@@ -2,86 +2,86 @@  discard block
 block discarded – undo
2 2
 
3 3
 class FrmHooksController {
4 4
 
5
-    /**
6
-     * Trigger plugin-wide hook loading
7
-     */
8
-    public static function trigger_load_hook( $hooks = 'load_hooks' ) {
9
-        $controllers = apply_filters( 'frm_load_controllers', array( 'FrmHooksController' ) );
10
-
11
-        $trigger_hooks = $hooks;
12
-        $hooks = (array) $hooks;
13
-
14
-        if ( 'load_hooks' == $trigger_hooks ) {
15
-            if ( is_admin() ) {
16
-                $hooks[] = 'load_admin_hooks';
17
-                if ( defined( 'DOING_AJAX' ) ) {
18
-                    $hooks[] = 'load_ajax_hooks';
19
-                    $hooks[] = 'load_form_hooks';
20
-                }
21
-            }
22
-
23
-            if ( is_multisite() ) {
24
-                $hooks[] = 'load_multisite_hooks';
25
-            }
26
-        } else {
27
-            // Make sure the hooks are only triggered once
28
-            add_filter( 'frm' . str_replace( 'load', '', $trigger_hooks ) . '_loaded', '__return_true' );
29
-        }
30
-        unset( $trigger_hooks );
31
-
32
-        // Instansiate Controllers
33
-        foreach ( $controllers as $c ) {
34
-            foreach ( $hooks as $hook ) {
5
+	/**
6
+	 * Trigger plugin-wide hook loading
7
+	 */
8
+	public static function trigger_load_hook( $hooks = 'load_hooks' ) {
9
+		$controllers = apply_filters( 'frm_load_controllers', array( 'FrmHooksController' ) );
10
+
11
+		$trigger_hooks = $hooks;
12
+		$hooks = (array) $hooks;
13
+
14
+		if ( 'load_hooks' == $trigger_hooks ) {
15
+			if ( is_admin() ) {
16
+				$hooks[] = 'load_admin_hooks';
17
+				if ( defined( 'DOING_AJAX' ) ) {
18
+					$hooks[] = 'load_ajax_hooks';
19
+					$hooks[] = 'load_form_hooks';
20
+				}
21
+			}
22
+
23
+			if ( is_multisite() ) {
24
+				$hooks[] = 'load_multisite_hooks';
25
+			}
26
+		} else {
27
+			// Make sure the hooks are only triggered once
28
+			add_filter( 'frm' . str_replace( 'load', '', $trigger_hooks ) . '_loaded', '__return_true' );
29
+		}
30
+		unset( $trigger_hooks );
31
+
32
+		// Instansiate Controllers
33
+		foreach ( $controllers as $c ) {
34
+			foreach ( $hooks as $hook ) {
35 35
 				call_user_func( array( $c, $hook ) );
36 36
 				unset( $hook );
37
-            }
37
+			}
38 38
 			unset( $c );
39
-        }
39
+		}
40 40
 
41
-    }
41
+	}
42 42
 
43
-    public static function trigger_load_form_hooks() {
44
-        self::trigger_load_hook( 'load_form_hooks' );
45
-    }
43
+	public static function trigger_load_form_hooks() {
44
+		self::trigger_load_hook( 'load_form_hooks' );
45
+	}
46 46
 
47 47
 	public static function load_hooks() {
48 48
 		add_action( 'rest_api_init', 'FrmAppController::create_rest_routes', 0 );
49
-        add_action( 'plugins_loaded', 'FrmAppController::load_lang' );
49
+		add_action( 'plugins_loaded', 'FrmAppController::load_lang' );
50 50
 		add_filter( 'widget_text', 'do_shortcode' );
51 51
 
52
-        // Entries controller
53
-        add_action( 'wp_loaded', 'FrmEntriesController::process_entry', 10, 0 );
54
-        add_action( 'frm_after_entry_processed', 'FrmEntriesController::delete_entry_after_save', 100 );
52
+		// Entries controller
53
+		add_action( 'wp_loaded', 'FrmEntriesController::process_entry', 10, 0 );
54
+		add_action( 'frm_after_entry_processed', 'FrmEntriesController::delete_entry_after_save', 100 );
55 55
 
56
-        // Form Actions Controller
57
-        add_action( 'init', 'FrmFormActionsController::register_post_types', 1 );
56
+		// Form Actions Controller
57
+		add_action( 'init', 'FrmFormActionsController::register_post_types', 1 );
58 58
 		add_action( 'frm_after_create_entry', 'FrmFormActionsController::trigger_create_actions', 20, 3 );
59 59
 
60
-        // Forms Controller
61
-        add_action( 'widgets_init', 'FrmFormsController::register_widgets' );
60
+		// Forms Controller
61
+		add_action( 'widgets_init', 'FrmFormsController::register_widgets' );
62 62
 		add_action( 'init', 'FrmFormsController::front_head' );
63
-        add_filter( 'frm_content', 'FrmFormsController::filter_content', 10, 3 );
64
-        add_filter( 'frm_replace_content_shortcodes', 'FrmFormsController::replace_content_shortcodes', 20, 3 );
65
-        add_action( 'admin_bar_init', 'FrmFormsController::admin_bar_css' );
63
+		add_filter( 'frm_content', 'FrmFormsController::filter_content', 10, 3 );
64
+		add_filter( 'frm_replace_content_shortcodes', 'FrmFormsController::replace_content_shortcodes', 20, 3 );
65
+		add_action( 'admin_bar_init', 'FrmFormsController::admin_bar_css' );
66 66
 		add_action( 'wp_footer', 'FrmFormsController::footer_js', 1, 0 );
67 67
 
68 68
 		add_action( 'wp_scheduled_delete', 'FrmForm::scheduled_delete' );
69 69
 
70
-        // Form Shortcodes
71
-        add_shortcode( 'formidable', 'FrmFormsController::get_form_shortcode' );
70
+		// Form Shortcodes
71
+		add_shortcode( 'formidable', 'FrmFormsController::get_form_shortcode' );
72 72
 
73
-        // Styles Controller
74
-        add_action( 'init', 'FrmStylesController::register_post_types', 0 );
75
-        add_filter( 'frm_get_style_opts', 'FrmStylesController::get_style_opts' );
76
-        add_filter( 'frm_add_form_style_class', 'FrmStylesController::get_form_style_class', 10, 2 );
77
-        add_filter( 'frm_show_entry_styles', 'FrmStylesController::show_entry_styles' );
78
-    }
73
+		// Styles Controller
74
+		add_action( 'init', 'FrmStylesController::register_post_types', 0 );
75
+		add_filter( 'frm_get_style_opts', 'FrmStylesController::get_style_opts' );
76
+		add_filter( 'frm_add_form_style_class', 'FrmStylesController::get_form_style_class', 10, 2 );
77
+		add_filter( 'frm_show_entry_styles', 'FrmStylesController::show_entry_styles' );
78
+	}
79 79
 
80 80
 	public static function load_admin_hooks() {
81
-        add_action( 'admin_menu', 'FrmAppController::menu', 1 );
81
+		add_action( 'admin_menu', 'FrmAppController::menu', 1 );
82 82
 		add_filter( 'admin_body_class', 'FrmAppController::add_admin_class', 999 );
83
-        add_action( 'admin_enqueue_scripts', 'FrmAppController::load_wp_admin_style' );
84
-        add_action( 'admin_notices', 'FrmAppController::pro_get_started_headline' );
83
+		add_action( 'admin_enqueue_scripts', 'FrmAppController::load_wp_admin_style' );
84
+		add_action( 'admin_notices', 'FrmAppController::pro_get_started_headline' );
85 85
 		add_action( 'admin_init', 'FrmAppController::admin_init', 11 );
86 86
 		add_filter( 'plugin_action_links_' . FrmAppHelper::plugin_folder() . '/formidable.php', 'FrmAppController::settings_link' );
87 87
 		add_filter( 'admin_footer_text', 'FrmAppController::set_footer_text' );
@@ -90,117 +90,117 @@  discard block
 block discarded – undo
90 90
 		add_action( 'admin_menu', 'FrmAddonsController::menu', 100 );
91 91
 		add_filter( 'pre_set_site_transient_update_plugins', 'FrmAddonsController::check_update' );
92 92
 
93
-        // Entries Controller
94
-        add_action( 'admin_menu', 'FrmEntriesController::menu', 12 );
95
-        add_filter( 'contextual_help', 'FrmEntriesController::contextual_help', 10, 3 );
96
-        add_filter( 'set-screen-option', 'FrmEntriesController::save_per_page', 10, 3 );
97
-        add_filter( 'update_user_metadata', 'FrmEntriesController::check_hidden_cols', 10, 5 );
98
-        add_action( 'updated_user_meta', 'FrmEntriesController::update_hidden_cols', 10, 4 );
99
-
100
-        // Form Actions Controller
101
-        if ( FrmAppHelper::is_admin_page( 'formidable' ) ) {
102
-            add_action( 'frm_before_update_form_settings', 'FrmFormActionsController::update_settings' );
103
-        }
104
-        add_action( 'frm_after_duplicate_form', 'FrmFormActionsController::duplicate_form_actions', 20, 3 );
105
-
106
-        // Forms Controller
107
-        add_action( 'admin_menu', 'FrmFormsController::menu', 10 );
108
-        add_action( 'admin_head-toplevel_page_formidable', 'FrmFormsController::head' );
109
-
110
-        add_filter( 'set-screen-option', 'FrmFormsController::save_per_page', 10, 3 );
111
-        add_action( 'admin_footer', 'FrmFormsController::insert_form_popup' );
93
+		// Entries Controller
94
+		add_action( 'admin_menu', 'FrmEntriesController::menu', 12 );
95
+		add_filter( 'contextual_help', 'FrmEntriesController::contextual_help', 10, 3 );
96
+		add_filter( 'set-screen-option', 'FrmEntriesController::save_per_page', 10, 3 );
97
+		add_filter( 'update_user_metadata', 'FrmEntriesController::check_hidden_cols', 10, 5 );
98
+		add_action( 'updated_user_meta', 'FrmEntriesController::update_hidden_cols', 10, 4 );
99
+
100
+		// Form Actions Controller
101
+		if ( FrmAppHelper::is_admin_page( 'formidable' ) ) {
102
+			add_action( 'frm_before_update_form_settings', 'FrmFormActionsController::update_settings' );
103
+		}
104
+		add_action( 'frm_after_duplicate_form', 'FrmFormActionsController::duplicate_form_actions', 20, 3 );
105
+
106
+		// Forms Controller
107
+		add_action( 'admin_menu', 'FrmFormsController::menu', 10 );
108
+		add_action( 'admin_head-toplevel_page_formidable', 'FrmFormsController::head' );
109
+
110
+		add_filter( 'set-screen-option', 'FrmFormsController::save_per_page', 10, 3 );
111
+		add_action( 'admin_footer', 'FrmFormsController::insert_form_popup' );
112 112
 		add_action( 'media_buttons', 'FrmFormsController::insert_form_button' );
113 113
 		add_action( 'et_pb_admin_excluded_shortcodes', 'FrmFormsController::prevent_divi_conflict' );
114 114
 
115
-        // Forms Model
116
-        add_action( 'frm_after_duplicate_form', 'FrmForm::after_duplicate', 10, 2 );
115
+		// Forms Model
116
+		add_action( 'frm_after_duplicate_form', 'FrmForm::after_duplicate', 10, 2 );
117 117
 
118
-        // Settings Controller
119
-        add_action( 'admin_menu', 'FrmSettingsController::menu', 45 );
120
-        add_action( 'frm_before_settings', 'FrmSettingsController::license_box' );
118
+		// Settings Controller
119
+		add_action( 'admin_menu', 'FrmSettingsController::menu', 45 );
120
+		add_action( 'frm_before_settings', 'FrmSettingsController::license_box' );
121 121
 		add_action( 'frm_after_settings', 'FrmSettingsController::settings_cta' );
122 122
 		add_action( 'wp_ajax_frm_settings_tab', 'FrmSettingsController::load_settings_tab' );
123 123
 
124
-        // Styles Controller
125
-        add_action( 'admin_menu', 'FrmStylesController::menu', 14 );
126
-        add_action( 'admin_init', 'FrmStylesController::admin_init' );
124
+		// Styles Controller
125
+		add_action( 'admin_menu', 'FrmStylesController::menu', 14 );
126
+		add_action( 'admin_init', 'FrmStylesController::admin_init' );
127 127
 
128
-        // XML Controller
129
-        add_action( 'admin_menu', 'FrmXMLController::menu', 41 );
130
-    }
128
+		// XML Controller
129
+		add_action( 'admin_menu', 'FrmXMLController::menu', 41 );
130
+	}
131 131
 
132 132
 	public static function load_ajax_hooks() {
133 133
 		add_action( 'wp_ajax_frm_install', 'FrmAppController::ajax_install' );
134
-        add_action( 'wp_ajax_frm_uninstall', 'FrmAppController::uninstall' );
135
-        add_action( 'wp_ajax_frm_deauthorize', 'FrmAppController::deauthorize' );
134
+		add_action( 'wp_ajax_frm_uninstall', 'FrmAppController::uninstall' );
135
+		add_action( 'wp_ajax_frm_deauthorize', 'FrmAppController::deauthorize' );
136 136
 
137 137
 		// Addons
138 138
 		add_action( 'wp_ajax_frm_addon_activate', 'FrmAddon::activate' );
139 139
 		add_action( 'wp_ajax_frm_addon_deactivate', 'FrmAddon::deactivate' );
140 140
 		add_action( 'wp_ajax_frm_install_addon', 'FrmAddonsController::ajax_install_addon' );
141 141
 
142
-        // Fields Controller
143
-        add_action( 'wp_ajax_frm_load_field', 'FrmFieldsController::load_field' );
144
-        add_action( 'wp_ajax_frm_insert_field', 'FrmFieldsController::create' );
145
-        add_action( 'wp_ajax_frm_update_ajax_option', 'FrmFieldsController::update_ajax_option' );
146
-        add_action( 'wp_ajax_frm_duplicate_field', 'FrmFieldsController::duplicate' );
147
-        add_action( 'wp_ajax_frm_delete_field', 'FrmFieldsController::destroy' );
148
-        add_action( 'wp_ajax_frm_add_field_option', 'FrmFieldsController::add_option' );
149
-        add_action( 'wp_ajax_frm_import_choices', 'FrmFieldsController::import_choices' );
150
-        add_action( 'wp_ajax_frm_import_options', 'FrmFieldsController::import_options' );
151
-        add_action( 'wp_ajax_frm_update_field_order', 'FrmFieldsController::update_order' );
152
-
153
-        // Form Actions Controller
154
-        add_action( 'wp_ajax_frm_add_form_action', 'FrmFormActionsController::add_form_action' );
155
-        add_action( 'wp_ajax_frm_form_action_fill', 'FrmFormActionsController::fill_action' );
156
-
157
-        // Forms Controller
142
+		// Fields Controller
143
+		add_action( 'wp_ajax_frm_load_field', 'FrmFieldsController::load_field' );
144
+		add_action( 'wp_ajax_frm_insert_field', 'FrmFieldsController::create' );
145
+		add_action( 'wp_ajax_frm_update_ajax_option', 'FrmFieldsController::update_ajax_option' );
146
+		add_action( 'wp_ajax_frm_duplicate_field', 'FrmFieldsController::duplicate' );
147
+		add_action( 'wp_ajax_frm_delete_field', 'FrmFieldsController::destroy' );
148
+		add_action( 'wp_ajax_frm_add_field_option', 'FrmFieldsController::add_option' );
149
+		add_action( 'wp_ajax_frm_import_choices', 'FrmFieldsController::import_choices' );
150
+		add_action( 'wp_ajax_frm_import_options', 'FrmFieldsController::import_options' );
151
+		add_action( 'wp_ajax_frm_update_field_order', 'FrmFieldsController::update_order' );
152
+
153
+		// Form Actions Controller
154
+		add_action( 'wp_ajax_frm_add_form_action', 'FrmFormActionsController::add_form_action' );
155
+		add_action( 'wp_ajax_frm_form_action_fill', 'FrmFormActionsController::fill_action' );
156
+
157
+		// Forms Controller
158 158
 		add_action( 'wp_ajax_frm_create_from_template', 'FrmFormsController::_create_from_template' );
159 159
 		add_action( 'wp_ajax_frm_save_form', 'FrmFormsController::route' );
160
-        add_action( 'wp_ajax_frm_get_default_html', 'FrmFormsController::get_email_html' );
161
-        add_action( 'wp_ajax_frm_get_shortcode_opts', 'FrmFormsController::get_shortcode_opts' );
162
-        add_action( 'wp_ajax_frm_forms_preview', 'FrmFormsController::preview' );
163
-        add_action( 'wp_ajax_nopriv_frm_forms_preview', 'FrmFormsController::preview' );
160
+		add_action( 'wp_ajax_frm_get_default_html', 'FrmFormsController::get_email_html' );
161
+		add_action( 'wp_ajax_frm_get_shortcode_opts', 'FrmFormsController::get_shortcode_opts' );
162
+		add_action( 'wp_ajax_frm_forms_preview', 'FrmFormsController::preview' );
163
+		add_action( 'wp_ajax_nopriv_frm_forms_preview', 'FrmFormsController::preview' );
164 164
 
165 165
 		// Settings
166 166
 		add_action( 'wp_ajax_frm_lite_settings_upgrade', 'FrmSettingsController::settings_cta_dismiss' );
167 167
 
168
-        // Styles Controller
169
-        add_action( 'wp_ajax_frm_settings_reset', 'FrmStylesController::reset_styling' );
170
-        add_action( 'wp_ajax_frm_change_styling', 'FrmStylesController::change_styling' );
171
-        add_action( 'wp_ajax_frmpro_load_css', 'FrmStylesController::load_css' );
172
-        add_action( 'wp_ajax_nopriv_frmpro_load_css', 'FrmStylesController::load_css' );
168
+		// Styles Controller
169
+		add_action( 'wp_ajax_frm_settings_reset', 'FrmStylesController::reset_styling' );
170
+		add_action( 'wp_ajax_frm_change_styling', 'FrmStylesController::change_styling' );
171
+		add_action( 'wp_ajax_frmpro_load_css', 'FrmStylesController::load_css' );
172
+		add_action( 'wp_ajax_nopriv_frmpro_load_css', 'FrmStylesController::load_css' );
173 173
 		add_action( 'wp_ajax_frmpro_css', 'FrmStylesController::load_saved_css' );
174 174
 		add_action( 'wp_ajax_nopriv_frmpro_css', 'FrmStylesController::load_saved_css' );
175 175
 
176
-        // XML Controller
176
+		// XML Controller
177 177
 		add_action( 'wp_ajax_frm_entries_csv', 'FrmXMLController::csv' );
178 178
 		add_action( 'wp_ajax_nopriv_frm_entries_csv', 'FrmXMLController::csv' );
179
-        add_action( 'wp_ajax_frm_export_xml', 'FrmXMLController::export_xml' );
180
-    }
179
+		add_action( 'wp_ajax_frm_export_xml', 'FrmXMLController::export_xml' );
180
+	}
181 181
 
182 182
 	public static function load_form_hooks() {
183
-        // Fields Controller
184
-        add_filter( 'frm_field_type', 'FrmFieldsController::change_type' );
185
-        add_action( 'frm_field_input_html', 'FrmFieldsController::input_html' );
186
-        add_filter( 'frm_field_value_saved', 'FrmFieldsController::check_value', 50, 3 );
187
-        add_filter( 'frm_field_label_seen', 'FrmFieldsController::check_label' );
183
+		// Fields Controller
184
+		add_filter( 'frm_field_type', 'FrmFieldsController::change_type' );
185
+		add_action( 'frm_field_input_html', 'FrmFieldsController::input_html' );
186
+		add_filter( 'frm_field_value_saved', 'FrmFieldsController::check_value', 50, 3 );
187
+		add_filter( 'frm_field_label_seen', 'FrmFieldsController::check_label' );
188 188
 
189 189
 		// Forms Controller
190 190
 		add_filter( 'frm_form_classes', 'FrmFormsController::form_classes' );
191 191
 
192
-        // Styles Controller
193
-        add_filter( 'frm_use_important_width', 'FrmStylesController::important_style', 10, 2 );
194
-    }
192
+		// Styles Controller
193
+		add_filter( 'frm_use_important_width', 'FrmStylesController::important_style', 10, 2 );
194
+	}
195 195
 
196 196
 	public static function load_view_hooks() {
197
-        // Hooks go here when a view is loaded
198
-    }
197
+		// Hooks go here when a view is loaded
198
+	}
199 199
 
200 200
 	public static function load_multisite_hooks() {
201 201
 		add_action( 'wpmu_upgrade_site', 'FrmAppController::network_upgrade_site' );
202 202
 
203
-        // drop tables when mu site is deleted
204
-        add_filter( 'wpmu_drop_tables', 'FrmAppController::drop_tables' );
205
-    }
203
+		// drop tables when mu site is deleted
204
+		add_filter( 'wpmu_drop_tables', 'FrmAppController::drop_tables' );
205
+	}
206 206
 }
Please login to merge, or discard this patch.
classes/models/FrmReviews.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,6 @@
 block discarded – undo
62 62
 	 * Maybe show review request
63 63
 	 *
64 64
 	 * @since 3.04.03
65
-	 * @param int $asked
66 65
 	 */
67 66
 	private function review() {
68 67
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,12 +70,12 @@
 block discarded – undo
70 70
 		$show_intervals = array( 50, 200, 500 );
71 71
 		$asked = $this->review_status['asked'];
72 72
 
73
-		if ( ! isset( $show_intervals[ $asked ] ) ) {
73
+		if ( ! isset( $show_intervals[$asked] ) ) {
74 74
 			return;
75 75
 		}
76 76
 
77 77
 		$entries = FrmEntry::getRecordCount();
78
-		$count   = $show_intervals[ $asked ];
78
+		$count   = $show_intervals[$asked];
79 79
 		$user    = wp_get_current_user();
80 80
 
81 81
 		// Only show review request if the site has collected enough entries
Please login to merge, or discard this patch.