Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 230b26e

Browse files
committed
:octocat: make PHPStorm stop yelling
1 parent 4dc077f commit 230b26e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/OAuthTestSessionStorage.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,20 @@ public function storeAccessToken(string $service, AccessToken $token):bool{
5656
public function getAccessToken(string $service):AccessToken{
5757

5858
if($this->hasAccessToken($service)){
59-
return (new AccessToken)->fromJSON($_SESSION[$this->sessionVar][$service]);
59+
60+
/** @var \chillerlan\OAuth\Core\AccessToken $token */
61+
$token = (new AccessToken)->fromJSON($_SESSION[$this->sessionVar][$service]);
62+
63+
return $token;
6064
}
6165

6266
$tokenfile = $this->storagepath.'/'.$service.'.token.json';
6367
if(file_exists($tokenfile)){
64-
return (new AccessToken)->fromJSON(file_get_contents($tokenfile));
68+
69+
/** @var \chillerlan\OAuth\Core\AccessToken $token */
70+
$token = (new AccessToken)->fromJSON(file_get_contents($tokenfile));
71+
72+
return $token;
6573
}
6674

6775
throw new OAuthStorageException('token not found');

0 commit comments

Comments
 (0)