Code Duplication    Length = 5-5 lines in 3 locations

core/db_classes/EE_Export.class.php 1 location

@@ 347-351 (lines=5) @@
344
			),
345
			$event_id
346
		);
347
		if( $event_id ){
348
			$query_params[0]['EVT_ID'] =  $event_id;
349
		}else{
350
			$query_params[ 'force_join' ][] = 'Event';
351
		}
352
		$registration_rows = $reg_model->get_all_wpdb_results( $query_params );
353
		//get all questions which relate to someone in this group
354
		$registration_ids = array();

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

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