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

Method delete

lib/Service/ThresholdService.php:181–192  ·  view source on GitHub ↗

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

(int $thresholdId)

Source from the content-addressed store, hash-verified

179 * @return bool
180 */
181 public function delete(int $thresholdId) {
182 $reportId = $this->ThresholdMapper->getOwnReportByThreshold($thresholdId);
183 if ($reportId === 0) {
184 return false;
185 }
186 $this->logger->info('reportId: ' . $reportId);
187 if (!empty($this->ReportMapper->readOwn($reportId))) {
188 $this->ReportMapper->increaseVersionByReport($reportId);
189 }
190 $this->ThresholdMapper->deleteThreshold($thresholdId);
191 return true;
192 }
193
194 /**
195 * 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