Code Duplication    Length = 6-7 lines in 3 locations

programs/utilit/entry.class.php 3 locations

@@ 1866-1871 (lines=6) @@
1863
	    
1864
	        /* @var $otherEntry absences_Entry */
1865
	    
1866
	        if ($this->id != $otherEntry->id) {
1867
	            $e = new absences_EntryException(absences_translate('There is allready an absence request in the period'));
1868
	            $e->entry = $this;
1869
	            $e->blocking = true;
1870
	            throw $e;
1871
	        }
1872
	    }
1873
	    
1874
	}
@@ 1898-1904 (lines=7) @@
1895
		$count = $this->checkElementsValidity();
1896
1897
1898
		if (0 === $count)
1899
		{
1900
			$e = new absences_EntryException(absences_translate('At least one vacation right must be used'));
1901
			$e->entry = $this;
1902
			$e->blocking = true;
1903
			throw $e;
1904
		}
1905
1906
1907
@@ 1943-1949 (lines=7) @@
1940
		$duration = (int) round(100 * $this->getDurationDays());
1941
1942
1943
		if (0 === $duration)
1944
		{
1945
			$e = new absences_EntryException(absences_translate('The selected period is not available'));
1946
			$e->entry = $this;
1947
			$e->blocking = true;
1948
			throw $e;
1949
		}
1950
1951
1952