Various code cleanup.

This commit is contained in:
James Cole
2021-09-18 10:20:19 +02:00
parent 481a6bdd5f
commit 3589c9f60f
137 changed files with 369 additions and 282 deletions

View File

@@ -101,9 +101,7 @@ class RecurrenceFactory
if (array_key_exists('active', $data['recurrence'])) {
$active = $data['recurrence']['active'];
}
if (null !== $repeatUntil) {
$repeatUntilString = $repeatUntil->format('Y-m-d');
}
$repeatUntilString = $repeatUntil?->format('Y-m-d');
$recurrence = new Recurrence(
[
@@ -111,7 +109,7 @@ class RecurrenceFactory
'transaction_type_id' => $type->id,
'title' => $title,
'description' => $description,
'first_date' => $firstDate ? $firstDate->format('Y-m-d') : null,
'first_date' => $firstDate?->format('Y-m-d'),
'repeat_until' => $repetitions > 0 ? null : $repeatUntilString,
'latest_date' => null,
'repetitions' => $repetitions,