Code Duplication    Length = 11-11 lines in 2 locations

programs/utilit/entry_period.class.php 2 locations

@@ 304-314 (lines=11) @@
301
	 * if more than one period exists in the morning, the half day duration will be positive only for the first period
302
	 * @return float
303
	 */
304
	public function getMorningDays()
305
	{
306
	    $period = $this->halfDayCache('am');
307
	    
308
	    if ($this->date_begin.'/'.$this->date_end == $period) {
309
	        // this period is the first for the morning, it is accounted
310
	        return 0.5;
311
	    }
312
	    
313
	    return 0;
314
	}
315
	
316
	
317
	/**
@@ 322-332 (lines=11) @@
319
	 * if more than one period exists in the morning, the half day duration will be positive only for the first period
320
	 * @return float
321
	 */
322
	public function getAfternoonDays()
323
	{
324
	    $period = $this->halfDayCache('pm');
325
	     
326
	    if ($this->date_begin.'/'.$this->date_end == $period) {
327
	        // this period is the first for the afternoon, it is accounted
328
	        return 0.5;
329
	    }
330
	     
331
	    return 0;
332
	}
333
	
334
	
335