diff --git a/src/Service/GoogleApiClientService.php b/src/Service/GoogleApiClientService.php index 92e6899ad59ea497dd994c9d45e6086bde946198..e5805252b280da32015fbcf81ec9b5b1464b603b 100644 --- a/src/Service/GoogleApiClientService.php +++ b/src/Service/GoogleApiClientService.php @@ -102,7 +102,7 @@ class GoogleApiClientService { * * @param \Drupal\google_api_client\GoogleApiClientInterface $google_api_client * Pass completely loaded GoogleApiClient object. - * @param \Google_Client $googleClient + * @param \Google_Client|NULL $googleClient * Optionally parameter for developers who want to set initial * google client object. * @@ -120,7 +120,7 @@ class GoogleApiClientService { * Developers can pass the google_api_client object to setGoogleApiClient * and get the api client ready for operations. * - * @param \Google_Client $client + * @param \Google_Client|NULL $client * Optionally parameter for developers who want to set initial * google client object. * @@ -129,7 +129,7 @@ class GoogleApiClientService { * * @throws \Drupal\Core\Entity\EntityStorageException */ - private function getClient(Google_Client $client) { + private function getClient(Google_Client $client = NULL) { if (!google_api_client_load_library()) { // We don't have library installed notify admin and abort. $status_report_link = Link::createFromRoute($this->t('Status Report'), 'system.status')->toString(); diff --git a/src/Service/GoogleApiServiceClientService.php b/src/Service/GoogleApiServiceClientService.php index aa76f5560bc857a81d0cc4c35bfb494a7ef5bb46..35eb0d1d1549a02e404fd5cdd99ee7b59ab68c2f 100644 --- a/src/Service/GoogleApiServiceClientService.php +++ b/src/Service/GoogleApiServiceClientService.php @@ -91,7 +91,7 @@ class GoogleApiServiceClientService { * * @param \Drupal\google_api_client\GoogleApiServiceClientInterface $google_api_client * Pass completely loaded GoogleApiClient object. - * @param \Google_Client $googleClient + * @param \Google_Client|NULL $googleClient * Optionally parameter for developers who want to set initial * google client object. * @@ -109,7 +109,7 @@ class GoogleApiServiceClientService { * Developers can pass the google_api_client object to setGoogleApiClient * and get the api client ready for operations. * - * @param \Google_Client $client + * @param \Google_Client|NULL $client * Optionally parameter for developers who want to set initial * google client object. * @@ -120,7 +120,7 @@ class GoogleApiServiceClientService { * Google Exception if any api function fails and * EntityStorage Exception if entity save fails. */ - private function getClient(Google_Client $client) { + private function getClient(Google_Client $client = NULL) { if (!google_api_client_load_library()) { // We don't have library installed notify admin and abort. $status_report_link = Link::createFromRoute($this->t('Status Report'), 'system.status')->toString();