Passed
Push — master ( 2bd1cf...bfbffa )
by
unknown
05:03
created
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.
includes/admin/tracking.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -94,14 +94,14 @@  discard block
 block discarded – undo
94 94
 		$data['usagetracking'] = get_option( 'monsterinsights_usage_tracking_config', false );
95 95
 		$data['usercount']     = function_exists( 'get_user_count' ) ? get_user_count() : 'Not Set';
96 96
 		$data['usesauth']      = $usesauth;
97
-		$data['timezoneoffset']= date('P');
98
-		$data['installed_lite']= get_option( 'monsterinsights_installed_lite', array() );
97
+		$data['timezoneoffset'] = date( 'P' );
98
+		$data['installed_lite'] = get_option( 'monsterinsights_installed_lite', array() );
99 99
 		$data['installed_pro'] = get_option( 'monsterinsights_installed_pro', array() );
100 100
 
101 101
 
102 102
 
103 103
 		// Retrieve current plugin information
104
-		if( ! function_exists( 'get_plugins' ) ) {
104
+		if ( ! function_exists( 'get_plugins' ) ) {
105 105
 			include ABSPATH . '/wp-admin/includes/plugin.php';
106 106
 		}
107 107
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 		foreach ( $plugins as $key => $plugin ) {
112 112
 			if ( in_array( $plugin, $active_plugins ) ) {
113 113
 				// Remove active plugins from list so we can show active and inactive separately
114
-				unset( $plugins[ $key ] );
114
+				unset( $plugins[$key] );
115 115
 			}
116 116
 		}
117 117
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 			return false;
130 130
 		}
131 131
 
