diff options
author | Bot <bot@myigel.name> | 2017-01-02 15:43:36 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-01-02 15:49:53 +0100 |
commit | d71e7bbfad2f07f82df0c515608996d250fd4182 (patch) | |
tree | 5083a17b218c08b3a699a0bf15bec926cc2dd185 /includes/model/ShiftsFilter.php | |
parent | 7313e15ce8236e19331fb6639a3a5b97c8f06ecd (diff) |
Formatting
Diffstat (limited to 'includes/model/ShiftsFilter.php')
-rw-r--r-- | includes/model/ShiftsFilter.php | 60 |
1 files changed, 28 insertions, 32 deletions
diff --git a/includes/model/ShiftsFilter.php b/includes/model/ShiftsFilter.php index cba6fee7..1e8d49cf 100644 --- a/includes/model/ShiftsFilter.php +++ b/includes/model/ShiftsFilter.php @@ -10,28 +10,28 @@ namespace Engelsystem; class ShiftsFilter { - /** - * How long can the time interval be? - */ - const MAX_DURATION = 86400; - // one day - - /** - * Shift is completely full. - */ - const FILLED_FILLED = 1; - - /** - * Shift has some free slots. - */ - const FILLED_FREE = 0; - - /** - * Has the user "user shifts admin" privilege? - * - * @var boolean - */ - private $userShiftsAdmin; + /** + * How long can the time interval be? + */ + const MAX_DURATION = 86400; + // one day + + /** + * Shift is completely full. + */ + const FILLED_FILLED = 1; + + /** + * Shift has some free slots. + */ + const FILLED_FREE = 0; + + /** + * Has the user "user shifts admin" privilege? + * + * @var boolean + */ + private $userShiftsAdmin; private $filled = []; @@ -48,11 +48,11 @@ class ShiftsFilter $this->user_shifts_admin = $user_shifts_admin; $this->rooms = $rooms; $this->types = $types; - + $this->filled = [ - ShiftsFilter::FILLED_FREE - ]; - + ShiftsFilter::FILLED_FREE + ]; + if ($user_shifts_admin) { $this->filled[] = ShiftsFilter::FILLED_FILLED; } @@ -84,9 +84,7 @@ class ShiftsFilter public function getTypes() { if (count($this->types) == 0) { - return [ - 0 - ]; + return [0]; } return $this->types; } @@ -99,9 +97,7 @@ class ShiftsFilter public function getRooms() { if (count($this->rooms) == 0) { - return [ - 0 - ]; + return [0]; } return $this->rooms; } |