Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 1452-1459 (lines=8) @@
1449
1450
							$slug_count = count( $existing_term_slugs );
1451
1452
							if ( $slug_count > 1 ) {
1453
								$remove_url = Jetpack_Search_Helpers::add_query_arg(
1454
									$tax_query_var,
1455
									rawurlencode( implode( '+', array_diff( $existing_term_slugs, array( $item['key'] ) ) ) )
1456
								);
1457
							} else {
1458
								$remove_url = Jetpack_Search_Helpers::remove_query_arg( $tax_query_var );
1459
							}
1460
						}
1461
1462
						break;
@@ 1490-1497 (lines=8) @@
1487
							$post_type_count = count( $post_types );
1488
1489
							// 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
1490
							if ( $post_type_count > 1 ) {
1491
								$remove_url = Jetpack_Search_Helpers::add_query_arg(
1492
									'post_type',
1493
									rawurlencode( implode( ',', array_diff( $post_types, array( $item['key'] ) ) ) )
1494
								);
1495
							} else {
1496
								$remove_url = Jetpack_Search_Helpers::remove_query_arg( 'post_type' );
1497
							}
1498
						}
1499
1500
						break;