diff options
author | msquare <msquare@notrademark.de> | 2017-12-26 10:29:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-26 10:29:16 +0100 |
commit | de61c88d6de67d12d5de5b6dd0ab6b8c82e5a290 (patch) | |
tree | aac6a43cb88e3d803da5809ab37885b41bc811c6 /includes/controller/shifts_controller.php | |
parent | 879918864a9c6da0fe9be1aca6c443ec8df0afc3 (diff) | |
parent | f8d0a7c5b00a58c646871e355b5876dcc5890be5 (diff) |
Merge pull request #388 from MyIgel/master
Formatting, Docstrings, and fixup
Diffstat (limited to 'includes/controller/shifts_controller.php')
-rw-r--r-- | includes/controller/shifts_controller.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/includes/controller/shifts_controller.php b/includes/controller/shifts_controller.php index 28e35a1a..5930595e 100644 --- a/includes/controller/shifts_controller.php +++ b/includes/controller/shifts_controller.php @@ -45,7 +45,6 @@ function shift_edit_controller() { global $privileges; - // Schicht bearbeiten $msg = ''; $valid = true; $request = request(); @@ -65,7 +64,11 @@ function shift_edit_controller() $angeltypes = select_array(AngelTypes(), 'id', 'name'); $shifttypes = select_array(ShiftTypes(), 'id', 'name'); - $needed_angel_types = select_array(NeededAngelTypes_by_shift($shift_id), 'angel_type_id', 'count'); + $needed_angel_types = select_array( + NeededAngelTypes_by_shift($shift_id), + 'angel_type_id', + 'count' + ); foreach (array_keys($angeltypes) as $angeltype_id) { if (!isset($needed_angel_types[$angeltype_id])) { $needed_angel_types[$angeltype_id] = 0; @@ -149,7 +152,7 @@ function shift_edit_controller() $needed_angel_types_info = []; foreach ($needed_angel_types as $type_id => $count) { NeededAngelType_add($shift_id, $type_id, null, $count); - if($count > 0) { + if ($count > 0) { $needed_angel_types_info[] = $angeltypes[$type_id] . ': ' . $count; } } @@ -178,7 +181,9 @@ function shift_edit_controller() shifts_title(), [ msg(), - '<noscript>' . info(_('This page is much more comfortable with javascript.'), true) . '</noscript>', + '<noscript>' + . info(_('This page is much more comfortable with javascript.'), true) + . '</noscript>', form([ form_select('shifttype_id', _('Shifttype'), $shifttypes, $shifttype_id), form_text('title', _('Title'), $title), @@ -310,8 +315,9 @@ function shifts_controller() switch ($request->input('action')) { case 'view': return shift_controller(); + /** @noinspection PhpMissingBreakStatementInspection */ case 'next': - return shift_next_controller(); + shift_next_controller(); default: redirect(page_link_to('/')); } |