| Total Complexity | 7 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 7 | class Responses |
||
| 8 | { |
||
| 9 | public function tokenNotFound() |
||
| 10 | { |
||
| 11 | return response()->json(['message' => 'Token is not valid']); |
||
| 12 | } |
||
| 13 | |||
| 14 | public function loggedIn() |
||
| 15 | { |
||
| 16 | return response()->json(['message' => 'You are logged in']); |
||
| 17 | } |
||
| 18 | |||
| 19 | public function youShouldBeGuest() |
||
| 20 | { |
||
| 21 | return response()->json([ |
||
| 22 | 'error' => 'you are logged in', Response::HTTP_BAD_REQUEST, |
||
| 23 | ]); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function emailNotValid() |
||
| 27 | { |
||
| 28 | return response()->json([ |
||
| 29 | 'error' => 'your email is not valid', Response::HTTP_BAD_REQUEST, |
||
| 30 | ]); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function blockedUser() |
||
| 34 | { |
||
| 35 | return response()->json( |
||
| 36 | ['error' => 'You are blocked'], Response::HTTP_BAD_REQUEST |
||
| 37 | ); |
||
| 38 | } |
||
| 39 | |||
| 40 | public function tokenSent() |
||
| 41 | { |
||
| 42 | return response()->json(['message' => 'token was sent.']); |
||
| 43 | } |
||
| 44 | |||
| 45 | public function userNotFound() |
||
| 49 | ); |
||
| 50 | } |
||
| 51 | } |
||
| 52 |