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/AngelTypes_view.php | 3 ++- includes/view/User_view.php | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'includes/view') diff --git a/includes/view/AngelTypes_view.php b/includes/view/AngelTypes_view.php index 7e8663a1..cdaa9f12 100644 --- a/includes/view/AngelTypes_view.php +++ b/includes/view/AngelTypes_view.php @@ -153,7 +153,7 @@ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angel 'actions' => '' ]; - if ($angeltype['requires_driver_license'] && ($coordinator || $admin_angeltypes)) + if ($angeltype['requires_driver_license'] && ($coordinator || $admin_angeltypes)) { $table_headers = [ 'Nick' => _("Nick"), 'DECT' => _("DECT"), @@ -166,6 +166,7 @@ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angel 'has_license_forklift' => _("Forklift"), 'actions' => '' ]; + } if (count($coordinators) > 0) { $page[] = '

' . _("Coordinators") . '

'; 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-70-g09d2