| Conditions | 3 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3.072 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 1 | public function run() |
|
| 39 | { |
||
| 40 | 1 | $token = $this->tokenQuery |
|
| 41 | 1 | ->whereUserId($this->model->id) |
|
| 42 | 1 | ->whereCode($this->code) |
|
| 43 | 1 | ->whereIsConfirmationType() |
|
| 44 | 1 | ->one(); |
|
| 45 | |||
| 46 | 1 | if ($token instanceof Token && !$token->getIsExpired()) { |
|
| 47 | $token->delete(); |
||
| 48 | |||
| 49 | return $this->userConfirmationService->run(); |
||
| 50 | } |
||
| 51 | |||
| 52 | 1 | return false; |
|
| 53 | } |
||
| 54 | } |
||
| 55 |