Conditions | 3 |
Paths | 4 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | 2 | public function delete(int $noteId): void |
|
10 | { |
||
11 | 2 | $this->getOneFromDb($noteId); |
|
12 | 1 | $this->noteRepository->delete($noteId); |
|
13 | 1 | if (self::isRedisEnabled() === true) { |
|
14 | 1 | $this->deleteFromCache($noteId); |
|
15 | } |
||
16 | 1 | if (self::isLoggerEnabled() === true) { |
|
17 | 1 | $this->loggerService->setInfo('The note with the ID ' . $noteId . ' has deleted successfully.'); |
|
18 | } |
||
21 |