Passed
Push — development ( f25e12...0a3492 )
by Eric
03:15
created
inc/widgets.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
19 19
 		}
20 20
 		$sidebar_widget_count = $_wp_sidebars_widgets;
21 21
 
22
-		if ( isset( $sidebar_widget_count[ $sidebar_id ] ) ) {
23
-			$widget_count   = count( $sidebar_widget_count[ $sidebar_id ] );
24
-			$widget_classes = 'widget-count-' . count( $sidebar_widget_count[ $sidebar_id ] );
22
+		if ( isset( $sidebar_widget_count[$sidebar_id] ) ) {
23
+			$widget_count   = count( $sidebar_widget_count[$sidebar_id] );
24
+			$widget_classes = 'widget-count-' . count( $sidebar_widget_count[$sidebar_id] );
25 25
 
26 26
 			if ( 0 == $widget_count % 4 || $widget_count > 6 ) {
27 27
 				// Four widgets per row if there are exactly four or more than six
Please login to merge, or discard this patch.
comments.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
 			<?php
30 30
 			$comments_number = get_comments_number();
31
-			if ( 1 === (int) $comments_number ) {
31
+			if ( 1 === ( int ) $comments_number ) {
32 32
 				printf(
33 33
 				/* translators: %s: post title */
34 34
 					esc_html_x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'spurs' ),
Please login to merge, or discard this patch.
woocommerce/myaccount/form-edit-address.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@
 block discarded – undo
35 35
 			<div class="woocommerce-address-fields__field-wrapper">
36 36
 				<?php
37 37
 				foreach ( $address as $key => $field ) {
38
-					if ( isset( $field['country_field'], $address[ $field['country_field'] ] ) ) {
39
-						$field['country'] = wc_get_post_data_by_key( $field['country_field'], $address[ $field['country_field'] ]['value'] );
38
+					if ( isset( $field['country_field'], $address[$field['country_field']] ) ) {
39
+						$field['country'] = wc_get_post_data_by_key( $field['country_field'], $address[$field['country_field']]['value'] );
40 40
 					}
41 41
 					woocommerce_form_field( $key, $field, wc_get_post_data_by_key( $key, $field['value'] ) );
42 42
 				}
Please login to merge, or discard this patch.
inc/bootstrap-wp-navwalker.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 			}
108 108
 			$indent = ( $depth ) ? str_repeat( $t, $depth ) : '';
109 109
 
110
-			$classes = empty( $item->classes ) ? array() : (array) $item->classes;
110
+			$classes = empty( $item->classes ) ? array() : ( array ) $item->classes;
111 111
 
112 112
 			// Initialize some holder variables to store specially handled item
113 113
 			// wrappers and icons.
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 				$title         = self::wrap_for_screen_reader( $title );
271 271
 				$keys_to_unset = array_keys( $linkmod_classes, 'sr-only' );
272 272
 				foreach ( $keys_to_unset as $k ) {
273
-					unset( $linkmod_classes[ $k ] );
273
+					unset( $linkmod_classes[$k] );
274 274
 				}
275 275
 			}
276 276
 
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 			$id_field = $this->db_fields['id'];
325 325
 			// Display this element.
326 326
 			if ( is_object( $args[0] ) ) {
327
-				$args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] ); }
327
+				$args[0]->has_children = ! empty( $children_elements[$element->$id_field] ); }
328 328
 			parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
329 329
 		}
330 330
 
@@ -408,20 +408,20 @@  discard block
 block discarded – undo
408 408
 				if ( preg_match( '/^disabled|^sr-only/i', $class ) ) {
409 409
 					// Test for .disabled or .sr-only classes.
410 410
 					$linkmod_classes[] = $class;
411
-					unset( $classes[ $key ] );
411
+					unset( $classes[$key] );
412 412
 				} elseif ( preg_match( '/^dropdown-header|^dropdown-divider|^dropdown-item-text/i', $class ) && $depth > 0 ) {
413 413
 					// Test for .dropdown-header or .dropdown-divider and a
414 414
 					// depth greater than 0 - IE inside a dropdown.
415 415
 					$linkmod_classes[] = $class;
416
-					unset( $classes[ $key ] );
416
+					unset( $classes[$key] );
417 417
 				} elseif ( preg_match( '/^fa-(\S*)?|^fa(s|r|l|b)?(\s?)?$/i', $class ) ) {
418 418
 					// Font Awesome.
419 419
 					$icon_classes[] = $class;
420
-					unset( $classes[ $key ] );
420
+					unset( $classes[$key] );
421 421
 				} elseif ( preg_match( '/^glyphicon-(\S*)?|^glyphicon(\s?)$/i', $class ) ) {
422 422
 					// Glyphicons.
423 423
 					$icon_classes[] = $class;
424
-					unset( $classes[ $key ] );
424
+					unset( $classes[$key] );
425 425
 				}
