Use native typehints

This commit is contained in:
Lukáš Unger 2018-05-08 11:34:42 +02:00
parent a1da9beb92
commit 577065c270
No known key found for this signature in database
GPG Key ID: 48E84B8B7A223C26
2 changed files with 2 additions and 11 deletions

View File

@ -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;
}

View File

@ -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);
}