From 7a5c511807931830b8cb8ae2a0d2139a47d90fbb Mon Sep 17 00:00:00 2001 From: Andrew Millington Date: Sat, 17 Feb 2018 16:15:48 +0000 Subject: [PATCH] Remove temp variables and @var comments --- src/Exception/OAuthServerException.php | 5 +---- src/ResponseTypes/RedirectResponse.php | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Exception/OAuthServerException.php b/src/Exception/OAuthServerException.php index e50942c0..756dfd3b 100644 --- a/src/Exception/OAuthServerException.php +++ b/src/Exception/OAuthServerException.php @@ -236,13 +236,10 @@ class OAuthServerException extends \Exception $this->redirectUri .= (strstr($this->redirectUri, '?') === false) ? '?' : '&'; } - /** @var ResponseInterface $response */ - $response = $response->withStatus(302)->withHeader('Location', $this->redirectUri . http_build_query($payload)); - return $response; + return $response->withStatus(302)->withHeader('Location', $this->redirectUri . http_build_query($payload)); } foreach ($headers as $header => $content) { - /** @var ResponseInterface $response */ $response = $response->withHeader($header, $content); } diff --git a/src/ResponseTypes/RedirectResponse.php b/src/ResponseTypes/RedirectResponse.php index f40f087b..e4639148 100644 --- a/src/ResponseTypes/RedirectResponse.php +++ b/src/ResponseTypes/RedirectResponse.php @@ -35,8 +35,6 @@ class RedirectResponse extends AbstractResponseType */ public function generateHttpResponse(ResponseInterface $response) { - /** @var ResponseInterface $response */ - $response = $response->withStatus(302)->withHeader('Location', $this->redirectUri); - return $response; + return $response->withStatus(302)->withHeader('Location', $this->redirectUri); } }