* get dataset by user * * @param string $userId * @return bool * @throws Exception */
(string $userId)
| 397 | * @throws Exception |
| 398 | */ |
| 399 | public function deleteByUser(string $userId) { |
| 400 | $datasets = $this->DatasetMapper->indexByUser($userId); |
| 401 | foreach ($datasets as $dataset) { |
| 402 | $this->DataloadMapper->deleteByDataset($dataset['id']); |
| 403 | if (($dataset['storage_mode'] ?? 'legacy') === 'flexible_shared') { |
| 404 | $this->FlexibleStorageService->deleteDataset((int)$dataset['id']); |
| 405 | } else { |
| 406 | $this->StorageMapper->deleteByDataset($dataset['id']); |
| 407 | } |
| 408 | $this->DatasetMapper->delete($dataset['id']); |
| 409 | } |
| 410 | $this->providerRemoveByUser($userId); |
| 411 | return true; |
| 412 | } |
| 413 | |
| 414 | /** @param array<string,mixed> $dataset */ |
| 415 | private function decorateDataset(array $dataset): array { |
nothing calls this directly
no test coverage detected