Skip to content

Commit

Permalink
Fix php static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
yash30201 committed Dec 27, 2023
1 parent 88db421 commit 0170d85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Credentials/GCECredentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,20 +449,20 @@ public function getCacheKey()
}

/**
* @return array{access_token:string,expires_at:int}|null
* @return array{access_token:string,expires_at:int}|array{id_token:string}|null
*/
public function getLastReceivedToken()
{
if ($this->lastReceivedToken) {
if (array_key_exists('id_token', $this->lastReceivedToken)) {
return [
'id_token' => $this->lastReceivedToken['id_token'],
'id_token' => $this->lastReceivedToken['id_token']
];
}

return [
'access_token' => $this->lastReceivedToken['access_token'],
'expires_at' => $this->lastReceivedToken['expires_at'],
'expires_at' => $this->lastReceivedToken['expires_at']
];
}

Expand Down

0 comments on commit 0170d85

Please sign in to comment.