diff --git a/autoload.php b/autoload.php deleted file mode 100644 index b12b45e43..000000000 --- a/autoload.php +++ /dev/null @@ -1,34 +0,0 @@ - 3) { - // Maximum class file path depth in this project is 3. - $classPath = array_slice($classPath, 0, 3); - } - $filePath = dirname(__FILE__) . '/src/' . implode('/', $classPath) . '.php'; - if (file_exists($filePath)) { - require_once $filePath; - } -} - -spl_autoload_register('oauth2client_php_autoload'); diff --git a/src/Auth/Credentials/ComputeCredentials.php b/src/Auth/Credentials/ComputeCredentials.php index a6c8105f4..76bbca95d 100644 --- a/src/Auth/Credentials/ComputeCredentials.php +++ b/src/Auth/Credentials/ComputeCredentials.php @@ -117,14 +117,19 @@ class ComputeCredentials implements private $jwtClient; /** - * @param array $options - * @param array|string $options.scope the scope of the access request, - * expressed either as an array or as a space-delimited string. - * @param string $options.targetAudience The audience for the ID token. - * @param string $options.quotaProject Specifies a project to bill for access - * charges associated with the request. - * @param string $options.serviceAccountIdentity [optional] Specify a service - * account identity name to use instead of "default". + * @param array $options + * @param array|string $options.scope the scope of the access request, + * expressed either as an array or as a space-delimited string. + * @param string $options.targetAudience The audience for the ID token. + * @param string $options.quotaProject Specifies a project to bill for access + * charges associated with the request. + * @param string $options.serviceAccountIdentity [optional] Specify a service + * account identity name to use instead of "default". + * @param HttpClientInterface $options.httpClient + * @param JwtClientInterface $options.jwtClient + * @param CacheItemPoolInterface $options.cache + * @param string $options.cachePrefix + * @param int $options.cacheLifetime */ public function __construct(array $options = []) { diff --git a/src/Auth/Credentials/ServiceAccountCredentials.php b/src/Auth/Credentials/ServiceAccountCredentials.php index 6ab53c9e7..2c0177a1d 100644 --- a/src/Auth/Credentials/ServiceAccountCredentials.php +++ b/src/Auth/Credentials/ServiceAccountCredentials.php @@ -90,15 +90,19 @@ class ServiceAccountCredentials implements /** * Create a new ServiceAccountCredentials. * - * @param array|string $jsonKey JSON credential file path or JSON - * credentials in associative array - * @param array $options - * @param array|string $options.scope the scope of the access request, expressed - * as an array or as a space-delimited string - * @param string $options.subject an email address account to impersonate, in - * situations when the service account has been delegated domain - * wide access - * @param string $options.targetAudience The audience for the ID token. + * @param array|string $jsonKey JSON credential file path or JSON + * credentials in associative array + * @param array $options + * @param array|string $options.scope the scope of the access request, expressed + * as an array or as a space-delimited string + * @param string $options.subject an email address account to impersonate, in + * situations when the service account has been delegated domain + * wide access + * @param string $options.targetAudience The audience for the ID token. + * @param HttpClientInterface $options.httpClient + * @param CacheItemPoolInterface $options.cache + * @param string $options.cachePrefix + * @param int $options.cacheLifetime */ public function __construct($jsonKey, array $options = []) { diff --git a/src/Auth/Credentials/ServiceAccountJwtAccessCredentials.php b/src/Auth/Credentials/ServiceAccountJwtAccessCredentials.php index 8f0b6c2f7..cc6c18b03 100644 --- a/src/Auth/Credentials/ServiceAccountJwtAccessCredentials.php +++ b/src/Auth/Credentials/ServiceAccountJwtAccessCredentials.php @@ -58,8 +58,14 @@ class ServiceAccountJwtAccessCredentials implements /** * Create a new ServiceAccountJwtAccessCredentials. * - * @param array|string $jsonKey JSON credential file path or JSON credentials - * as an associative array + * @param array|string $jsonKey JSON credential file path or JSON credentials + * as an associative array + * @param array $options + * @param string $options.audience + * @param HttpClientInterface $options.httpClient + * @param CacheItemPoolInterface $options.cache + * @param string $options.cachePrefix + * @param int $options.cacheLifetime */ public function __construct($jsonKey, array $options = []) { diff --git a/src/Auth/Credentials/UserRefreshCredentials.php b/src/Auth/Credentials/UserRefreshCredentials.php index 4de2403ee..a92b7edaf 100644 --- a/src/Auth/Credentials/UserRefreshCredentials.php +++ b/src/Auth/Credentials/UserRefreshCredentials.php @@ -51,9 +51,14 @@ class UserRefreshCredentials implements CredentialsInterface /** * Create a new UserRefreshCredentials. * - * @param array $jsonKey JSON credential as an associative array - * @param array|string $scope the scope of the access request, expressed - * either as an Array or as a space-delimited String + * @param array $jsonKey JSON credential as an associative array + * @param array $options + * @param array $options.scope the scope of the access request, expressed + * either as an Array or as a space-delimited String + * @param HttpClientInterface $options.httpClient + * @param CacheItemPoolInterface $options.cache + * @param string $options.cachePrefix + * @param int $options.cacheLifetime */ public function __construct($jsonKey, array $options = []) { diff --git a/src/Auth/GoogleAuth.php b/src/Auth/GoogleAuth.php index c3c94b310..58cf1127a 100644 --- a/src/Auth/GoogleAuth.php +++ b/src/Auth/GoogleAuth.php @@ -96,7 +96,6 @@ class GoogleAuth * provided if you have one already available for use. * @param int $options.cacheLifetime * @param string $options.cachePrefix - * } */ public function __construct(array $options = []) { diff --git a/tests/Auth/Credentials/CredentialsTraitTest.php b/tests/Auth/Credentials/CredentialsTraitTest.php index ff8c172e7..7f1dba3b3 100644 --- a/tests/Auth/Credentials/CredentialsTraitTest.php +++ b/tests/Auth/Credentials/CredentialsTraitTest.php @@ -342,7 +342,7 @@ private function fetchAuthTokenNoCache(): array return $this->token; } - private function getCacheKey() + private function getCacheKey(): string { return $this->key; }