Code Duplication    Length = 17-17 lines in 2 locations

programs/utilit/entry.class.php 2 locations

@@ 1290-1306 (lines=17) @@
1287
	 *
1288
	 * @return float
1289
	 */
1290
	public function getTotalDays($id_type = null)
1291
	{
1292
		if (!isset($this->total_days)) {
1293
			$this->loadedElementsTotal();
1294
		}
1295
1296
		if (isset($id_type)) {
1297
1298
		    if (!isset($this->total_type_days[$id_type])) {
1299
		        return 0.0;
1300
		    }
1301
1302
		    return $this->total_type_days[$id_type];
1303
		}
1304
1305
		return $this->total_days;
1306
	}
1307
1308
	/**
1309
	 * Get sum of elements quantity, converted in hours
@@ 1315-1331 (lines=17) @@
1312
	 *
1313
	 * @return float
1314
	 */
1315
	public function getTotalHours($id_type = null)
1316
	{
1317
		if (!isset($this->total_hours)) {
1318
			$this->loadedElementsTotal();
1319
		}
1320
1321
		if (isset($id_type)) {
1322
1323
		    if (!isset($this->total_type_hours[$id_type])) {
1324
		        return 0.0;
1325
		    }
1326
1327
		    return $this->total_type_hours[$id_type];
1328
		}
1329
1330
		return $this->total_hours;
1331
	}
1332
1333
1334