diff --git a/src/Entities/TokenInterface.php b/src/Entities/TokenInterface.php index e4da51afe..b51fce9d4 100644 --- a/src/Entities/TokenInterface.php +++ b/src/Entities/TokenInterface.php @@ -43,9 +43,9 @@ public function setExpiryDateTime(DateTimeImmutable $dateTime): void; /** * Set the identifier of the user associated with the token. * - * @param int|non-empty-string $identifier + * @param non-empty-string|int $identifier */ - public function setUserIdentifier(int|string $identifier): void; + public function setUserIdentifier(string|int $identifier): void; /** * Get the token user's identifier. diff --git a/src/Grant/AbstractGrant.php b/src/Grant/AbstractGrant.php index 057d86593..3e71800b4 100644 --- a/src/Grant/AbstractGrant.php +++ b/src/Grant/AbstractGrant.php @@ -184,7 +184,7 @@ protected function validateClient(ServerRequestInterface $request): ClientEntity * getClientEntity might return null. By contrast, this method will * always either return a ClientEntityInterface or throw. */ - protected function getClientEntityOrFail(string $clientId, ServerRequestInterface $request): ClientEntityInterface + protected function getClientEntityOrFail(string|int $clientId, ServerRequestInterface $request): ClientEntityInterface { $client = $this->clientRepository->getClientEntity($clientId); diff --git a/src/Repositories/AccessTokenRepositoryInterface.php b/src/Repositories/AccessTokenRepositoryInterface.php index d392716ed..254456e86 100644 --- a/src/Repositories/AccessTokenRepositoryInterface.php +++ b/src/Repositories/AccessTokenRepositoryInterface.php @@ -30,7 +30,7 @@ interface AccessTokenRepositoryInterface extends RepositoryInterface public function getNewToken( ClientEntityInterface $clientEntity, array $scopes, - mixed $userIdentifier = null + string|int|null $userIdentifier = null ): AccessTokenEntityInterface; /** diff --git a/src/Repositories/ClientRepositoryInterface.php b/src/Repositories/ClientRepositoryInterface.php index 63134ca9d..79420166f 100644 --- a/src/Repositories/ClientRepositoryInterface.php +++ b/src/Repositories/ClientRepositoryInterface.php @@ -22,10 +22,10 @@ interface ClientRepositoryInterface extends RepositoryInterface /** * Get a client. */ - public function getClientEntity(string $clientIdentifier): ?ClientEntityInterface; + public function getClientEntity(string|int $clientIdentifier): ?ClientEntityInterface; /** * Validate a client's secret. */ - public function validateClient(string $clientIdentifier, ?string $clientSecret, ?string $grantType): bool; + public function validateClient(string|int $clientIdentifier, ?string $clientSecret, ?string $grantType): bool; }