Passed
Push — master ( 5f0760...eb71ac )
by Paul
02:39
created
src/Taxonomy.php 1 patch
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,13 +46,18 @@  discard block
 block discarded – undo
46 46
 	 */
47 47
 	public function filterBy( WP_Query $query )
48 48
 	{
49
-		if( !is_admin() || get_current_screen()->base != 'edit' )return;
49
+		if( !is_admin() || get_current_screen()->base != 'edit' ) {
50
+			return;
51
+		}
50 52
 
51 53
 		$vars = &$query->query_vars;
52 54
 		$taxonomies = array_keys( $this->taxonomies );
53 55
 
54
-		array_walk( $taxonomies, function( $taxonomy ) use( &$vars ) {
55
-			if( !isset( $vars[$taxonomy] ))return;
56
+		array_walk( $taxonomies, function( $taxonomy ) use( &$vars )
57
+		{
58
+			if( !isset( $vars[$taxonomy] )) {
59
+				return;
60
+			}
56 61
 			if( $term = get_term_by( 'id', $vars[$taxonomy], $taxonomy )) {
57 62
 				$vars[$taxonomy] = $term->slug;
58 63
 			}
@@ -67,7 +72,9 @@  discard block
 block discarded – undo
67 72
 	{
68 73
 		global $wp_query;
69 74
 		foreach( $this->taxonomies as $taxonomy => $args ) {
70
-			if( !in_array( get_current_screen()->post_type, $args['post_types'] ))continue;
75
+			if( !in_array( get_current_screen()->post_type, $args['post_types'] )) {
76
+				continue;
77
+			}
71 78
 			$selected = isset( $wp_query->query[$taxonomy] )
72 79
 				? $wp_query->query[$taxonomy]
73 80
 				: false;
@@ -87,7 +94,8 @@  discard block
 block discarded – undo
87 94
 	 */
88 95
 	public function register()
89 96
 	{
90
-		array_walk( $this->taxonomies, function( $args, $taxonomy ) {
97
+		array_walk( $this->taxonomies, function( $args, $taxonomy )
98
+		{
91 99
 			register_taxonomy( $taxonomy, $args['post_types'], array_diff_key( $args, array_flip( self::CUSTOM_KEYS )));
92 100
 			foreach( $args['post_types'] as $type ) {
93 101
 				register_taxonomy_for_object_type( $taxonomy, $type );
Please login to merge, or discard this patch.