| Conditions | 4 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 59 | public function handle() |
||
| 60 | { |
||
| 61 | $arguments = $this->arguments(); |
||
| 62 | $user_id = $arguments['user_id'] ? intval($arguments['user_id']) : null; |
||
| 63 | $user_type = $arguments['user_type'] ?? $this->TokenManager->getDefaultMorph(); |
||
| 64 | if (is_null($user_id) || $user_id < 1) { |
||
| 65 | $this->line('ID пользователя не введен.'); |
||
| 66 | return 1; |
||
| 67 | } |
||
| 68 | $this->TokenManager->deleteAccessTokenByUser($user_id, $user_type); |
||
| 69 | $this->line('Токены пользователя удалены.'); |
||
| 70 | return 1; |
||
| 71 | } |
||
| 73 |