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

Method updateGroup

lib/Service/ReportService.php:588–594  ·  view source on GitHub ↗

* update report group assignment (from drag & drop) * * @NoAdminRequired * @param int $reportId * @param $groupId * @return bool */

(int $reportId, $groupId)

Source from the content-addressed store, hash-verified

586 * @return bool
587 */
588 public function updateGroup(int $reportId, $groupId) {
589 $groupId = (int)$groupId;
590 if (!$this->isOwn($reportId) || !$this->isValidParent($groupId, $reportId)) {
591 return false;
592 }
593 return $this->ReportMapper->updateGroup($reportId, $groupId);
594 }
595
596 private function isValidParent(int $parentId, ?int $itemId = null): bool {
597 if ($parentId === 0) {

Callers 1

createMethod · 0.95

Calls 2

isOwnMethod · 0.95
isValidParentMethod · 0.95

Tested by

no test coverage detected