summaryrefslogtreecommitdiff
path: root/includes/view/Shifts_view.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-12-25 23:12:52 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-12-25 23:51:15 +0100
commit952c7892f3ac7bfadf8419062e44ff1af66ecc57 (patch)
tree69a85e8e4719801a064b8fa2d521fe000f959cd5 /includes/view/Shifts_view.php
parent879918864a9c6da0fe9be1aca6c443ec8df0afc3 (diff)
Formatting & Docstrings
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;
}