Small code cleanup.

This commit is contained in:
James Cole
2021-03-12 20:25:15 +01:00
parent 81f5224b11
commit a03e000af1
2 changed files with 8 additions and 5 deletions

View File

@@ -100,6 +100,8 @@ class RecurrenceUpdateService
// update each repetition or throw error yay
$this->updateRepetitions($recurrence, $data['repetitions'] ?? []);
}
// update all transactions:
// // update all transactions (and associated meta-data)
// if (array_key_exists('transactions', $data)) {
@@ -169,7 +171,8 @@ class RecurrenceUpdateService
'type' => 'repetition_type',
'moment' => 'repetition_moment',
'skip' => 'repetition_skip',
'weekend' => 'weekend',];
'weekend' => 'weekend',
];
foreach ($fields as $field => $column) {
if (array_key_exists($field, $current)) {
$match->$column = $current[$field];