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

Method deleteByUser

lib/Service/ReportService.php:361–370  ·  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

359 * @throws Exception
360 */
361 public function deleteByUser(string $userId) {
362 $reports = $this->ReportMapper->indexByUser($userId);
363 foreach ($reports as $report) {
364 $this->ShareService->deleteSharesByItem(ShareService::SHARE_ITEM_TYPE_REPORT, $report['id']);
365 $this->ThresholdMapper->deleteThresholdByReport($report['id']);
366 $this->setFavorite($report['id'], 'false');
367 $this->ReportMapper->delete($report['id']);
368 }
369 return true;
370 }
371
372 /**
373 * 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