transactions->run(function () use ($exportId): void { $export = $this->exports->findById($exportId, lock: true) ?? throw new BillingExportNotFound($exportId); $export->ensureDraft(); $this->exports->delete($export); }); } }