diff --git a/includes/helper/shift_helper.php b/includes/helper/shift_helper.php
index 54c95fb1..dc0a2a1c 100644
--- a/includes/helper/shift_helper.php
+++ b/includes/helper/shift_helper.php
@@ -3,7 +3,6 @@
namespace Engelsystem\Events\Listener;
use Carbon\Carbon;
-use Engelsystem\Helpers\Shifts;
use Engelsystem\Mail\EngelsystemMailer;
use Engelsystem\Models\Shifts\Shift as ShiftModel;
use Engelsystem\Models\Shifts\ShiftEntry;
@@ -32,7 +31,7 @@ class Shift
$workLog->worked_at = $shift->start->copy()->startOfDay();
$workLog->hours =
(($shift->end->timestamp - $shift->start->timestamp) / 60 / 60)
- * Shifts::getNightShiftMultiplier($shift->start, $shift->end);
+ * $shift->getNightShiftMultiplier();
$workLog->comment = sprintf(
__('%s (%s as %s) in %s, %s - %s'),
$shift->shiftType->name,
diff --git a/includes/model/User_model.php b/includes/model/User_model.php
index 55a2af56..56116294 100644
--- a/includes/model/User_model.php
+++ b/includes/model/User_model.php
@@ -123,7 +123,7 @@ function User_get_shifts_sum_query()
return 'COALESCE(SUM(UNIX_TIMESTAMP(shifts.end) - UNIX_TIMESTAMP(shifts.start)), 0)';
}
- /* @see \Engelsystem\Helpers\Shifts::isNightShift to keep it in sync */
+ /* @see \Engelsystem\Models\Shifts\Shift::isNightShift to keep it in sync */
return sprintf(
'
COALESCE(SUM(
diff --git a/includes/view/ShiftCalendarShiftRenderer.php b/includes/view/ShiftCalendarShiftRenderer.php
index dbdc2d1b..ed9a6cb4 100644
--- a/includes/view/ShiftCalendarShiftRenderer.php
+++ b/includes/view/ShiftCalendarShiftRenderer.php
@@ -3,7 +3,6 @@
namespace Engelsystem;
use Engelsystem\Config\GoodieType;
-use Engelsystem\Helpers\Shifts;
use Engelsystem\Models\AngelType;
use Engelsystem\Models\Shifts\Shift;
use Engelsystem\Models\Shifts\ShiftEntry;
@@ -245,7 +244,6 @@ class ShiftCalendarShiftRenderer
*/
private function renderShiftHead(Shift $shift, $class, $needed_angeltypes_count)
{
- $nightShiftsConfig = config('night_shifts');
$goodie = GoodieType::from(config('goodie_type'));
$goodie_enabled = $goodie !== GoodieType::None;
@@ -281,7 +279,7 @@ class ShiftCalendarShiftRenderer
]);
}
$night_shift = '';
- if (Shifts::isNightShift($shift->start, $shift->end) && $nightShiftsConfig['enabled'] && $goodie_enabled) {
+ if ($shift->isNightShift() && $goodie_enabled) {
$night_shift = ' ';
}
diff --git a/includes/view/Shifts_view.php b/includes/view/Shifts_view.php
index d615d3c3..19f5dd7d 100644
--- a/includes/view/Shifts_view.php
+++ b/includes/view/Shifts_view.php
@@ -2,7 +2,6 @@
use Engelsystem\Config\GoodieType;
use Engelsystem\Helpers\Carbon;
-use Engelsystem\Helpers\Shifts;
use Engelsystem\Models\AngelType;
use Engelsystem\Models\Location;
use Engelsystem\Models\Shifts\Shift;
@@ -269,7 +268,7 @@ function Shift_view(
$start = $shift->start->format(__('general.datetime'));
$night_shift_hint = '';
- if (Shifts::isNightShift($shift->start, $shift->end) && $nightShiftsConfig['enabled'] && $goodie_enabled) {
+ if ($shift->isNightShift() && $goodie_enabled) {
$night_shift_hint = '