Code Duplication    Length = 16-16 lines in 2 locations

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

@@ 506-521 (lines=16) @@
503
	 * @global wpdb $wpdb
504
	 * @return string
505
	 */
506
	private function get_where_donation_count() {
507
		$where = '';
508
509
		if ( ! empty( $this->args['donation_count'] ) ) {
510
			$compare = '>';
511
			$amount  = $this->args['donation_count'];
512
			if ( is_array( $this->args['donation_count'] ) ) {
513
				$compare = $this->args['donation_count'] ['compare'];
514
				$amount = $this->args['donation_count']['amount'];
515
			}
516
517
			$where .= "AND {$this->table_name}.purchase_count{$compare}{$amount}";
518
		}
519
520
		return $where;
521
	}
522
523
	/**
524
	 * Set purchase value where clause.
@@ 533-548 (lines=16) @@
530
	 * @global wpdb $wpdb
531
	 * @return string
532
	 */
533
	private function get_where_donation_amount() {
534
		$where = '';
535
536
		if ( ! empty( $this->args['donation_amount'] ) ) {
537
			$compare = '>';
538
			$amount  = $this->args['donation_amount'];
539
			if ( is_array( $this->args['donation_amount'] ) ) {
540
				$compare = $this->args['donation_amount'] ['compare'];
541
				$amount = $this->args['donation_amount']['amount'];
542
			}
543
544
			$where .= "AND {$this->table_name}.purchase_value{$compare}{$amount}";
545
		}
546
547
		return $where;
548
	}
549
550
	/**
551
	 * Set give_forms where clause.