| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | public function __invoke(EnableUserCommand $aCommand) |
||
| 52 | { |
||
| 53 | $confirmationToken = $aCommand->confirmationToken(); |
||
| 54 | |||
| 55 | $user = $this->repository->userOfConfirmationToken(new UserToken($confirmationToken)); |
||
| 56 | if (null === $user) { |
||
| 57 | throw new UserTokenNotFoundException(); |
||
| 58 | } |
||
| 59 | $user->enableAccount(); |
||
| 60 | |||
| 61 | $this->repository->persist($user); |
||
| 62 | } |
||
| 63 | } |
||
| 64 |