summaryrefslogtreecommitdiff
path: root/includes/view/Shifts_view.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-12-26 10:29:16 +0100
committerGitHub <noreply@github.com>2017-12-26 10:29:16 +0100
commitde61c88d6de67d12d5de5b6dd0ab6b8c82e5a290 (patch)
treeaac6a43cb88e3d803da5809ab37885b41bc811c6 /includes/view/Shifts_view.php
parent879918864a9c6da0fe9be1aca6c443ec8df0afc3 (diff)
parentf8d0a7c5b00a58c646871e355b5876dcc5890be5 (diff)
Merge pull request #388 from MyIgel/master
Formatting, Docstrings, and fixup
Diffstat (limited to 'includes/view/Shifts_view.php')
-rw-r--r--includes/view/Shifts_view.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/includes/view/Shifts_view.php b/includes/view/Shifts_view.php
index 0b71b77b..7fc56d1d 100644
--- a/includes/view/Shifts_view.php
+++ b/includes/view/Shifts_view.php
@@ -4,17 +4,21 @@ use Engelsystem\ShiftSignupState;
/**
* Renders the basic shift view header.
- *
+ *
* @param array $shift
* @param array $room
- *
* @return string HTML
*/
-function Shift_view_header($shift, $room) {
+function Shift_view_header($shift, $room)
+{
return div('row', [
div('col-sm-3 col-xs-6', [
'<h4>' . _('Title') . '</h4>',
- '<p class="lead">' . ($shift['URL'] != '' ? '<a href="' . $shift['URL'] . '">' . $shift['title'] . '</a>' : $shift['title']) . '</p>'
+ '<p class="lead">'
+ . ($shift['URL'] != ''
+ ? '<a href="' . $shift['URL'] . '">' . $shift['title'] . '</a>'
+ : $shift['title'])
+ . '</p>'
]),
div('col-sm-3 col-xs-6', [
'<h4>' . _('Start') . '</h4>',
@@ -237,6 +241,11 @@ function Shift_view_render_shift_entry($shift_entry, $user_shift_admin, $angelty
function shift_length($shift)
{
$length = floor(($shift['end'] - $shift['start']) / (60 * 60)) . ':';
- $length .= str_pad((($shift['end'] - $shift['start']) % (60 * 60)) / 60, 2, '0', STR_PAD_LEFT) . 'h';
+ $length .= str_pad(
+ (($shift['end'] - $shift['start']) % (60 * 60)) / 60,
+ 2,
+ '0',
+ STR_PAD_LEFT
+ ) . 'h';
return $length;
}