| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 2 | public function isUserExistsByEmail(string $email, UserRepository $repository) |
|
| 42 | { |
||
| 43 | 2 | $isUserExists = $repository->isUserExists([ |
|
| 44 | 2 | 'email' => $email, |
|
| 45 | ]); |
||
| 46 | |||
| 47 | 2 | if ($isUserExists === true) { |
|
| 48 | 1 | return new JsonResponse(); |
|
| 49 | } |
||
| 50 | |||
| 51 | 1 | return new JsonResponse([], 404); |
|
| 52 | } |
||
| 53 | } |