Code Duplication    Length = 17-17 lines in 2 locations

programs/utilit/entry.class.php 2 locations

@@ 1630-1646 (lines=17) @@
1627
	 *
1628
	 * @return float
1629
	 */
1630
	public function getTotalDays($id_type = null)
1631
	{
1632
		if (!isset($this->total_days)) {
1633
			$this->loadedElementsTotal();
1634
		}
1635
1636
		if (isset($id_type)) {
1637
1638
		    if (!isset($this->total_type_days[$id_type])) {
1639
		        return 0.0;
1640
		    }
1641
1642
		    return $this->total_type_days[$id_type];
1643
		}
1644
1645
		return $this->total_days;
1646
	}
1647
1648
	/**
1649
	 * Get sum of elements quantity, converted in hours
@@ 1655-1671 (lines=17) @@
1652
	 *
1653
	 * @return float
1654
	 */
1655
	public function getTotalHours($id_type = null)
1656
	{
1657
		if (!isset($this->total_hours)) {
1658
			$this->loadedElementsTotal();
1659
		}
1660
1661
		if (isset($id_type)) {
1662
1663
		    if (!isset($this->total_type_hours[$id_type])) {
1664
		        return 0.0;
1665
		    }
1666
1667
		    return $this->total_type_hours[$id_type];
1668
		}
1669
1670
		return $this->total_hours;
1671
	}
1672
1673
1674