Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 1507-1514 (lines=8) @@
1504
1505
							$slug_count = count( $existing_term_slugs );
1506
1507
							if ( $slug_count > 1 ) {
1508
								$remove_url = Jetpack_Search_Helpers::add_query_arg(
1509
									$tax_query_var,
1510
									rawurlencode( implode( '+', array_diff( $existing_term_slugs, array( $item['key'] ) ) ) )
1511
								);
1512
							} else {
1513
								$remove_url = Jetpack_Search_Helpers::remove_query_arg( $tax_query_var );
1514
							}
1515
						}
1516
1517
						break;
@@ 1545-1552 (lines=8) @@
1542
							$post_type_count = count( $post_types );
1543
1544
							// 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
1545
							if ( $post_type_count > 1 ) {
1546
								$remove_url = Jetpack_Search_Helpers::add_query_arg(
1547
									'post_type',
1548
									rawurlencode( implode( ',', array_diff( $post_types, array( $item['key'] ) ) ) )
1549
								);
1550
							} else {
1551
								$remove_url = Jetpack_Search_Helpers::remove_query_arg( 'post_type' );
1552
							}
1553
						}
1554
1555
						break;