Code Duplication    Length = 5-5 lines in 3 locations

core/db_classes/EE_Export.class.php 1 location

@@ 353-357 (lines=5) @@
350
			),
351
			$event_id
352
		);
353
		if( $event_id ){
354
			$query_params[0]['EVT_ID'] =  $event_id;
355
		}else{
356
			$query_params[ 'force_join' ][] = 'Event';
357
		}
358
		$registration_rows = $reg_model->get_all_wpdb_results( $query_params );
359
		//get all questions which relate to someone in this group
360
		$registration_ids = array();

core/libraries/batch/JobHandlers/RegistrationsReport.php 2 locations

@@ 195-199 (lines=5) @@
192
			),
193
			$event_id
194
		);
195
		if( $event_id ){
196
			$query_params[0]['EVT_ID'] =  $event_id;
197
		}else{
198
			$query_params[ 'force_join' ][] = 'Event';
199
		}
200
		$registration_rows = $reg_model->get_all_wpdb_results( $query_params );
201
		//get all questions which relate to someone in this group
202
		$registration_ids = array();
@@ 398-402 (lines=5) @@
395
			),
396
			$event_id
397
		);
398
		if( $event_id ){
399
			$query_params[0]['EVT_ID'] =  $event_id;
400
		} else {
401
			$query_params[ 'force_join' ][] = 'Event';
402
		}
403
		return \EEM_Registration::instance()->count( $query_params );
404
	}
405