Code Duplication    Length = 8-8 lines in 2 locations

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

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