Passed
Push — master ( e4a90e...37e24c )
by Paul
02:35
created
src/Taxonomy.php 1 patch
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,10 +46,14 @@  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
 		$vars = &$query->query_vars;
51 53
 		foreach( array_keys( $this->taxonomies ) as $taxonomy ) {
52
-			if( !is_numeric( $vars[$taxonomy] ))continue;
54
+			if( !is_numeric( $vars[$taxonomy] )) {
55
+				continue;
56
+			}
53 57
 			$vars[$taxonomy] = get_term_by( 'id', $vars[$taxonomy], $taxonomy )->slug;
54 58
 		}
55 59
 		return $query;
@@ -62,7 +66,9 @@  discard block
 block discarded – undo
62 66
 	{
63 67
 		global $wp_query;
64 68
 		foreach( $this->taxonomies as $taxonomy => $args ) {
65
-			if( !in_array( get_current_screen()->post_type, $args['post_types'] ))continue;
69
+			if( !in_array( get_current_screen()->post_type, $args['post_types'] )) {
70
+				continue;
71
+			}
66 72
 			$selected = isset( $wp_query->query[$taxonomy] )
67 73
 				? $wp_query->query[$taxonomy]
68 74
 				: false;
@@ -82,7 +88,8 @@  discard block
 block discarded – undo
82 88
 	 */
83 89
 	public function register()
84 90
 	{
85
-		array_walk( $this->taxonomies, function( $args, $taxonomy ) {
91
+		array_walk( $this->taxonomies, function( $args, $taxonomy )
92
+		{
86 93
 			register_taxonomy( $taxonomy, $args['post_types'], array_diff_key( $args, array_flip( self::CUSTOM_KEYS )));
87 94
 			foreach( $args['post_types'] as $type ) {
88 95
 				register_taxonomy_for_object_type( $taxonomy, $type );
Please login to merge, or discard this patch.