File tree 2 files changed +9
-6
lines changed
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ before_script:
14
14
15
15
script :
16
16
- mkdir -p build/logs
17
- - php vendor/bin/phpunit
17
+ - php vendor/bin/phpunit
18
18
19
19
after_script :
20
20
- php vendor/bin/coveralls -v
Original file line number Diff line number Diff line change @@ -92,15 +92,18 @@ protected function httpClient()
92
92
*/
93
93
protected function initHttpClient ()
94
94
{
95
-
96
95
// Middleware
97
96
$ obj_stack = HandlerStack::create ();
98
- $ obj_stack ->push (ApplicationDefaultCredentials::getMiddleware (['https://www.googleapis.com/auth/datastore ' ]));
99
97
100
98
$ str_base_url = self ::DEFAULT_BASE_URL ;
101
99
102
- if (getenv ("DATASTORE_EMULATOR_HOST " ) !== FALSE ) {
103
- $ str_base_url = getenv ("DATASTORE_EMULATOR_HOST " );
100
+ $ str_emulator_url = getenv ("DATASTORE_EMULATOR_HOST " );
101
+ if (false !== $ str_emulator_url ) {
102
+ $ str_base_url = $ str_emulator_url ;
103
+ } else {
104
+ $ obj_stack ->push (
105
+ ApplicationDefaultCredentials::getMiddleware (['https://www.googleapis.com/auth/datastore ' ])
106
+ );
104
107
}
105
108
106
109
// Create the HTTP client
@@ -508,4 +511,4 @@ private function actionUrl($str_action)
508
511
return $ this ->getBaseUrl () . '/v1/projects/ ' . $ this ->str_dataset_id . ': ' . $ str_action ;
509
512
}
510
513
511
- }
514
+ }
You can’t perform that action at this time.
0 commit comments