Passed
Pull Request — master (#501)
by
unknown
08:50
created
includes/frontend/frontend.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
 function monsterinsights_rss_link_tagger( $guid ) {
127 127
     global $post;
128 128
 
129
-    if ( monsterinsights_get_option( 'tag_links_in_rss', false ) ){
129
+    if ( monsterinsights_get_option( 'tag_links_in_rss', false ) ) {
130 130
         if ( is_feed() ) {
131 131
             if ( monsterinsights_get_option( 'allow_anchor', false ) ) {
132 132
                 $delimiter = '#';
Please login to merge, or discard this patch.
includes/admin/reporting.php 1 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 1 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 1 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 1 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 1 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 1 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/options.php 1 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/helpers.php 1 patch
Braces   +23 added lines, -9 removed lines patch added patch discarded remove patch
@@ -844,11 +844,11 @@  discard block
 block discarded – undo
844 844
 	return $countries;
845 845
 }
846 846
 
847
-function monsterinsights_get_api_url(){
847
+function monsterinsights_get_api_url() {
848 848
 	return apply_filters( 'monsterinsights_get_api_url', 'api.monsterinsights.com/v2/' );
849 849
 }
850 850
 
851
-function monsterinsights_get_licensing_url(){
851
+function monsterinsights_get_licensing_url() {
852 852
 	return apply_filters( 'monsterinsights_get_licensing_url', 'https://www.monsterinsights.com' );
853 853
 }
854 854
 
@@ -917,7 +917,9 @@  discard block
 block discarded – undo
917 917
 	function remove_class_filter( $tag, $class_name = '', $method_name = '', $priority = 10 ) {
918 918
 		global $wp_filter;
919 919
 		// Check that filter actually exists first
920
-		if ( ! isset( $wp_filter[ $tag ] ) ) return FALSE;
920
+		if ( ! isset( $wp_filter[ $tag ] ) ) {
921
+			return FALSE;
922
+		}
921 923
 		/**
922 924
 		 * If filter config is an object, means we're using WordPress 4.7+ and the config is no longer
923 925
 		 * a simple array, rather it is an object that implements the ArrayAccess interface.
@@ -932,23 +934,35 @@  discard block
 block discarded – undo
932 934
 			$callbacks = &$wp_filter[ $tag ];
933 935
 		}
934 936
 		// Exit if there aren't any callbacks for specified priority
935
-		if ( ! isset( $callbacks[ $priority ] ) || empty( $callbacks[ $priority ] ) ) return FALSE;
937
+		if ( ! isset( $callbacks[ $priority ] ) || empty( $callbacks[ $priority ] ) ) {
938
+			return FALSE;
939
+		}
936 940
 		// Loop through each filter for the specified priority, looking for our class & method
937 941
 		foreach( (array) $callbacks[ $priority ] as $filter_id => $filter ) {
938 942
 			// Filter should always be an array - array( $this, 'method' ), if not goto next
939
-			if ( ! isset( $filter[ 'function' ] ) || ! is_array( $filter[ 'function' ] ) ) continue;
943
+			if ( ! isset( $filter[ 'function' ] ) || ! is_array( $filter[ 'function' ] ) ) {
944
+				continue;
945
+			}
940 946
 			// If first value in array is not an object, it can't be a class
941
-			if ( ! is_object( $filter[ 'function' ][ 0 ] ) ) continue;
947
+			if ( ! is_object( $filter[ 'function' ][ 0 ] ) ) {
948
+				continue;
949
+			}
942 950
 			// Method doesn't match the one we're looking for, goto next
943
-			if ( $filter[ 'function' ][ 1 ] !== $method_name ) continue;
951
+			if ( $filter[ 'function' ][ 1 ] !== $method_name ) {
952
+				continue;
953
+			}
944 954
 			// Method matched, now let's check the Class
945 955
 			if ( get_class( $filter[ 'function' ][ 0 ] ) === $class_name ) {
946 956
 				// Now let's remove it from the array
947 957
 				unset( $callbacks[ $priority ][ $filter_id ] );
948 958
 				// and if it was the only filter in that priority, unset that priority
949
-				if ( empty( $callbacks[ $priority ] ) ) unset( $callbacks[ $priority ] );
959
+				if ( empty( $callbacks[ $priority ] ) ) {
960
+					unset( $callbacks[ $priority ] );
961
+				}
950 962
 				// and if the only filter for that tag, set the tag to an empty array
951
-				if ( empty( $callbacks ) ) $callbacks = array();
963
+				if ( empty( $callbacks ) ) {
964
+					$callbacks = array();
965
+				}
952 966
 				// If using WordPress older than 4.7
953 967
 				if ( ! is_object( $wp_filter[ $tag ] ) ) {
954 968
 					// Remove this filter from merged_filters, which specifies if filters have been sorted
Please login to merge, or discard this patch.