Code Duplication    Length = 5-5 lines in 2 locations

modules/search/class.jetpack-search.php 2 locations

@@ 1108-1112 (lines=5) @@
1105
1106
							$slug_count = count( $existing_term_slugs );
1107
1108
							if ( $slug_count > 1 ) {
1109
								$remove_url = add_query_arg( $tax_query_var, urlencode( implode( '+', array_diff( $existing_term_slugs, array( $item['key'] ) ) ) ) );
1110
							} else {
1111
								$remove_url = remove_query_arg( $tax_query_var );
1112
							}
1113
						}
1114
1115
						break;
@@ 1143-1147 (lines=5) @@
1140
							$post_type_count = count( $post_types );
1141
1142
							// For the right 'remove filter' url, we need to remove the post type from the array, or remove the param entirely if it's the only one
1143
							if ( $post_type_count > 1 ) {
1144
								$remove_url = add_query_arg( 'post_type', urlencode_deep( array_diff( $post_types, array( $item['key'] ) ) ) );
1145
							} else {
1146
								$remove_url = remove_query_arg( 'post_type' );
1147
							}
1148
						}
1149
1150
						break;