Code Duplication    Length = 15-15 lines in 2 locations

includes/donors/class-give-donors-query.php 2 locations

@@ 313-327 (lines=15) @@
310
	 * @global wpdb $wpdb
311
	 * @return string
312
	 */
313
	private function get_where_donor() {
314
		$where = '';
315
316
		// Specific donors.
317
		if ( ! empty( $this->args['donor'] ) ) {
318
			if ( ! is_array( $this->args['donor'] ) ) {
319
				$this->args['donor'] = explode( ',', $this->args['donor'] );
320
			}
321
			$log_ids = implode( ',', array_map( 'intval', $this->args['donor'] ) );
322
323
			$where .= " AND {$this->table_name}.id IN( {$log_ids} ) ";
324
		}
325
326
		return $where;
327
	}
328
329
	/**
330
	 * Set date where clause.
@@ 395-409 (lines=15) @@
392
	 * @global wpdb $wpdb
393
	 * @return string
394
	 */
395
	private function get_where_user() {
396
		$where = '';
397
398
		// Donors create for specific wp user.
399
		if ( ! empty( $this->args['user'] ) ) {
400
			if ( ! is_array( $this->args['user'] ) ) {
401
				$this->args['user'] = explode( ',', $this->args['user'] );
402
			}
403
			$user_ids = implode( ',', array_map( 'intval', $this->args['user'] ) );
404
405
			$where .= " AND {$this->table_name}.user_id IN( {$user_ids} ) ";
406
		}
407
408
		return $where;
409
	}
410
411
	/**
412
	 * Set orderby query