summaryrefslogtreecommitdiff
path: root/includes/view/ShiftCalendarLane.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-03 03:22:48 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-03 03:22:48 +0100
commit356b2582f3e6a43ecf2607acad4a7fe0b37f659a (patch)
treee02c9214b23a0b9ec33aa725db962d565bd30a82 /includes/view/ShiftCalendarLane.php
parentd71e7bbfad2f07f82df0c515608996d250fd4182 (diff)
PPHDoc, formatting, fixes, cleanup
Diffstat (limited to 'includes/view/ShiftCalendarLane.php')
-rw-r--r--includes/view/ShiftCalendarLane.php25
1 files changed, 21 insertions, 4 deletions
diff --git a/includes/view/ShiftCalendarLane.php b/includes/view/ShiftCalendarLane.php
index 529b6a74..774683bd 100644
--- a/includes/view/ShiftCalendarLane.php
+++ b/includes/view/ShiftCalendarLane.php
@@ -7,14 +7,25 @@ namespace Engelsystem;
*/
class ShiftCalendarLane
{
+ /** @var int */
private $firstBlockStartTime;
+ /** @var int */
private $blockCount;
+ /** @var string */
private $header;
+ /** @var array[] */
private $shifts = [];
+ /**
+ * ShiftCalendarLane constructor.
+ *
+ * @param string $header
+ * @param int $firstBlockStartTime Unix timestamp
+ * @param int $blockCount
+ */
public function __construct($header, $firstBlockStartTime, $blockCount)
{
$this->header = $header;
@@ -26,8 +37,7 @@ class ShiftCalendarLane
* Adds a shift to the lane, but only if it fits.
* Returns true on success.
*
- * @param Shift $shift
- * The shift to add
+ * @param array $shift The shift to add
* @return boolean true on success
*/
public function addShift($shift)
@@ -42,8 +52,9 @@ class ShiftCalendarLane
/**
* Returns true if given shift fits into this lane.
*
- * @param Shift $shift
- * The shift to fit into this lane
+ * @param array $newShift
+ * @return bool
+ * @internal param array $shift The shift to fit into this lane
*/
public function shiftFits($newShift)
{
@@ -55,11 +66,17 @@ class ShiftCalendarLane
return true;
}
+ /**
+ * @return string
+ */
public function getHeader()
{
return $this->header;
}
+ /**
+ * @return array[]
+ */
public function getShifts()
{
return $this->shifts;