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