Code Duplication    Length = 7-8 lines in 4 locations

src/wp-includes/class-wp-query.php 4 locations

@@ 1231-1237 (lines=7) @@
1228
			);
1229
		}
1230
1231
		if ( !empty($q['tag__in']) ) {
1232
			$q['tag__in'] = array_map('absint', array_unique( (array) $q['tag__in'] ) );
1233
			$tax_query[] = array(
1234
				'taxonomy' => 'post_tag',
1235
				'terms' => $q['tag__in']
1236
			);
1237
		}
1238
1239
		if ( !empty($q['tag__not_in']) ) {
1240
			$q['tag__not_in'] = array_map('absint', array_unique( (array) $q['tag__not_in'] ) );
@@ 1239-1246 (lines=8) @@
1236
			);
1237
		}
1238
1239
		if ( !empty($q['tag__not_in']) ) {
1240
			$q['tag__not_in'] = array_map('absint', array_unique( (array) $q['tag__not_in'] ) );
1241
			$tax_query[] = array(
1242
				'taxonomy' => 'post_tag',
1243
				'terms' => $q['tag__not_in'],
1244
				'operator' => 'NOT IN'
1245
			);
1246
		}
1247
1248
		if ( !empty($q['tag__and']) ) {
1249
			$q['tag__and'] = array_map('absint', array_unique( (array) $q['tag__and'] ) );
@@ 1248-1255 (lines=8) @@
1245
			);
1246
		}
1247
1248
		if ( !empty($q['tag__and']) ) {
1249
			$q['tag__and'] = array_map('absint', array_unique( (array) $q['tag__and'] ) );
1250
			$tax_query[] = array(
1251
				'taxonomy' => 'post_tag',
1252
				'terms' => $q['tag__and'],
1253
				'operator' => 'AND'
1254
			);
1255
		}
1256
1257
		if ( !empty($q['tag_slug__in']) ) {
1258
			$q['tag_slug__in'] = array_map('sanitize_title_for_query', array_unique( (array) $q['tag_slug__in'] ) );
@@ 1257-1264 (lines=8) @@
1254
			);
1255
		}
1256
1257
		if ( !empty($q['tag_slug__in']) ) {
1258
			$q['tag_slug__in'] = array_map('sanitize_title_for_query', array_unique( (array) $q['tag_slug__in'] ) );
1259
			$tax_query[] = array(
1260
				'taxonomy' => 'post_tag',
1261
				'terms' => $q['tag_slug__in'],
1262
				'field' => 'slug'
1263
			);
1264
		}
1265
1266
		if ( !empty($q['tag_slug__and']) ) {
1267
			$q['tag_slug__and'] = array_map('sanitize_title_for_query', array_unique( (array) $q['tag_slug__and'] ) );