Code Duplication    Length = 6-7 lines in 3 locations

programs/utilit/entry.class.php 3 locations

@@ 1514-1519 (lines=6) @@
1511
	    
1512
	        /* @var $otherEntry absences_Entry */
1513
	    
1514
	        if ($this->id != $otherEntry->id) {
1515
	            $e = new absences_EntryException(absences_translate('There is allready an absence request in the period'));
1516
	            $e->entry = $this;
1517
	            $e->blocking = true;
1518
	            throw $e;
1519
	        }
1520
	    }
1521
	    
1522
	}
@@ 1546-1552 (lines=7) @@
1543
		$count = $this->checkElementsValidity();
1544
1545
1546
		if (0 === $count)
1547
		{
1548
			$e = new absences_EntryException(absences_translate('At least one vacation right must be used'));
1549
			$e->entry = $this;
1550
			$e->blocking = true;
1551
			throw $e;
1552
		}
1553
1554
1555
@@ 1591-1597 (lines=7) @@
1588
		$duration = (int) round(100 * $this->getDurationDays());
1589
1590
1591
		if (0 === $duration)
1592
		{
1593
			$e = new absences_EntryException(absences_translate('The selected period is not available'));
1594
			$e->entry = $this;
1595
			$e->blocking = true;
1596
			throw $e;
1597
		}
1598
1599
1600