- Add single-line class docblocks to all 59 repository classes and interfaces describing scope and responsibility - Add multi-line docblocks to key services documenting business rules: AuthService (6-step login cascade), ImportService (3-phase CSV workflow), TenantScopeService (strict/permissive modes), PermissionService (RBAC resolution + two-tier caching), UserAccountService (atomicity + audit) - Add transaction(callable) wrapper to DatabaseSessionRepository to DRY up begin/commit/rollback boilerplate Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24 lines
702 B
PHP
24 lines
702 B
PHP
<?php
|
|
|
|
namespace MintyPHP\Repository\Auth;
|
|
|
|
/** Contract for remember-me token creation, rotation, expiry, and active session counting. */
|
|
interface RememberTokenRepositoryInterface
|
|
{
|
|
public function create(int $userId, string $selector, string $tokenHash, string $expiresAt): ?int;
|
|
|
|
public function findBySelector(string $selector): ?array;
|
|
|
|
public function updateToken(int $id, string $tokenHash, string $expiresAt): bool;
|
|
|
|
public function expireAllByAdmin(): int;
|
|
|
|
public function deleteById(int $id): bool;
|
|
|
|
public function deleteByUserId(int $userId): bool;
|
|
|
|
public function listByUserId(int $userId, int $limit = 20): array;
|
|
|
|
public function countActive(): int;
|
|
}
|