Code Duplication    Length = 15-15 lines in 2 locations

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

@@ 290-304 (lines=15) @@
287
	 * @global wpdb $wpdb
288
	 * @return string
289
	 */
290
	private function get_where_donor() {
291
		$where = '';
292
293
		// Specific donors.
294
		if ( ! empty( $this->args['donor'] ) ) {
295
			if ( ! is_array( $this->args['donor'] ) ) {
296
				$this->args['donor'] = explode( ',', $this->args['donor'] );
297
			}
298
			$log_ids = implode( ',', array_map( 'intval', $this->args['donor'] ) );
299
300
			$where .= " AND {$this->table_name}.id IN( {$log_ids} ) ";
301
		}
302
303
		return $where;
304
	}
305
306
	/**
307
	 * Set date where clause.
@@ 372-386 (lines=15) @@
369
	 * @global wpdb $wpdb
370
	 * @return string
371
	 */
372
	private function get_where_user() {
373
		$where = '';
374
375
		// Donors create for specific wp user.
376
		if ( ! empty( $this->args['user'] ) ) {
377
			if ( ! is_array( $this->args['user'] ) ) {
378
				$this->args['user'] = explode( ',', $this->args['user'] );
379
			}
380
			$user_ids = implode( ',', array_map( 'intval', $this->args['user'] ) );
381
382
			$where .= " AND {$this->table_name}.user_id IN( {$user_ids} ) ";
383
		}
384
385
		return $where;
386
	}
387
388
	/**
389
	 * Set orderby query