Code Duplication    Length = 4-4 lines in 5 locations

wp-includes/class-wp-site-query.php 5 locations

@@ 460-463 (lines=4) @@
457
			$this->sql_clauses['where']['path__not_in'] = "path NOT IN ( '" . implode( "', '", $this->db->_escape( $this->query_vars['path__not_in'] ) ) . "' )";
458
		}
459
460
		if ( is_numeric( $this->query_vars['archived'] ) ) {
461
			$archived = absint( $this->query_vars['archived'] );
462
			$this->sql_clauses['where']['archived'] = $this->db->prepare( "archived = %d ", $archived );
463
		}
464
465
		if ( is_numeric( $this->query_vars['mature'] ) ) {
466
			$mature = absint( $this->query_vars['mature'] );
@@ 465-468 (lines=4) @@
462
			$this->sql_clauses['where']['archived'] = $this->db->prepare( "archived = %d ", $archived );
463
		}
464
465
		if ( is_numeric( $this->query_vars['mature'] ) ) {
466
			$mature = absint( $this->query_vars['mature'] );
467
			$this->sql_clauses['where']['mature'] = $this->db->prepare( "mature = %d ", $mature );
468
		}
469
470
		if ( is_numeric( $this->query_vars['spam'] ) ) {
471
			$spam = absint( $this->query_vars['spam'] );
@@ 470-473 (lines=4) @@
467
			$this->sql_clauses['where']['mature'] = $this->db->prepare( "mature = %d ", $mature );
468
		}
469
470
		if ( is_numeric( $this->query_vars['spam'] ) ) {
471
			$spam = absint( $this->query_vars['spam'] );
472
			$this->sql_clauses['where']['spam'] = $this->db->prepare( "spam = %d ", $spam );
473
		}
474
475
		if ( is_numeric( $this->query_vars['deleted'] ) ) {
476
			$deleted = absint( $this->query_vars['deleted'] );
@@ 475-478 (lines=4) @@
472
			$this->sql_clauses['where']['spam'] = $this->db->prepare( "spam = %d ", $spam );
473
		}
474
475
		if ( is_numeric( $this->query_vars['deleted'] ) ) {
476
			$deleted = absint( $this->query_vars['deleted'] );
477
			$this->sql_clauses['where']['deleted'] = $this->db->prepare( "deleted = %d ", $deleted );
478
		}
479
480
		if ( is_numeric( $this->query_vars['public'] ) ) {
481
			$public = absint( $this->query_vars['public'] );
@@ 480-483 (lines=4) @@
477
			$this->sql_clauses['where']['deleted'] = $this->db->prepare( "deleted = %d ", $deleted );
478
		}
479
480
		if ( is_numeric( $this->query_vars['public'] ) ) {
481
			$public = absint( $this->query_vars['public'] );
482
			$this->sql_clauses['where']['public'] = $this->db->prepare( "public = %d ", $public );
483
		}
484
485
		// Falsey search strings are ignored.
486
		if ( strlen( $this->query_vars['search'] ) ) {