diff options
Diffstat (limited to 'includes/view/ShiftCalendarLane.php')
-rw-r--r-- | includes/view/ShiftCalendarLane.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/includes/view/ShiftCalendarLane.php b/includes/view/ShiftCalendarLane.php index 774683bd..fd4c6f06 100644 --- a/includes/view/ShiftCalendarLane.php +++ b/includes/view/ShiftCalendarLane.php @@ -2,6 +2,8 @@ namespace Engelsystem; +use Exception; + /** * Represents a single lane in a shifts calendar. */ @@ -38,15 +40,15 @@ class ShiftCalendarLane * Returns true on success. * * @param array $shift The shift to add - * @return boolean true on success + * @throws Exception if the shift doesn't fit into the lane. */ public function addShift($shift) { if ($this->shiftFits($shift)) { $this->shifts[] = $shift; - return true; + return; } - return false; + throw new Exception('Unable to add shift to shift calendar lane.'); } /** |