Code Duplication    Length = 17-17 lines in 2 locations

programs/utilit/entry.class.php 2 locations

@@ 1275-1291 (lines=17) @@
1272
	 *
1273
	 * @return float
1274
	 */
1275
	public function getTotalDays($id_type = null)
1276
	{
1277
		if (!isset($this->total_days)) {
1278
			$this->loadedElementsTotal();
1279
		}
1280
1281
		if (isset($id_type)) {
1282
1283
		    if (!isset($this->total_type_days[$id_type])) {
1284
		        return 0.0;
1285
		    }
1286
1287
		    return $this->total_type_days[$id_type];
1288
		}
1289
1290
		return $this->total_days;
1291
	}
1292
1293
	/**
1294
	 * Get sum of elements quantity, converted in hours
@@ 1300-1316 (lines=17) @@
1297
	 *
1298
	 * @return float
1299
	 */
1300
	public function getTotalHours($id_type = null)
1301
	{
1302
		if (!isset($this->total_hours)) {
1303
			$this->loadedElementsTotal();
1304
		}
1305
1306
		if (isset($id_type)) {
1307
1308
		    if (!isset($this->total_type_hours[$id_type])) {
1309
		        return 0.0;
1310
		    }
1311
1312
		    return $this->total_type_hours[$id_type];
1313
		}
1314
1315
		return $this->total_hours;
1316
	}
1317
1318
1319