426 426
 			}
427 427
 
Please login to merge, or discard this patch.
inc/template-tags.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 			esc_attr( get_the_modified_date( 'c' ) ),
23 23
 			esc_html( get_the_modified_date() )
24 24
 		);
25
-		$posted_on   = apply_filters(
25
+		$posted_on = apply_filters(
26 26
 			'spurs_posted_on', sprintf(
27 27
 				'<span class="posted-on">%1$s <a href="%2$s" rel="bookmark">%3$s</a></span>',
28 28
 				esc_html_x( 'Posted on', 'post date', 'spurs' ),
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 				apply_filters( 'spurs_posted_on_time', $time_string )
31 31
 			)
32 32
 		);
33
-		$byline      = apply_filters(
33
+		$byline = apply_filters(
34 34
 			'spurs_posted_by', sprintf(
35 35
 				'<span class="byline"> %1$s<span class="author vcard"><a class="url fn n" href="%2$s"> %3$s</a></span></span>',
36 36
 				$posted_on ? esc_html_x( 'by', 'post author', 'spurs' ) : esc_html_x( 'Posted by', 'post author', 'spurs' ),
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 	 */
170 170
 	function spurs_content_classes() {
171 171
 		$spurs_sidebar_position = get_theme_mod( 'spurs_sidebar_position' );
172
-		$html             = '';
172
+		$html = '';
173 173
 
174 174
 		if ( is_page_template( 'page-templates/left-sidebar.php' ) && is_active_sidebar( 'sidebar-left' ) ) {
175 175
 			$html .= 'left-sidebar-template col-md-8 content-area';
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 	function spurs_sidebar_classes() {
227 227
 
228 228
 		$spurs_sidebar_position = get_theme_mod( 'spurs_sidebar_position' );
229
-		$html             = '';
229
+		$html = '';
230 230
 
231 231
 		if ( is_page_template( 'page-templates/both-sidebars.php' ) && ( is_active_sidebar( 'sidebar-left' ) ) && is_active_sidebar( 'sidebar-right' ) ) {
232 232
 			$html .= 'col-md-3 widget-area';
Please login to merge, or discard this patch.
inc/custom-comments.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 		$req       = get_option( 'require_name_email' );
28 28
 		$aria_req  = ( $req ? " aria-required='true'" : '' );
29 29
 		$html5     = current_theme_supports( 'html5', 'comment-form' ) ? 1 : 0;
30
-		$consent  = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"';
30
+		$consent = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"';
31 31
 		$fields    = array(
32 32
 			'author' => '<div class="form-group comment-form-author"><label for="author">' . __( 'Name',
33 33
 					'spurs' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
Please login to merge, or discard this patch.
functions.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -10,21 +10,21 @@
 block discarded – undo
10 10
 }
11 11
 
12 12
 $spurs_includes = array(
13
-	'/theme-settings.php',                  // Initialize theme default settings.
14
-	'/theme-wrapper.php',                   // Load theme wrapper.
15
-	'/setup.php',                           // Theme setup and custom theme supports.
16
-	'/widgets.php',                         // Register widget area.
17
-	'/enqueue.php',                         // Enqueue scripts and styles.
18
-	'/template-tags.php',                   // Custom template tags.
19
-	'/pagination.php',                      // Custom pagination.
20
-	'/hooks.php',                           // Custom hooks.
21
-	'/extras.php',                          // Custom functions that act independently of the theme templates.
22
-	'/customizer.php',                      // Customizer additions.
23
-	'/custom-comments.php',                 // Custom comments.
24
-	'/jetpack.php',                         // Jetpack compatibility.
25
-	'/bootstrap-wp-navwalker.php',          // custom WordPress nav walker.
26
-	'/woocommerce.php',                     // WooCommerce functions.
27
-	'/editor.php',                          // Editor functions.
13
+	'/theme-settings.php', // Initialize theme default settings.
14
+	'/theme-wrapper.php', // Load theme wrapper.
15
+	'/setup.php', // Theme setup and custom theme supports.
16
+	'/widgets.php', // Register widget area.
17
+	'/enqueue.php', // Enqueue scripts and styles.
18
+	'/template-tags.php', // Custom template tags.
19
+	'/pagination.php', // Custom pagination.
20
+	'/hooks.php', // Custom hooks.
21
+	'/extras.php', // Custom functions that act independently of the theme templates.
22
+	'/customizer.php', // Customizer additions.
23
+	'/custom-comments.php', // Custom comments.
24
+	'/jetpack.php', // Jetpack compatibility.
25
+	'/bootstrap-wp-navwalker.php', // custom WordPress nav walker.
26
+	'/woocommerce.php', // WooCommerce functions.
27
+	'/editor.php', // Editor functions.
28 28
 );
29 29
 
30 30
 foreach ( $spurs_includes as $file ) {
Please login to merge, or discard this patch.
inc/extras.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
 		foreach ( $classes as $key => $value ) {
52 52
 			if ( 'tag' == $value ) {
53
-				unset( $classes[ $key ] );
53
+				unset( $classes[$key] );
54 54
 			}
55 55
 		}
56 56
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	}
161 161
 
162 162
 	if ( is_array( $img ) ) {
163
-		$url = $size ? $img['sizes'][ $size ] : $img['url'];
163
+		$url = $size ? $img['sizes'][$size] : $img['url'];
164 164
 	} else {
165 165
 		$url = $img;
166 166
 	}
@@ -226,14 +226,14 @@  discard block
 block discarded – undo
226 226
  * @link //gist.github.com/llgruff/a7ab776167aa0ed307ec445df54e5fdb
227 227
  */
228 228
 if ( defined( 'AIOSEOP_VERSION' ) ) {
229
-	add_action( 'get_header', function () {
229
+	add_action( 'get_header', function() {
230 230
 		ob_start(
231
-			function ( $o ) {
231
+			function( $o ) {
232 232
 				return preg_replace( '/\n?<.*?One SEO Pack.*?>/mi', '', $o );
233 233
 			}
234 234
 		);
235 235
 	} );
236
-	add_action( 'wp_head', function () {
236
+	add_action( 'wp_head', function() {
237 237
 		ob_end_flush();
238 238
 	}, 999 );
239 239
 }
@@ -243,14 +243,14 @@  discard block
 block discarded – undo
243 243
  * @link //gist.github.com/paulcollett/4c81c4f6eb85334ba076
244 244
  */
245 245
 if ( defined( 'WPSEO_VERSION' ) ) {
246
-	add_action( 'get_header', function () {
246
+	add_action( 'get_header', function() {
247 247
 		ob_start(
248
-			function ( $o ) {
248
+			function( $o ) {
249 249
 				return preg_replace( '/\n?<.*?yoast.*?>/mi', '', $o );
250 250
 			}
251 251
 		);
252 252
 	} );
253
-	add_action( 'wp_head', function () {
253
+	add_action( 'wp_head', function() {
254 254
 		ob_end_flush();
255 255
 	}, 999 );
256 256
 }
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	$network_active = false;
263 263
 	if ( is_multisite() ) {
264 264
 		$plugins = get_site_option( 'active_sitewide_plugins' );
265
-		if ( isset( $plugins[ $plugin ] ) ) {
265
+		if ( isset( $plugins[$plugin] ) ) {
266 266
 			$network_active = true;
267 267
 		}
268 268
 	}
@@ -271,12 +271,12 @@  discard block
 block discarded – undo
271 271
 }
272 272
 
273 273
 if ( isgabmi_active( 'google-analytics-for-wordpress/googleanalytics.php' ) || isgabmi_active( 'google-analytics-premium/googleanalytics.php' ) ) {
274
-	add_action( 'get_header', function () {
275
-		ob_start( function ( $o ) {
274
+	add_action( 'get_header', function() {
275
+		ob_start( function( $o ) {
276 276
 			return preg_replace( '/\n?<.*?monsterinsights.*?>/mi', '', $o );
277 277
 		} );
278 278
 	} );
279
-	add_action( 'wp_head', function () {
279
+	add_action( 'wp_head', function() {
280 280
 		ob_end_flush();
281 281
 	}, 999 );
282 282
 }
283 283
\ No newline at end of file
Please login to merge, or discard this patch.