Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer committed Aug 15, 2023
1 parent dfd1439 commit e2fab29
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Credentials/UserRefreshCredentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ class UserRefreshCredentials extends CredentialsLoader implements GetQuotaProjec
*/
public function __construct(

Check failure on line 59 in src/Credentials/UserRefreshCredentials.php

View workflow job for this annotation

GitHub Actions / PHPStan Static Analysis

Method Google\Auth\Credentials\UserRefreshCredentials::__construct() has parameter $targetAudience with no type specified.
$scope,
$jsonKey
$jsonKey,
$targetAudience = null
) {
if (is_string($jsonKey)) {
if (!file_exists($jsonKey)) {
Expand All @@ -84,12 +85,17 @@ public function __construct(
'json key is missing the refresh_token field'
);
}
$additionalClaims = [];
if ($targetAudience) {
$additionalClaims = ['target_audience' => $targetAudience];
}
$this->auth = new OAuth2([
'clientId' => $jsonKey['client_id'],
'clientSecret' => $jsonKey['client_secret'],
'refresh_token' => $jsonKey['refresh_token'],
'scope' => $scope,
'tokenCredentialUri' => self::TOKEN_CREDENTIAL_URI,
'additionalClaims' => $additionalClaims,
]);
if (array_key_exists('quota_project_id', $jsonKey)) {
$this->quotaProject = (string) $jsonKey['quota_project_id'];
Expand Down

0 comments on commit e2fab29

Please sign in to comment.