Code Duplication    Length = 6-6 lines in 2 locations

core/db_models/EEM_Event.model.php 2 locations

@@ 473-478 (lines=6) @@
470
	 * @return array 	EE_Event objects
471
	 */
472
	public function get_active_events( $query_params, $count = FALSE ) {
473
		if ( array_key_exists( 0, $query_params ) ) {
474
			$where_params = $query_params[0];
475
			unset( $query_params[0] );
476
		} else {
477
			$where_params = array();
478
		}
479
480
		//if we have count make sure we don't include group by
481
		if ( $count && isset( $query_params['group_by'] ) ) {
@@ 517-522 (lines=6) @@
514
	 * @return array               EE_Event objects
515
	 */
516
	public function get_upcoming_events( $query_params, $count = FALSE ) {
517
		if ( array_key_exists( 0, $query_params ) ) {
518
			$where_params = $query_params[0];
519
			unset( $query_params[0] );
520
		} else {
521
			$where_params = array();
522
		}
523
524
		//if we have count make sure we don't include group by
525
		if ( $count && isset( $query_params['group_by'] ) ) {