Code Duplication    Length = 11-11 lines in 2 locations

programs/utilit/entry.class.php 2 locations

@@ 1188-1198 (lines=11) @@
1185
	 * @param float $days
1186
	 * @return float
1187
	 */
1188
	private function daysToHours($days)
1189
	{
1190
	    $plannedDays = $this->getPlannedDurationDays();
1191
	    
1192
	    if (!$plannedDays) {
1193
	        return 0;
1194
	    }
1195
	    
1196
		$ratio = $this->getPlannedDurationHours() / $plannedDays;
1197
		return round(($ratio * $days), 2);
1198
	}
1199
1200
	/**
1201
	 * Convert a number of hours to days
@@ 1205-1215 (lines=11) @@
1202
	 * @param float $hours
1203
	 * @return float
1204
	 */
1205
	private function hoursToDays($hours)
1206
	{
1207
	    $plannedHours = $this->getPlannedDurationHours();
1208
	    
1209
	    if (!$plannedHours) {
1210
	        return 0;
1211
	    }
1212
	    
1213
		$ratio = $this->getPlannedDurationDays() / $plannedHours;
1214
		return round(($ratio * $hours), 2);
1215
	}
1216
1217
1218