summaryrefslogtreecommitdiff
path: root/includes/view/ShiftCalendarLane.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-08-29 23:06:46 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-08-29 23:16:41 +0200
commitd0074cf0069322fe175fb385b91c974fc2771547 (patch)
tree713fcb1f426c8a693938e3c8bbfc685e57f79e69 /includes/view/ShiftCalendarLane.php
parent50da458d8907cc7c05938565faa80b271bbf9b3d (diff)
parent581b81f1b25dc6b6f0a3b34810c293738fd40217 (diff)
Merge remote-tracking branch 'engelsystem/feature-igel-rewrite'
# Conflicts: # includes/controller/angeltypes_controller.php # includes/pages/admin_groups.php # includes/pages/user_settings.php # includes/sys_page.php # src/Exceptions/Handler.php # src/Http/Request.php
Diffstat (limited to 'includes/view/ShiftCalendarLane.php')
-rw-r--r--includes/view/ShiftCalendarLane.php8
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.');
}
/**