From 282bb20cc8c60271e0b3913b938482e902158fae Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 27 Dec 2014 23:00:11 +0000 Subject: [PATCH] Fix docblocks + method name --- src/Grant/RefreshTokenGrant.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Grant/RefreshTokenGrant.php b/src/Grant/RefreshTokenGrant.php index be7dde19..1e11bd85 100644 --- a/src/Grant/RefreshTokenGrant.php +++ b/src/Grant/RefreshTokenGrant.php @@ -66,10 +66,9 @@ class RefreshTokenGrant extends AbstractGrant /** * Set the rotation boolean of the refresh token - * - * @return int + * @param bool $refreshTokenRotate */ - public function setRefreshTokenRotation($refreshTokenRotate) + public function setRefreshTokenRotation($refreshTokenRotate = true) { $this->refreshTokenRotate = $refreshTokenRotate; } @@ -77,9 +76,9 @@ class RefreshTokenGrant extends AbstractGrant /** * Get rotation boolean of the refresh token * - * @return int + * @return bool */ - public function shouldRefreshTokenRotate() + public function shouldRotateRefreshTokens() { return $this->refreshTokenRotate; } @@ -173,7 +172,7 @@ class RefreshTokenGrant extends AbstractGrant $this->server->getTokenType()->setParam('access_token', $newAccessToken->getId()); $this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL()); - if ($this->shouldRefreshTokenRotate()) { + if ($this->shouldRotateRefreshTokens()) { // Expire the old refresh token $oldRefreshToken->expire();