Skip to content

Commit

Permalink
Nit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yash30201 committed Jan 3, 2024
1 parent 6765476 commit c22fc3a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Credentials/GCECredentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,7 @@ public function fetchAuthToken(callable $httpHandler = null)
$response = $this->getFromMetadata($httpHandler, $this->tokenUri);

if ($this->targetAudience) {
$this->lastReceivedToken = ['id_token' => $response];
return $this->lastReceivedToken;
return $this->lastReceivedToken = ['id_token' => $response];;
}

if (null === $json = json_decode($response, true)) {
Expand Down Expand Up @@ -455,9 +454,7 @@ public function getLastReceivedToken()
{
if ($this->lastReceivedToken) {
if (array_key_exists('id_token', $this->lastReceivedToken)) {
return [
'id_token' => $this->lastReceivedToken['id_token']
];
return $this->lastReceivedToken;
}

return [
Expand Down

0 comments on commit c22fc3a

Please sign in to comment.