Passed
Pull Request — master (#501)
by
unknown
08:50
created
includes/options.php 3 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -195,14 +195,14 @@  discard block
 block discarded – undo
195 195
 }
196 196
 
197 197
  /**
198
- * Helper method for deleting a setting's value.
199
- *
200
- * @since 6.0.0
201
- * @access public
202
- *
203
- * @param string $key   The setting key.
204
- * @return boolean True if removed, false if not.
205
- */
198
+  * Helper method for deleting a setting's value.
199
+  *
200
+  * @since 6.0.0
201
+  * @access public
202
+  *
203
+  * @param string $key   The setting key.
204
+  * @return boolean True if removed, false if not.
205
+  */
206 206
 function monsterinsights_delete_option( $key = '' ) {
207 207
 	// If no key, exit
208 208
 	if ( empty( $key ) ){
@@ -245,14 +245,14 @@  discard block
 block discarded – undo
245 245
 }
246 246
 
247 247
  /**
248
- * Helper method for deleting multiple settings value.
249
- *
250
- * @since 6.0.0
251
- * @access public
252
- *
253
- * @param string $key   The setting key.
254
- * @return boolean True if removed, false if not.
255
- */
248
+  * Helper method for deleting multiple settings value.
249
+  *
250
+  * @since 6.0.0
251
+  * @access public
252
+  *
253
+  * @param string $key   The setting key.
254
+  * @return boolean True if removed, false if not.
255
+  */
256 256
 function monsterinsights_delete_options( $keys = array() ) {
257 257
 	// If no keys, exit
258 258
 	if ( empty( $keys ) || ! is_array( $keys ) ){
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
  */
48 48
 function monsterinsights_get_option( $key = '', $default = false ) {
49 49
 	global $monsterinsights_settings;
50
-	$value = ! empty( $monsterinsights_settings[ $key ] ) ? $monsterinsights_settings[ $key ] : $default;
50
+	$value = ! empty( $monsterinsights_settings[$key] ) ? $monsterinsights_settings[$key] : $default;
51 51
 	$value = apply_filters( 'monsterinsights_get_option', $value, $key, $default );
52 52
 	return apply_filters( 'monsterinsights_get_option_' . $key, $value, $key, $default );
53 53
 }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 function monsterinsights_update_option( $key = '', $value = false ) {
147 147
 
148 148
 	// If no key, exit
149
-	if ( empty( $key ) ){
149
+	if ( empty( $key ) ) {
150 150
 		return false;
151 151
 	}
152 152
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	$value = apply_filters( 'monsterinsights_update_option', $value, $key );
178 178
 
179 179
 	// Next let's try to update the value
180
-	$settings[ $key ] = $value;
180
+	$settings[$key] = $value;
181 181
 	$did_update = false;
182 182
 	//if ( $update_network_option ) {
183 183
 	//    $did_update = update_site_option( $option_name, $settings );
@@ -186,9 +186,9 @@  discard block
 block discarded – undo
186 186
 	//}
187 187
 
188 188
 	// If it updated, let's update the global variable
189
-	if ( $did_update ){
189
+	if ( $did_update ) {
190 190
 		global $monsterinsights_settings;
191
-		$monsterinsights_settings[ $key ] = $value;
191
+		$monsterinsights_settings[$key] = $value;
192 192
 	}
193 193
 
194 194
 	return $did_update;
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
  */
206 206
 function monsterinsights_delete_option( $key = '' ) {
207 207
 	// If no key, exit
208
-	if ( empty( $key ) ){
208
+	if ( empty( $key ) ) {
209 209
 		return false;
210 210
 	}
211 211
 
@@ -224,8 +224,8 @@  discard block
 block discarded – undo
224 224
 	//}
225 225
 
226 226
 	// Next let's try to remove the key
227
-	if( isset( $settings[ $key ] ) ) {
228
-		unset( $settings[ $key ] );
227
+	if ( isset( $settings[$key] ) ) {
228
+		unset( $settings[$key] );
229 229
 	}
230 230
 
231 231
 	$did_update = false;
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 	//}
237 237
 
238 238
 	// If it updated, let's update the global variable
239
-	if ( $did_update ){
239
+	if ( $did_update ) {
240 240
 		global $monsterinsights_settings;
241 241
 		$monsterinsights_settings = $settings;
242 242
 	}
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
  */
256 256
 function monsterinsights_delete_options( $keys = array() ) {
257 257
 	// If no keys, exit
258
-	if ( empty( $keys ) || ! is_array( $keys ) ){
258
+	if ( empty( $keys ) || ! is_array( $keys ) ) {
259 259
 		return false;
260 260
 	}
261 261
 
@@ -275,8 +275,8 @@  discard block
 block discarded – undo
275 275
 
276 276
 	// Next let's try to remove the keys
277 277
 	foreach ( $keys as $key ) {
278
-		if( isset( $settings[ $key ] ) ) {
279
-			unset( $settings[ $key ] );
278
+		if ( isset( $settings[$key] ) ) {
279
+			unset( $settings[$key] );
280 280
 		}
281 281
 	}
282 282
 
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 	//}
289 289
 
290 290
 	// If it updated, let's update the global variable
291
-	if ( $did_update ){
291
+	if ( $did_update ) {
292 292
 		global $monsterinsights_settings;
293 293
 		$monsterinsights_settings = $settings;
294 294
 	}
@@ -379,8 +379,8 @@  discard block
 block discarded – undo
379 379
 	);
380 380
 
381 381
 	foreach ( $exclude as $e ) {
382
-		if ( ! empty( $settings[ $e ] ) ) {
383
-			unset( $settings[ $e ] );
382
+		if ( ! empty( $settings[$e] ) ) {
383
+			unset( $settings[$e] );
384 384
 		}
385 385
 	}
386 386
 	return wp_json_encode( $settings );
Please login to merge, or discard this patch.
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 function monsterinsights_update_option( $key = '', $value = false ) {
147 147
 
148 148
 	// If no key, exit
149
-	if ( empty( $key ) ){
149
+	if ( empty( $key ) ) {
150 150
 		return false;
151 151
 	}
152 152
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 	//}
187 187
 
188 188
 	// If it updated, let's update the global variable
189
-	if ( $did_update ){
189
+	if ( $did_update ) {
190 190
 		global $monsterinsights_settings;
191 191
 		$monsterinsights_settings[ $key ] = $value;
192 192
 	}
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
  */
206 206
 function monsterinsights_delete_option( $key = '' ) {
207 207
 	// If no key, exit
208
-	if ( empty( $key ) ){
208
+	if ( empty( $key ) ) {
209 209
 		return false;
210 210
 	}
211 211
 
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 	//}
237 237
 
238 238
 	// If it updated, let's update the global variable
239
-	if ( $did_update ){
239
+	if ( $did_update ) {
240 240
 		global $monsterinsights_settings;
241 241
 		$monsterinsights_settings = $settings;
242 242
 	}
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
  */
256 256
 function monsterinsights_delete_options( $keys = array() ) {
257 257
 	// If no keys, exit
258
-	if ( empty( $keys ) || ! is_array( $keys ) ){
258
+	if ( empty( $keys ) || ! is_array( $keys ) ) {
259 259
 		return false;
260 260
 	}
261 261
 
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 	//}
289 289
 
290 290
 	// If it updated, let's update the global variable
291
-	if ( $did_update ){
291
+	if ( $did_update ) {
292 292
 		global $monsterinsights_settings;
293 293
 		$monsterinsights_settings = $settings;
294 294
 	}
Please login to merge, or discard this patch.
includes/deprecated.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	 */
124 124
 	if ( ( WP_DEBUG && apply_filters( 'deprecated_hook_trigger_error', true ) ) || monsterinsights_is_debug_mode() ) {
125 125
 		$message = empty( $message ) ? '' : ' ' . $message;
126
-		trigger_error( sprintf( esc_html__( '%1$s is %3$sdeprecated%4$s since MonsterInsights version %2$s!', 'google-analytics-for-wordpress' ), $hook, $version, '<strong>', '</strong>' ) . esc_html ( $message ) );
126
+		trigger_error( sprintf( esc_html__( '%1$s is %3$sdeprecated%4$s since MonsterInsights version %2$s!', 'google-analytics-for-wordpress' ), $hook, $version, '<strong>', '</strong>' ) . esc_html( $message ) );
127 127
 	}
128 128
 }
129 129
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	 */
178 178
 	if ( ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) || monsterinsights_is_debug_mode() ) {
179 179
 		trigger_error( sprintf( esc_html__( '%1$s is %3$sdeprecated%4$s since MonsterInsights version %2$s.', 'google-analytics-for-wordpress' ), $function, $version, '<strong>', '</strong>' ) );
180
-		trigger_error( print_r( $backtrace, 1 ) );// Limited to previous 1028 characters, but since we only need to move back 1 in stack that should be fine.
180
+		trigger_error( print_r( $backtrace, 1 ) ); // Limited to previous 1028 characters, but since we only need to move back 1 in stack that should be fine.
181 181
 		// Alternatively we could dump this to a file.
182 182
 	}
183 183
 }
Please login to merge, or discard this patch.
includes/frontend/class-tracking-abstract.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * @return array Array of the options to use.
59 59
      */
60 60
     public function frontend_tracking_options( ) {
61
-        return array();
61
+	return array();
62 62
     }
63 63
 
64 64
     /**
@@ -74,6 +74,6 @@  discard block
 block discarded – undo
74 74
      * @return string Javascript to output.
75 75
      */
76 76
     public function frontend_output( ) {
77
-         return "<!-- MonsterInsights Abstract Tracking class -->";
77
+	 return "<!-- MonsterInsights Abstract Tracking class -->";
78 78
     }
79 79
 }
80 80
\ No newline at end of file
Please login to merge, or discard this patch.
includes/admin/reporting.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
 	}
26 26
 
27
-	public function add_report( $report = false ){
27
+	public function add_report( $report = false ) {
28 28
 		if ( empty( $report ) || ! is_object( $report ) ) {
29 29
 			return;
30 30
 		}
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
 	}
26 26
 
27
-	public function add_report( $report = false ){
27
+	public function add_report( $report = false ) {
28 28
 		if ( empty( $report ) || ! is_object( $report ) ) {
29 29
 			return;
30 30
 		}
Please login to merge, or discard this patch.
lite/includes/admin/reports/report-dimensions.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
lite/includes/admin/reports/report-queries.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
Please login to merge, or discard this patch.
lite/includes/admin/reports/report-ecommerce.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
lite/includes/admin/reports/report-publisher.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
lite/includes/admin/reports/report-forms.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.