132
-		if( ! $this->tracking_allowed() && ! $override ) {
132
+		if ( ! $this->tracking_allowed() && ! $override ) {
133 133
 			return false;
134 134
 		}
135 135
 
@@ -161,15 +161,15 @@  discard block
 block discarded – undo
161 161
 	public function schedule_send() {
162 162
 		if ( ! wp_next_scheduled( 'monsterinsights_usage_tracking_cron' ) ) {
163 163
 			$tracking             = array();
164
-			$tracking['day']      = rand( 0, 6  );
164
+			$tracking['day']      = rand( 0, 6 );
165 165
 			$tracking['hour']     = rand( 0, 23 );
166 166
 			$tracking['minute']   = rand( 0, 59 );
167 167
 			$tracking['second']   = rand( 0, 59 );
168
-			$tracking['offset']   = ( $tracking['day']    * DAY_IN_SECONDS    ) +
169
-									( $tracking['hour']   * HOUR_IN_SECONDS   ) +
168
+			$tracking['offset']   = ( $tracking['day'] * DAY_IN_SECONDS ) +
169
+									( $tracking['hour'] * HOUR_IN_SECONDS ) +
170 170
 									( $tracking['minute'] * MINUTE_IN_SECONDS ) +
171 171
 									 $tracking['second'];
172
-			$tracking['initsend'] = strtotime("next sunday") + $tracking['offset'];
172
+			$tracking['initsend'] = strtotime( "next sunday" ) + $tracking['offset'];
173 173
 
174 174
 			wp_schedule_event( $tracking['initsend'], 'weekly', 'monsterinsights_usage_tracking_cron' );
175 175
 			update_option( 'monsterinsights_usage_tracking_config', $tracking );
Please login to merge, or discard this patch.
lite/includes/admin/reports/report-realtime.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/onboarding-wizard.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,8 @@
 block discarded – undo
52 52
 		// Check for wizard-specific parameter
53 53
 		// Allow plugins to disable the onboarding wizard
54 54
 		// Check if current user is allowed to save settings.
55
-		if ( ! ( isset( $_GET['page'] ) || 'monsterinsights-onboarding' !== $_GET['page'] || apply_filters( 'monsterinsights_enable_onboarding_wizard', true ) || ! current_user_can( 'monsterinsights_save_settings' ) ) ) { // WPCS: CSRF ok, input var ok.
55
+		if ( ! ( isset( $_GET['page'] ) || 'monsterinsights-onboarding' !== $_GET['page'] || apply_filters( 'monsterinsights_enable_onboarding_wizard', true ) || ! current_user_can( 'monsterinsights_save_settings' ) ) ) {
56
+// WPCS: CSRF ok, input var ok.
56 57
 			return;
57 58
 		}
58 59
 
Please login to merge, or discard this patch.
includes/admin/common.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 		'kad_admin_js', // Pinnacle theme
354 354
 		'dt-chart', // DesignThemes core features plugin
355 355
 		'tweeetshare_font_script', // TweetShare - Click To Tweet
356
-		'tweeetshare_jquery_script',  // TweetShare - Click To Tweet
356
+		'tweeetshare_jquery_script', // TweetShare - Click To Tweet
357 357
 		'tweeetshare_jqueryui_script', // TweetShare - Click To Tweet
358 358
 		'tweeetshare_custom_script', // TweetShare - Click To Tweet
359 359
 		'imagify-promise-polyfill', // Imagify
@@ -372,16 +372,16 @@  discard block
 block discarded – undo
372 372
 		'rml-modal', // WP Real Media Library
373 373
 		'rml-order', // WP Real Media Library
374 374
 		'rml-meta', // WP Real Media Library
375
-		'rml-uploader',  // WP Real Media Library
376
-		'rml-options',  // WP Real Media Library
377
-		'rml-usersettings',  // WP Real Media Library
375
+		'rml-uploader', // WP Real Media Library
376
+		'rml-options', // WP Real Media Library
377
+		'rml-usersettings', // WP Real Media Library
378 378
 		'rml-main', // WP Real Media Library
379 379
 		'control-panel-sweet-alert', // Ken Theme
380 380
 		'sweet-alert-js', // Vitrine Theme
381 381
 		'theme-admin-script', // Vitrine Theme
382 382
 		'sweetalert', //  Church Suite Theme by Webnus
383 383
 		'be_alerts_charts', //  WooCommerce bolder product alerts
384
-		'magayo-lottery-results',  //  Magayo Lottery Results
384
+		'magayo-lottery-results', //  Magayo Lottery Results
385 385
 		'control-panel-sweet-alert', // Ken Theme
386 386
 		'cpm_chart', // WP Project Manager
387 387
 		'adminscripts', //  Artisan Nayma Theme
@@ -472,20 +472,20 @@  discard block
 block discarded – undo
472 472
 
473 473
 	global $wp_styles;
474 474
 	foreach ( $wp_styles->queue as $handle ) {
475
-		if ( strpos( $wp_styles->registered[ $handle ]->src, 'wp-content' ) === false ) {
475
+		if ( strpos( $wp_styles->registered[$handle]->src, 'wp-content' ) === false ) {
476 476
 			return;
477 477
 		}
478 478
 
479
-		if ( strpos( $wp_styles->registered[ $handle ]->handle, 'monsterinsights' ) !== false ) {
479
+		if ( strpos( $wp_styles->registered[$handle]->handle, 'monsterinsights' ) !== false ) {
480 480
 			return;
481 481
 		}
482 482
 
483 483
 		foreach ( $third_party as $partial ) {
484
-			if ( strpos( $wp_styles->registered[ $handle ]->handle, $partial ) !== false ) {
484
+			if ( strpos( $wp_styles->registered[$handle]->handle, $partial ) !== false ) {
485 485
 				wp_dequeue_style( $handle ); // Remove css file from MI screen
486 486
 				wp_deregister_style( $handle );
487 487
 				break;
488
-			} else if ( strpos( $wp_styles->registered[ $handle ]->src, $partial ) !== false ) {
488
+			} else if ( strpos( $wp_styles->registered[$handle]->src, $partial ) !== false ) {
489 489
 				wp_dequeue_style( $handle ); // Remove css file from MI screen
490 490
 				wp_deregister_style( $handle );
491 491
 				break;
@@ -495,20 +495,20 @@  discard block
 block discarded – undo
495 495
 
496 496
 	global $wp_scripts;
497 497
 	foreach ( $wp_scripts->queue as $handle ) {
498
-		if ( strpos( $wp_scripts->registered[ $handle ]->src, 'wp-content' ) === false ) {
498
+		if ( strpos( $wp_scripts->registered[$handle]->src, 'wp-content' ) === false ) {
499 499
 			return;
500 500
 		}
501 501
 
502
-		if ( strpos( $wp_scripts->registered[ $handle ]->handle, 'monsterinsights' ) !== false ) {
502
+		if ( strpos( $wp_scripts->registered[$handle]->handle, 'monsterinsights' ) !== false ) {
503 503
 			return;
504 504
 		}
505 505
 
506 506
 		foreach ( $third_party as $partial ) {
507
-			if ( strpos( $wp_scripts->registered[ $handle ]->handle, $partial ) !== false ) {
507
+			if ( strpos( $wp_scripts->registered[$handle]->handle, $partial ) !== false ) {
508 508
 				wp_dequeue_script( $handle ); // Remove JS file from MI screen
509 509
 				wp_deregister_script( $handle );
510 510
 				break;
511
-			} else if ( strpos( $wp_scripts->registered[ $handle ]->src, $partial ) !== false ) {
511
+			} else if ( strpos( $wp_scripts->registered[$handle]->src, $partial ) !== false ) {
512 512
 				wp_dequeue_script( $handle ); // Remove JS file from MI screen
513 513
 				wp_deregister_script( $handle );
514 514
 				break;
@@ -582,14 +582,14 @@  discard block
 block discarded – undo
582 582
 		foreach ( $wp_filter['user_admin_notices']->callbacks as $priority => $hooks ) {
583 583
 			foreach ( $hooks as $name => $arr ) {
584 584
 				if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
585
-					unset( $wp_filter['user_admin_notices']->callbacks[ $priority ][ $name ] );
585
+					unset( $wp_filter['user_admin_notices']->callbacks[$priority][$name] );
586 586
 					continue;
587 587
 				}
588 588
 				if ( ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) && strpos( strtolower( get_class( $arr['function'][0] ) ), 'monsterinsights' ) !== false ) {
589 589
 					continue;
590 590
 				}
591 591
 				if ( ! empty( $name ) && strpos( $name, 'monsterinsights' ) === false ) {
592
-					unset( $wp_filter['user_admin_notices']->callbacks[ $priority ][ $name ] );
592
+					unset( $wp_filter['user_admin_notices']->callbacks[$priority][$name] );
593 593
 				}
594 594
 			}
595 595
 		}
@@ -599,14 +599,14 @@  discard block
 block discarded – undo
599 599
 		foreach ( $wp_filter['admin_notices']->callbacks as $priority => $hooks ) {
600 600
 			foreach ( $hooks as $name => $arr ) {
601 601
 				if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
602
-					unset( $wp_filter['admin_notices']->callbacks[ $priority ][ $name ] );
602
+					unset( $wp_filter['admin_notices']->callbacks[$priority][$name] );
603 603
 					continue;
604 604
 				}
605 605
 				if ( ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) && strpos( strtolower( get_class( $arr['function'][0] ) ), 'monsterinsights' ) !== false ) {
606 606
 					continue;
607 607
 				}
608 608
 				if ( ! empty( $name ) && strpos( $name, 'monsterinsights' ) === false ) {
609
-					unset( $wp_filter['admin_notices']->callbacks[ $priority ][ $name ] );
609
+					unset( $wp_filter['admin_notices']->callbacks[$priority][$name] );
610 610
 				}
611 611
 			}
612 612
 		}
@@ -616,14 +616,14 @@  discard block
 block discarded – undo
616 616
 		foreach ( $wp_filter['all_admin_notices']->callbacks as $priority => $hooks ) {
617 617
 			foreach ( $hooks as $name => $arr ) {
618 618
 				if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
619
-					unset( $wp_filter['all_admin_notices']->callbacks[ $priority ][ $name ] );
619
+					unset( $wp_filter['all_admin_notices']->callbacks[$priority][$name] );
620 620
 					continue;
621 621
 				}
622 622
 				if ( ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) && strpos( strtolower( get_class( $arr['function'][0] ) ), 'monsterinsights' ) !== false ) {
623 623
 					continue;
624 624
 				}
625 625
 				if ( ! empty( $name ) && strpos( $name, 'monsterinsights' ) === false ) {
626
-					unset( $wp_filter['all_admin_notices']->callbacks[ $priority ][ $name ] );
626
+					unset( $wp_filter['all_admin_notices']->callbacks[$priority][$name] );
627 627
 				}
628 628
 			}
629 629
 		}
@@ -684,10 +684,10 @@  discard block
 block discarded – undo
684 684
 	// Put together redirect URL
685 685
 	$url = add_query_arg(
686 686
 		array(
687
-			'utm_source'   => $source,   // Pro/Lite Plugin
688
-			'utm_medium'   => sanitize_key( $medium ),   // Area of MonsterInsights (example Reports)
687
+			'utm_source'   => $source, // Pro/Lite Plugin
688
+			'utm_medium'   => sanitize_key( $medium ), // Area of MonsterInsights (example Reports)
689 689
 			'utm_campaign' => sanitize_key( $campaign ), // Which link (example eCommerce Report)
690
-			'utm_content'  => $content,  // Version number of MI
690
+			'utm_content'  => $content, // Version number of MI
691 691
 		),
692 692
 		trailingslashit( $url )
693 693
 	);
Please login to merge, or discard this patch.