This commit is contained in:
James Cole 2021-02-03 06:25:58 +01:00
parent 08fcff2a98
commit e441df367d
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D

View File

@ -37,8 +37,7 @@ use Log;
*/
class RecurrenceController extends Controller
{
/** @var RecurringRepositoryInterface The recurring repository. */
private $recurring;
private RecurringRepositoryInterface $recurring;
/**
* RecurrenceController constructor.
@ -97,12 +96,14 @@ class RecurrenceController extends Controller
if ('yearly' === $repetitionType) {
$repetitionMoment = explode(',', $request->get('type'))[1] ?? '2018-01-01';
}
$actualStart->startOfDay();
$repetition = new RecurrenceRepetition;
$repetition->repetition_type = $repetitionType;
$repetition->repetition_moment = $repetitionMoment;
$repetition->repetition_skip = (int) $request->get('skip');
$repetition->weekend = (int) $request->get('weekend');
$actualEnd = clone $end;
switch ($endsAt) {
default:
case 'forever':