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

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