Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 234-236 (lines=3) @@
231
		if ( ! empty( $this->args['fields'] ) && 'all' !== $this->args['fields'] ) {
232
			if ( is_string( $this->args['fields'] ) ) {
233
				$fields = "{$this->table_name}.{$this->args['fields']}";
234
			} elseif ( is_array( $this->args['fields'] ) ) {
235
				$fields = "{$this->table_name}." . implode( " , {$this->table_name}.", $this->args['fields'] );
236
			}
237
		}
238
239
		// Set count.

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

@@ 839-841 (lines=3) @@
836
		if ( ! empty( $this->args['fields'] ) && 'all' !== $this->args['fields'] ) {
837
			if ( is_string( $this->args['fields'] ) ) {
838
				$fields = "{$wpdb->posts}.{$this->args['fields']}";
839
			} elseif ( is_array( $this->args['fields'] ) ) {
840
				$fields = "{$wpdb->posts}." . implode( " , {$wpdb->posts}.", $this->args['fields'] );
841
			}
842
		}
843
844
		// Set count.