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

@@ 163-167 (lines=5) @@
160
			),
161
			$event_id
162
		);
163
		if( $event_id ){
164
			$query_params[0]['EVT_ID'] =  $event_id;
165
		}else{
166
			$query_params[ 'force_join' ][] = 'Event';
167
		}
168
		$registration_rows = $reg_model->get_all_wpdb_results( $query_params );
169
		//get all questions which relate to someone in this group
170
		$registration_ids = array();
@@ 371-375 (lines=5) @@
368
			),
369
			$event_id
370
		);
371
		if( $event_id ){
372
			$query_params[0]['EVT_ID'] =  $event_id;
373
		} else {
374
			$query_params[ 'force_join' ][] = 'Event';
375
		}
376
		return \EEM_Registration::instance()->count( $query_params );
377
	}
378