Code Duplication    Length = 5-5 lines in 2 locations

mod/event_calendar/models/model.php 1 location

@@ 119-123 (lines=5) @@
116
			} else {
117
				$e->end_time = '';
118
			}
119
			if (is_numeric($e->start_date) && is_numeric($e->start_time)) {
120
				// Set start date to the Unix start time, if set.
121
				// This allows sorting by date *and* time.
122
				$e->start_date += $e->start_time*60;
123
			}
124
		} else {
125
			$e->start_time = 0;
126
			$e->end_time = '';

mod/gc_mobile_api/models/event.php 1 location

@@ 611-615 (lines=5) @@
608
			$end_time_exp = explode(':',$endtime);
609
	 		$end_time =60*$end_time_exp[0]+$end_time_exp[1];
610
 			$e->end_time = $end_time;
611
			if (is_numeric($e->start_date) && is_numeric($e->start_time)) {
612
				// Set start date to the Unix start time, if set.
613
				// This allows sorting by date *and* time.
614
				$e->start_date += $e->start_time*60;
615
			}
616
		 } else {
617
			$e->start_time = '';
618
			$e->end_time = '';