From 952c7892f3ac7bfadf8419062e44ff1af66ecc57 Mon Sep 17 00:00:00 2001 From: Bot Date: Mon, 25 Dec 2017 23:12:52 +0100 Subject: Formatting & Docstrings --- includes/controller/shifts_controller.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'includes/controller/shifts_controller.php') 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(), - '', + '', 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('/')); } -- cgit v1.2.3-70-g09d2