Code Duplication    Length = 9-14 lines in 3 locations

wp-includes/class-wp-meta-query.php 1 location

@@ 389-402 (lines=14) @@
386
	 *     @type string $where SQL fragment to append to the main WHERE clause.
387
	 * }
388
	 */
389
	protected function get_sql_clauses() {
390
		/*
391
		 * $queries are passed by reference to get_sql_for_query() for recursion.
392
		 * To keep $this->queries unaltered, pass a copy.
393
		 */
394
		$queries = $this->queries;
395
		$sql = $this->get_sql_for_query( $queries );
396
397
		if ( ! empty( $sql['where'] ) ) {
398
			$sql['where'] = ' AND ' . $sql['where'];
399
		}
400
401
		return $sql;
402
	}
403
404
	/**
405
	 * Generate SQL clauses for a single query array.

wp-includes/class-wp-tax-query.php 1 location

@@ 293-306 (lines=14) @@
290
	 *     @type string $where SQL fragment to append to the main WHERE clause.
291
	 * }
292
	 */
293
	protected function get_sql_clauses() {
294
		/*
295
		 * $queries are passed by reference to get_sql_for_query() for recursion.
296
		 * To keep $this->queries unaltered, pass a copy.
297
		 */
298
		$queries = $this->queries;
299
		$sql = $this->get_sql_for_query( $queries );
300
301
		if ( ! empty( $sql['where'] ) ) {
302
			$sql['where'] = ' AND ' . $sql['where'];
303
		}
304
305
		return $sql;
306
	}
307
308
	/**
309
	 * Generate SQL clauses for a single query array.

wp-includes/date.php 1 location

@@ 594-602 (lines=9) @@
591
	 *     @type string $where SQL fragment to append to the main WHERE clause.
592
	 * }
593
	 */
594
	protected function get_sql_clauses() {
595
		$sql = $this->get_sql_for_query( $this->queries );
596
597
		if ( ! empty( $sql['where'] ) ) {
598
			$sql['where'] = ' AND ' . $sql['where'];
599
		}
600
601
		return $sql;
602
	}
603
604
	/**
605
	 * Generate SQL clauses for a single query array.