* Delete threshold * * @param int $thresholdId * @return bool */
(int $thresholdId)
| 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 |
nothing calls this directly
no test coverage detected