Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 1488-1495 (lines=8) @@
1485
1486
							$slug_count = count( $existing_term_slugs );
1487
1488
							if ( $slug_count > 1 ) {
1489
								$remove_url = Jetpack_Search_Helpers::add_query_arg(
1490
									$tax_query_var,
1491
									rawurlencode( implode( '+', array_diff( $existing_term_slugs, array( $item['key'] ) ) ) )
1492
								);
1493
							} else {
1494
								$remove_url = Jetpack_Search_Helpers::remove_query_arg( $tax_query_var );
1495
							}
1496
						}
1497
1498
						break;
@@ 1526-1533 (lines=8) @@
1523
							$post_type_count = count( $post_types );
1524
1525
							// 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
1526
							if ( $post_type_count > 1 ) {
1527
								$remove_url = Jetpack_Search_Helpers::add_query_arg(
1528
									'post_type',
1529
									rawurlencode( implode( ',', array_diff( $post_types, array( $item['key'] ) ) ) )
1530
								);
1531
							} else {
1532
								$remove_url = Jetpack_Search_Helpers::remove_query_arg( 'post_type' );
1533
							}
1534
						}
1535
1536
						break;