Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 1077-1081 (lines=5) @@
1074
1075
							$slug_count = count( $existing_term_slugs );
1076
1077
							if ( $slug_count > 1 ) {
1078
								$remove_url = add_query_arg( $tax_query_var, urlencode( implode( '+', array_diff( $existing_term_slugs, array( $item['key'] ) ) ) ) );
1079
							} else {
1080
								$remove_url = remove_query_arg( $tax_query_var );
1081
							}
1082
						}
1083
1084
						break;
@@ 1112-1116 (lines=5) @@
1109
							$post_type_count = count( $post_types );
1110
1111
							// 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
1112
							if ( $post_type_count > 1 ) {
1113
								$remove_url = add_query_arg( 'post_type', urlencode_deep( array_diff( $post_types, array( $item['key'] ) ) ) );
1114
							} else {
1115
								$remove_url = remove_query_arg( 'post_type' );
1116
							}
1117
						}
1118
1119
						break;