From 356b2582f3e6a43ecf2607acad4a7fe0b37f659a Mon Sep 17 00:00:00 2001 From: Bot Date: Tue, 3 Jan 2017 03:22:48 +0100 Subject: PPHDoc, formatting, fixes, cleanup --- includes/model/ShiftSignupState.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'includes/model/ShiftSignupState.php') diff --git a/includes/model/ShiftSignupState.php b/includes/model/ShiftSignupState.php index d5c7f457..9b3de496 100644 --- a/includes/model/ShiftSignupState.php +++ b/includes/model/ShiftSignupState.php @@ -8,7 +8,6 @@ namespace Engelsystem; */ class ShiftSignupState { - /** * Shift has free places */ @@ -44,10 +43,18 @@ class ShiftSignupState */ const SIGNED_UP = 'SIGNED_UP'; + /** @var string */ private $state; + /** @var int */ private $freeEntries; + /** + * ShiftSignupState constructor. + * + * @param string $state + * @param int $free_entries + */ public function __construct($state, $free_entries) { $this->state = $state; @@ -69,6 +76,10 @@ class ShiftSignupState } } + /** + * @param string $state + * @return int + */ private function valueForState($state) { switch ($state) { @@ -88,11 +99,15 @@ class ShiftSignupState case ShiftSignupState::OCCUPIED: case ShiftSignupState::ADMIN: return 60; + default: + return 0; } } /** * Returns true, if signup is allowed + * + * @return bool */ public function isSignupAllowed() { @@ -106,6 +121,8 @@ class ShiftSignupState /** * Return the shift signup state + * + * @return string */ public function getState() { @@ -114,6 +131,8 @@ class ShiftSignupState /** * How many places are free in this shift for the angeltype? + * + * @return int */ public function getFreeEntries() { -- cgit v1.2.3-54-g00ecf