Code Duplication    Length = 3-3 lines in 2 locations

core/db_classes/EE_Export.class.php 1 location

@@ 431-433 (lines=3) @@
428
				if( $reg_row[ 'Ticket.TKT_ID'] ) {
429
					$ticket_name = $this->_prepare_value_from_db_for_display( $ticket_model, 'TKT_name', $reg_row[ 'Ticket.TKT_name' ] );
430
					$datetimes_strings = array();
431
					foreach( EEM_Datetime::instance()->get_all_wpdb_results( array( array( 'Ticket.TKT_ID' => $reg_row[ 'Ticket.TKT_ID' ] ), 'order_by' => array( 'DTT_EVT_start' => 'ASC' ), 'default_where_conditions' => 'none' ) ) as $datetime){
432
						$datetimes_strings[] = $this->_prepare_value_from_db_for_display( EEM_Datetime::instance(), 'DTT_EVT_start', $datetime[ 'Datetime.DTT_EVT_start'] );
433
					}
434
435
				} else {
436
					$ticket_name = __( 'Unknown', 'event_espresso' );

core/libraries/batch/JobHandlers/RegistrationsReport.php 1 location

@@ 277-279 (lines=3) @@
274
				if( $reg_row[ 'Ticket.TKT_ID'] ) {
275
					$ticket_name = \EEH_Export::prepare_value_from_db_for_display( $ticket_model, 'TKT_name', $reg_row[ 'Ticket.TKT_name' ] );
276
					$datetimes_strings = array();
277
					foreach( \EEM_Datetime::instance()->get_all_wpdb_results( array( array( 'Ticket.TKT_ID' => $reg_row[ 'Ticket.TKT_ID' ] ), 'order_by' => array( 'DTT_EVT_start' => 'ASC' ), 'default_where_conditions' => 'none' ) ) as $datetime){
278
						$datetimes_strings[] = \EEH_Export::prepare_value_from_db_for_display( \EEM_Datetime::instance(), 'DTT_EVT_start', $datetime[ 'Datetime.DTT_EVT_start'] );
279
					}
280
281
				} else {
282
					$ticket_name = __( 'Unknown', 'event_espresso' );