From b21de11429603bd3f4a8420ca50e7f986364ccd3 Mon Sep 17 00:00:00 2001 From: rdohms Date: Fri, 20 Mar 2015 11:33:03 +0100 Subject: [PATCH] Updated Interface Docs Made phpdocs match expectations like null when not found and using array notation for indicating array of --- src/Storage/AccessTokenInterface.php | 4 ++-- src/Storage/AuthCodeInterface.php | 4 ++-- src/Storage/ClientInterface.php | 4 ++-- src/Storage/RefreshTokenInterface.php | 2 +- src/Storage/ScopeInterface.php | 2 +- src/Storage/SessionInterface.php | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Storage/AccessTokenInterface.php b/src/Storage/AccessTokenInterface.php index 5f852b80..129679dd 100644 --- a/src/Storage/AccessTokenInterface.php +++ b/src/Storage/AccessTokenInterface.php @@ -24,7 +24,7 @@ interface AccessTokenInterface extends StorageInterface * * @param string $token The access token * - * @return \League\OAuth2\Server\Entity\AccessTokenEntity + * @return \League\OAuth2\Server\Entity\AccessTokenEntity | null */ public function get($token); @@ -33,7 +33,7 @@ interface AccessTokenInterface extends StorageInterface * * @param \League\OAuth2\Server\Entity\AccessTokenEntity $token The access token * - * @return array Array of \League\OAuth2\Server\Entity\ScopeEntity + * @return \League\OAuth2\Server\Entity\ScopeEntity[] Array of \League\OAuth2\Server\Entity\ScopeEntity */ public function getScopes(AccessTokenEntity $token); diff --git a/src/Storage/AuthCodeInterface.php b/src/Storage/AuthCodeInterface.php index 1fe0f8b9..d451d2ef 100644 --- a/src/Storage/AuthCodeInterface.php +++ b/src/Storage/AuthCodeInterface.php @@ -24,7 +24,7 @@ interface AuthCodeInterface extends StorageInterface * * @param string $code * - * @return \League\OAuth2\Server\Entity\AuthCodeEntity + * @return \League\OAuth2\Server\Entity\AuthCodeEntity | null */ public function get($code); @@ -45,7 +45,7 @@ interface AuthCodeInterface extends StorageInterface * * @param \League\OAuth2\Server\Entity\AuthCodeEntity $token The auth code * - * @return array Array of \League\OAuth2\Server\Entity\ScopeEntity + * @return \League\OAuth2\Server\Entity\ScopeEntity[] Array of \League\OAuth2\Server\Entity\ScopeEntity */ public function getScopes(AuthCodeEntity $token); diff --git a/src/Storage/ClientInterface.php b/src/Storage/ClientInterface.php index 4e9cc39a..e8968316 100644 --- a/src/Storage/ClientInterface.php +++ b/src/Storage/ClientInterface.php @@ -26,7 +26,7 @@ interface ClientInterface extends StorageInterface * @param string $redirectUri The client's redirect URI (default = "null") * @param string $grantType The grant type used (default = "null") * - * @return \League\OAuth2\Server\Entity\ClientEntity + * @return \League\OAuth2\Server\Entity\ClientEntity | null */ public function get($clientId, $clientSecret = null, $redirectUri = null, $grantType = null); @@ -35,7 +35,7 @@ interface ClientInterface extends StorageInterface * * @param \League\OAuth2\Server\Entity\SessionEntity $session The session * - * @return \League\OAuth2\Server\Entity\ClientEntity + * @return \League\OAuth2\Server\Entity\ClientEntity | null */ public function getBySession(SessionEntity $session); } diff --git a/src/Storage/RefreshTokenInterface.php b/src/Storage/RefreshTokenInterface.php index bf65468c..e2f19959 100644 --- a/src/Storage/RefreshTokenInterface.php +++ b/src/Storage/RefreshTokenInterface.php @@ -23,7 +23,7 @@ interface RefreshTokenInterface extends StorageInterface * * @param string $token * - * @return \League\OAuth2\Server\Entity\RefreshTokenEntity + * @return \League\OAuth2\Server\Entity\RefreshTokenEntity | null */ public function get($token); diff --git a/src/Storage/ScopeInterface.php b/src/Storage/ScopeInterface.php index e8bc10b0..1257a819 100644 --- a/src/Storage/ScopeInterface.php +++ b/src/Storage/ScopeInterface.php @@ -23,7 +23,7 @@ interface ScopeInterface extends StorageInterface * @param string $grantType The grant type used in the request (default = "null") * @param string $clientId The client sending the request (default = "null") * - * @return \League\OAuth2\Server\Entity\ScopeEntity + * @return \League\OAuth2\Server\Entity\ScopeEntity | null */ public function get($scope, $grantType = null, $clientId = null); } diff --git a/src/Storage/SessionInterface.php b/src/Storage/SessionInterface.php index ab205180..bc70e8f6 100644 --- a/src/Storage/SessionInterface.php +++ b/src/Storage/SessionInterface.php @@ -26,7 +26,7 @@ interface SessionInterface extends StorageInterface * * @param \League\OAuth2\Server\Entity\AccessTokenEntity $accessToken The access token * - * @return \League\OAuth2\Server\Entity\SessionEntity + * @return \League\OAuth2\Server\Entity\SessionEntity | null */ public function getByAccessToken(AccessTokenEntity $accessToken); @@ -35,7 +35,7 @@ interface SessionInterface extends StorageInterface * * @param \League\OAuth2\Server\Entity\AuthCodeEntity $authCode The auth code * - * @return \League\OAuth2\Server\Entity\SessionEntity + * @return \League\OAuth2\Server\Entity\SessionEntity | null */ public function getByAuthCode(AuthCodeEntity $authCode); @@ -44,7 +44,7 @@ interface SessionInterface extends StorageInterface * * @param \League\OAuth2\Server\Entity\SessionEntity * - * @return array Array of \League\OAuth2\Server\Entity\ScopeEntity + * @return \League\OAuth2\Server\Entity\ScopeEntity[] Array of \League\OAuth2\Server\Entity\ScopeEntity */ public function getScopes(SessionEntity $session);