Code Duplication    Length = 6-7 lines in 3 locations

programs/utilit/entry.class.php 3 locations

@@ 1526-1531 (lines=6) @@
1523
	    
1524
	        /* @var $otherEntry absences_Entry */
1525
	    
1526
	        if ($this->id != $otherEntry->id) {
1527
	            $e = new absences_EntryException(absences_translate('There is allready an absence request in the period'));
1528
	            $e->entry = $this;
1529
	            $e->blocking = true;
1530
	            throw $e;
1531
	        }
1532
	    }
1533
	    
1534
	}
@@ 1558-1564 (lines=7) @@
1555
		$count = $this->checkElementsValidity();
1556
1557
1558
		if (0 === $count)
1559
		{
1560
			$e = new absences_EntryException(absences_translate('At least one vacation right must be used'));
1561
			$e->entry = $this;
1562
			$e->blocking = true;
1563
			throw $e;
1564
		}
1565
1566
1567
@@ 1603-1609 (lines=7) @@
1600
		$duration = (int) round(100 * $this->getDurationDays());
1601
1602
1603
		if (0 === $duration)
1604
		{
1605
			$e = new absences_EntryException(absences_translate('The selected period is not available'));
1606
			$e->entry = $this;
1607
			$e->blocking = true;
1608
			throw $e;
1609
		}
1610
1611
1612