hour >= $config['start'] && $start->hour < $config['end'] || $end->hour >= $config['start'] && $end->hour < $config['end'] ); } /** * Calculate a shifts night multiplier * * @param Carbon $start * @param Carbon $end * @return float */ public static function getNightShiftMultiplier(Carbon $start, Carbon $end): float { if (!self::isNightShift($start, $end)) { return 1; } return config('night_shifts')['multiplier']; } }