format backend code

This commit is contained in:
Yisroel Baum 2026-05-25 20:24:59 +03:00
parent 9577367622
commit 67dd376a2f
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
40 changed files with 146 additions and 71 deletions

View file

@ -20,7 +20,8 @@ class AuthController
private AuthenticateUser $authenticateUser,
private CreateSession $createSession,
private Logout $logout,
) {}
) {
}
public function login(Request $request): JsonResponse
{
@ -33,11 +34,13 @@ class AuthController
);
} catch (BadRequestException $exception) {
return new JsonResponse(
['error' => $exception->getMessage()], 400
['error' => $exception->getMessage()],
400
);
} catch (UnauthorizedException $exception) {
return new JsonResponse(
['error' => $exception->getMessage()], 401
['error' => $exception->getMessage()],
401
);
}
@ -71,7 +74,7 @@ class AuthController
}
/**
* @return array{id: int, email: string, firstname: string, lastname: string}
* @return array{id: int, email: string}
*/
private function buildUserPayload(User $user): array
{

View file

@ -8,7 +8,9 @@ use Illuminate\Http\JsonResponse;
class SetController
{
public function __construct(private SetRepository $setRepository) {}
public function __construct(private SetRepository $setRepository)
{
}
public function index(): JsonResponse
{