| Total Complexity | 2 |
| Total Lines | 12 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | final class JsonResponseFactory implements ResponseFactory |
||
| 12 | { |
||
| 13 | public function fromError(int $code, AuthenticationException $exception = null): Response |
||
| 14 | { |
||
| 15 | $error = ['code' => $code, 'message' => Response::$statusTexts[$code]]; |
||
| 16 | |||
| 17 | return JsonResponse::create(['error' => $error], $code); |
||
| 18 | } |
||
| 19 | |||
| 20 | public function fromToken(string $token): Response |
||
| 23 | } |
||
| 24 | } |
||
| 25 |