Code Duplication    Length = 3-3 lines in 2 locations

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

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

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

@@ 809-811 (lines=3) @@
806
		if ( ! empty( $this->args['fields'] ) && 'all' !== $this->args['fields'] ) {
807
			if ( is_string( $this->args['fields'] ) ) {
808
				$fields = "{$wpdb->posts}.{$this->args['fields']}";
809
			} elseif ( is_array( $this->args['fields'] ) ) {
810
				$fields = "{$wpdb->posts}." . implode( " , {$wpdb->posts}.", $this->args['fields'] );
811
			}
812
		}
813
814
		// Set count.