Code Duplication    Length = 17-17 lines in 3 locations

src/wp-includes/class-wp-comment-query.php 1 location

@@ 913-929 (lines=17) @@
910
	 *
911
	 * @global wpdb $wpdb WordPress database abstraction object.
912
	 */
913
	private function set_found_comments() {
914
		global $wpdb;
915
916
		if ( $this->query_vars['number'] && ! $this->query_vars['no_found_rows'] ) {
917
			/**
918
			 * Filters the query used to retrieve found comment count.
919
			 *
920
			 * @since 4.4.0
921
			 *
922
			 * @param string           $found_comments_query SQL query. Default 'SELECT FOUND_ROWS()'.
923
			 * @param WP_Comment_Query $comment_query        The `WP_Comment_Query` instance.
924
			 */
925
			$found_comments_query = apply_filters( 'found_comments_query', 'SELECT FOUND_ROWS()', $this );
926
927
			$this->found_comments = (int) $wpdb->get_var( $found_comments_query );
928
		}
929
	}
930
931
	/**
932
	 * Fetch descendants for located comments.

src/wp-includes/class-wp-network-query.php 1 location

@@ 461-477 (lines=17) @@
458
	 *
459
	 * @global wpdb $wpdb WordPress database abstraction object.
460
	 */
461
	private function set_found_networks() {
462
		global $wpdb;
463
464
		if ( $this->query_vars['number'] && ! $this->query_vars['no_found_rows'] ) {
465
			/**
466
			 * Filters the query used to retrieve found network count.
467
			 *
468
			 * @since 4.6.0
469
			 *
470
			 * @param string           $found_networks_query SQL query. Default 'SELECT FOUND_ROWS()'.
471
			 * @param WP_Network_Query $network_query        The `WP_Network_Query` instance.
472
			 */
473
			$found_networks_query = apply_filters( 'found_networks_query', 'SELECT FOUND_ROWS()', $this );
474
475
			$this->found_networks = (int) $wpdb->get_var( $found_networks_query );
476
		}
477
	}
478
479
	/**
480
	 * Used internally to generate an SQL string for searching across multiple columns.

src/wp-includes/class-wp-site-query.php 1 location

@@ 596-612 (lines=17) @@
593
	 *
594
	 * @global wpdb $wpdb WordPress database abstraction object.
595
	 */
596
	private function set_found_sites() {
597
		global $wpdb;
598
599
		if ( $this->query_vars['number'] && ! $this->query_vars['no_found_rows'] ) {
600
			/**
601
			 * Filters the query used to retrieve found site count.
602
			 *
603
			 * @since 4.6.0
604
			 *
605
			 * @param string        $found_sites_query SQL query. Default 'SELECT FOUND_ROWS()'.
606
			 * @param WP_Site_Query $site_query        The `WP_Site_Query` instance.
607
			 */
608
			$found_sites_query = apply_filters( 'found_sites_query', 'SELECT FOUND_ROWS()', $this );
609
610
			$this->found_sites = (int) $wpdb->get_var( $found_sites_query );
611
		}
612
	}
613
614
	/**
615
	 * Used internally to generate an SQL string for searching across multiple columns.