Skip to content

Commit

Permalink
Add whitespace around control blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Sephster committed May 5, 2019
1 parent 9236e84 commit 86869ea
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Grant/AbstractGrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ protected function issueAuthCode(
protected function issueRefreshToken(AccessTokenEntityInterface $accessToken)
{
$refreshToken = $this->refreshTokenRepository->getNewRefreshToken();

if ($refreshToken === null) {
return null;
}
Expand All @@ -485,6 +486,7 @@ protected function issueRefreshToken(AccessTokenEntityInterface $accessToken)
$refreshToken->setAccessToken($accessToken);

$maxGenerationAttempts = self::MAX_RANDOM_TOKEN_GENERATION_ATTEMPTS;

while ($maxGenerationAttempts-- > 0) {
$refreshToken->setIdentifier($this->generateUniqueIdentifier());
try {
Expand Down
1 change: 1 addition & 0 deletions src/Grant/AuthCodeGrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ public function respondToAccessTokenRequest(

// Issue and persist new refresh token if given
$refreshToken = $this->issueRefreshToken($accessToken);

if ($refreshToken !== null) {
$this->getEmitter()->emit(new RequestEvent(RequestEvent::REFRESH_TOKEN_ISSUED, $request));
$responseType->setRefreshToken($refreshToken);
Expand Down
1 change: 1 addition & 0 deletions src/Grant/PasswordGrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public function respondToAccessTokenRequest(

// Issue and persist new refresh token if given
$refreshToken = $this->issueRefreshToken($accessToken);

if ($refreshToken !== null) {
$this->getEmitter()->emit(new RequestEvent(RequestEvent::REFRESH_TOKEN_ISSUED, $request));
$responseType->setRefreshToken($refreshToken);
Expand Down
1 change: 1 addition & 0 deletions src/Grant/RefreshTokenGrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public function respondToAccessTokenRequest(

// Issue and persist new refresh token if given
$refreshToken = $this->issueRefreshToken($accessToken);

if ($refreshToken !== null) {
$this->getEmitter()->emit(new RequestEvent(RequestEvent::REFRESH_TOKEN_ISSUED, $request));
$responseType->setRefreshToken($refreshToken);
Expand Down

0 comments on commit 86869ea

Please sign in to comment.