Code Duplication    Length = 3-3 lines in 2 locations

includes/donors/class-give-donors-query.php 1 location

@@ 208-210 (lines=3) @@
205
		if ( ! empty( $this->args['fields'] ) && 'all' !== $this->args['fields'] ) {
206
			if ( is_string( $this->args['fields'] ) ) {
207
				$fields = "{$this->table_name}.{$this->args['fields']}";
208
			} elseif ( is_array( $this->args['fields'] ) ) {
209
				$fields = "{$this->table_name}." . implode( " , {$this->table_name}.", $this->args['fields'] );
210
			}
211
		}
212
213
		// Set count.

includes/payments/class-payments-query.php 1 location

@@ 802-804 (lines=3) @@
799
		if ( ! empty( $this->args['fields'] ) && 'all' !== $this->args['fields'] ) {
800
			if ( is_string( $this->args['fields'] ) ) {
801
				$fields = "{$wpdb->posts}.{$this->args['fields']}";
802
			} elseif ( is_array( $this->args['fields'] ) ) {
803
				$fields = "{$wpdb->posts}." . implode( " , {$wpdb->posts}.", $this->args['fields'] );
804
			}
805
		}
806
807
		// Set count.