transactions->run(function () use ($userId, $taskId, $date, $billingModel, $billingNote, $internalComment): void { $entry = $this->entries->findForDay($userId, $taskId, $date) ?? throw new TimeEntryNotFound(0); $entry->describe($billingModel, $billingNote, $internalComment); $this->entries->save($entry); }); } }