MCPcopy Create free account
hub / github.com/Rello/analytics / deleteByUser

Method deleteByUser

lib/Service/ReportService.php:355–364  ·  view source on GitHub ↗

* get dataset by user * * @param string $userId * @return array|bool * @throws Exception */

(string $userId)

Source from the content-addressed store, hash-verified

353 * @throws Exception
354 */
355 public function deleteByUser(string $userId) {
356 $reports = $this->ReportMapper->indexByUser($userId);
357 foreach ($reports as $report) {
358 $this->ShareService->deleteSharesByItem(ShareService::SHARE_ITEM_TYPE_REPORT, $report['id']);
359 $this->ThresholdMapper->deleteThresholdByReport($report['id']);
360 $this->setFavorite($report['id'], 'false');
361 $this->ReportMapper->delete($report['id']);
362 }
363 return true;
364 }
365
366 /**
367 * get own reports which are marked as favorites

Callers

nothing calls this directly

Calls 5

setFavoriteMethod · 0.95
indexByUserMethod · 0.45
deleteSharesByItemMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected