From d5d2acc7d80920eef5f0ed779a3738a12d5db348 Mon Sep 17 00:00:00 2001 From: msquare Date: Sat, 1 Oct 2016 10:48:19 +0200 Subject: improve code style --- includes/view/User_view.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'includes/view/User_view.php') diff --git a/includes/view/User_view.php b/includes/view/User_view.php index 3e365ea2..a620aa80 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -152,17 +152,15 @@ function User_shift_state_render($user) { if ($upcoming_shifts[0]['start'] > time()) { if ($upcoming_shifts[0]['start'] - time() > 3600) { return '' . _("Next shift %c") . ''; - } else { - return '' . _("Next shift %c") . ''; } + return '' . _("Next shift %c") . ''; } $halfway = ($upcoming_shifts[0]['start'] + $upcoming_shifts[0]['end']) / 2; if (time() < $halfway) { return '' . _("Shift starts %c") . ''; - } else { - return '' . _("Shift ends %c") . ''; } + return '' . _("Shift ends %c") . ''; } function User_view($user_source, $admin_user_privilege, $freeloader, $user_angeltypes, $user_groups, $shifts, $its_me) { @@ -340,7 +338,7 @@ function User_angeltypes_render($user_angeltypes) { } function User_groups_render($user_groups) { - $output = array(); + $output = []; foreach ($user_groups as $group) { $output[] = substr($group['Name'], 2); } -- cgit v1.2.3-54-g00ecf