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

Method delete

lib/Service/ThresholdService.php:155–166  ·  view source on GitHub ↗

* Delete threshold * * @param int $thresholdId * @return bool */

(int $thresholdId)

Source from the content-addressed store, hash-verified

153 * @return bool
154 */
155 public function delete(int $thresholdId) {
156 $reportId = $this->ThresholdMapper->getOwnReportByThreshold($thresholdId);
157 if ($reportId === 0) {
158 return false;
159 }
160 $this->logger->info('reportId: ' . $reportId);
161 if (!empty($this->ReportMapper->readOwn($reportId))) {
162 $this->ReportMapper->increaseVersionByReport($reportId);
163 }
164 $this->ThresholdMapper->deleteThreshold($thresholdId);
165 return true;
166 }
167
168 /**
169 * Update sequence of multiple thresholds

Callers

nothing calls this directly

Calls 5

deleteThresholdMethod · 0.80
infoMethod · 0.45
readOwnMethod · 0.45

Tested by

no test coverage detected