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

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