From 55c1c546332db7bbbb95e0e4fd50ee8a690afc11 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 30 Nov 2018 14:13:11 +0100 Subject: [PATCH] Clean up docblocs --- src/Http/Controllers/AuthorizationController.php | 2 -- src/Http/Controllers/AuthorizedAccessTokenController.php | 2 +- src/Http/Controllers/ConvertsPsrResponses.php | 1 - src/Http/Controllers/PersonalAccessTokenController.php | 3 +-- src/Http/Middleware/CheckClientCredentialsForAnyScope.php | 5 ++--- src/Http/Middleware/CheckScopes.php | 3 +-- 6 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/Http/Controllers/AuthorizationController.php b/src/Http/Controllers/AuthorizationController.php index 95de7c61e..0b1700acd 100644 --- a/src/Http/Controllers/AuthorizationController.php +++ b/src/Http/Controllers/AuthorizationController.php @@ -7,12 +7,10 @@ use Laravel\Passport\Bridge\User; use Laravel\Passport\TokenRepository; use Laravel\Passport\ClientRepository; -use Illuminate\Database\Eloquent\Model; use Psr\Http\Message\ServerRequestInterface; use Zend\Diactoros\Response as Psr7Response; use League\OAuth2\Server\AuthorizationServer; use Illuminate\Contracts\Routing\ResponseFactory; -use League\OAuth2\Server\RequestTypes\AuthorizationRequest; class AuthorizationController { diff --git a/src/Http/Controllers/AuthorizedAccessTokenController.php b/src/Http/Controllers/AuthorizedAccessTokenController.php index 5afd057f2..72cded90c 100644 --- a/src/Http/Controllers/AuthorizedAccessTokenController.php +++ b/src/Http/Controllers/AuthorizedAccessTokenController.php @@ -30,7 +30,7 @@ public function __construct(TokenRepository $tokenRepository) * Get all of the authorized tokens for the authenticated user. * * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response + * @return \Illuminate\Database\Eloquent\Collection */ public function forUser(Request $request) { diff --git a/src/Http/Controllers/ConvertsPsrResponses.php b/src/Http/Controllers/ConvertsPsrResponses.php index 45053021c..74f98c392 100644 --- a/src/Http/Controllers/ConvertsPsrResponses.php +++ b/src/Http/Controllers/ConvertsPsrResponses.php @@ -2,7 +2,6 @@ namespace Laravel\Passport\Http\Controllers; use Illuminate\Http\Response; -use Psr\Http\Message\ResponseInterface; trait ConvertsPsrResponses { diff --git a/src/Http/Controllers/PersonalAccessTokenController.php b/src/Http/Controllers/PersonalAccessTokenController.php index c69136002..6dd1025b9 100644 --- a/src/Http/Controllers/PersonalAccessTokenController.php +++ b/src/Http/Controllers/PersonalAccessTokenController.php @@ -6,7 +6,6 @@ use Illuminate\Http\Response; use Laravel\Passport\Passport; use Laravel\Passport\TokenRepository; -use Laravel\Passport\PersonalAccessTokenResult; use Illuminate\Contracts\Validation\Factory as ValidationFactory; class PersonalAccessTokenController @@ -42,7 +41,7 @@ public function __construct(TokenRepository $tokenRepository, ValidationFactory * Get all of the personal access tokens for the authenticated user. * * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response + * @return \Illuminate\Database\Eloquent\Collection */ public function forUser(Request $request) { diff --git a/src/Http/Middleware/CheckClientCredentialsForAnyScope.php b/src/Http/Middleware/CheckClientCredentialsForAnyScope.php index 67dd7140e..1b3ce3f4d 100644 --- a/src/Http/Middleware/CheckClientCredentialsForAnyScope.php +++ b/src/Http/Middleware/CheckClientCredentialsForAnyScope.php @@ -36,7 +36,7 @@ public function __construct(ResourceServer $server) * @param \Closure $next * @param mixed ...$scopes * @return mixed - * @throws \Illuminate\Auth\AuthenticationException + * @throws \Illuminate\Auth\AuthenticationException|\Laravel\Passport\Exceptions\MissingScopeException */ public function handle($request, Closure $next, ...$scopes) { @@ -58,10 +58,9 @@ public function handle($request, Closure $next, ...$scopes) /** * Validate the scopes on the incoming request. * - * @param \Psr\Http\Message\ResponseInterface $psr + * @param \Psr\Http\Message\ServerRequestInterface $psr * @param array $scopes * @return bool - * @throws \Laravel\Passport\Exceptions\MissingScopeException */ protected function validateScopes($psr, $scopes) { diff --git a/src/Http/Middleware/CheckScopes.php b/src/Http/Middleware/CheckScopes.php index bb495ba5c..de7898df0 100644 --- a/src/Http/Middleware/CheckScopes.php +++ b/src/Http/Middleware/CheckScopes.php @@ -14,8 +14,7 @@ class CheckScopes * @param \Closure $next * @param mixed ...$scopes * @return \Illuminate\Http\Response - * @throws \Illuminate\Auth\AuthenticationException - * @throws \Laravel\Passport\Exceptions\MissingScopeException + * @throws \Illuminate\Auth\AuthenticationException|\Laravel\Passport\Exceptions\MissingScopeException */ public function handle($request, $next, ...$scopes) {