From 577065c270ad67ea4cf06c4c9713e0691bf7d493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Unger?= Date: Tue, 8 May 2018 11:34:42 +0200 Subject: [PATCH] Use native typehints --- src/Entities/AccessTokenEntityInterface.php | 7 +------ src/Entities/Traits/AccessTokenTrait.php | 6 +----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/Entities/AccessTokenEntityInterface.php b/src/Entities/AccessTokenEntityInterface.php index 8cc20dd2..5d69eefd 100644 --- a/src/Entities/AccessTokenEntityInterface.php +++ b/src/Entities/AccessTokenEntityInterface.php @@ -9,17 +9,12 @@ namespace League\OAuth2\Server\Entities; -use Lcobucci\JWT\Token; use League\OAuth2\Server\CryptKey; interface AccessTokenEntityInterface extends TokenInterface { /** * Generate a string representation from the access token - * - * @param CryptKey $privateKey - * - * @return string */ - public function convertToAccessToken(CryptKey $privateKey); + public function convertToAccessToken(CryptKey $privateKey): string; } diff --git a/src/Entities/Traits/AccessTokenTrait.php b/src/Entities/Traits/AccessTokenTrait.php index 08231784..fab41c46 100644 --- a/src/Entities/Traits/AccessTokenTrait.php +++ b/src/Entities/Traits/AccessTokenTrait.php @@ -42,12 +42,8 @@ trait AccessTokenTrait /** * Generate a string representation from the access token - * - * @param CryptKey $privateKey - * - * @return string */ - public function convertToAccessToken(CryptKey $privateKey) + public function convertToAccessToken(CryptKey $privateKey): string { return (string) $this->convertToJWT($privateKey); }