summaryrefslogtreecommitdiff
path: root/includes/view/ShiftCalendarLane.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-02 15:43:36 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-02 15:49:53 +0100
commitd71e7bbfad2f07f82df0c515608996d250fd4182 (patch)
tree5083a17b218c08b3a699a0bf15bec926cc2dd185 /includes/view/ShiftCalendarLane.php
parent7313e15ce8236e19331fb6639a3a5b97c8f06ecd (diff)
Formatting
Diffstat (limited to 'includes/view/ShiftCalendarLane.php')
-rw-r--r--includes/view/ShiftCalendarLane.php62
1 files changed, 31 insertions, 31 deletions
diff --git a/includes/view/ShiftCalendarLane.php b/includes/view/ShiftCalendarLane.php
index af674671..529b6a74 100644
--- a/includes/view/ShiftCalendarLane.php
+++ b/includes/view/ShiftCalendarLane.php
@@ -22,38 +22,38 @@ class ShiftCalendarLane
$this->blockCount = $blockCount;
}
- /**
- * Adds a shift to the lane, but only if it fits.
- * Returns true on success.
- *
- * @param Shift $shift
- * The shift to add
- * @return boolean true on success
- */
- public function addShift($shift)
- {
- if ($this->shiftFits($shift)) {
- $this->shifts[] = $shift;
- return true;
- }
- return false;
- }
+ /**
+ * Adds a shift to the lane, but only if it fits.
+ * Returns true on success.
+ *
+ * @param Shift $shift
+ * The shift to add
+ * @return boolean true on success
+ */
+ public function addShift($shift)
+ {
+ if ($this->shiftFits($shift)) {
+ $this->shifts[] = $shift;
+ return true;
+ }
+ return false;
+ }
- /**
- * Returns true if given shift fits into this lane.
- *
- * @param Shift $shift
- * The shift to fit into this lane
- */
- public function shiftFits($newShift)
- {
- foreach ($this->shifts as $laneShift) {
- if (! ($newShift['start'] >= $laneShift['end'] || $newShift['end'] <= $laneShift['start'])) {
- return false;
- }
- }
- return true;
- }
+ /**
+ * Returns true if given shift fits into this lane.
+ *
+ * @param Shift $shift
+ * The shift to fit into this lane
+ */
+ public function shiftFits($newShift)
+ {
+ foreach ($this->shifts as $laneShift) {
+ if (!($newShift['start'] >= $laneShift['end'] || $newShift['end'] <= $laneShift['start'])) {
+ return false;
+ }
+ }
+ return true;
+ }
public function getHeader()
{