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

@ -12,5 +12,6 @@ class CreateSessionDto
public User $user,
public DateTimeImmutable $createdAt,
public DateTimeImmutable $expiresAt,
) {}
) {
}
}

View file

@ -8,7 +8,9 @@ use DateTimeZone;
class EloquentSessionRepository implements SessionRepository
{
public function __construct(private UserRepository $userRepo) {}
public function __construct(private UserRepository $userRepo)
{
}
public function create(CreateSessionDto $dto): Session
{

View file

@ -12,7 +12,8 @@ class Session
private User $user,
private DateTimeImmutable $createdAt,
private DateTimeImmutable $expiresAt,
) {}
) {
}
public function getToken(): string
{

View file

@ -14,7 +14,8 @@ class AuthenticateUser
public function __construct(
private UserRepository $userRepo,
private PasswordHasher $hasher,
) {}
) {
}
/**
* @throws BadRequestException

View file

@ -7,5 +7,6 @@ class AuthenticateUserRequest
public function __construct(
public ?string $email,
public ?string $password,
) {}
) {
}
}

View file

@ -17,7 +17,8 @@ class CreateSession
private SessionRepository $sessionRepo,
private TokenGenerator $tokenGenerator,
private Clock $clock,
) {}
) {
}
public function execute(User $user): Session
{

View file

@ -8,7 +8,8 @@ class Logout
{
public function __construct(
private SessionRepository $sessionRepo,
) {}
) {
}
public function execute(string $token): void
{