Skip to content

Commit 6b959aa

Browse files
committed
Fixed formatting issues
1 parent f276eda commit 6b959aa

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

auth/src/auth_http_explicit.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ function auth_http_explicit($projectId, $serviceAccountPath)
4848
]);
4949

5050
# Make an authenticated API request (listing storage buckets)
51-
$response = $http_client->request('GET', 'b', ['query' =>['project'=>$projectId]]);
52-
$body_content = json_decode($response->getBody());
51+
$query = ['project' => $projectId];
52+
$response = $http_client->request('GET', 'b', [
53+
'query' => $query
54+
]);
55+
$body_content = json_decode((string) $response->getBody());
5356
foreach ($body_content->items as $item) {
5457
$bucket = $item->id;
5558
printf('Bucket: %s' . PHP_EOL, $bucket);

auth/src/auth_http_implicit.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ function auth_http_implicit($projectId)
4545
]);
4646

4747
# Make an authenticated API request (listing storage buckets)
48-
$response = $http_client->request('GET', 'b', ['query' =>['project'=>$projectId]]);
49-
$body_content = json_decode($response->getBody());
48+
$query = ['project' => $projectId];
49+
$response = $http_client->request('GET', 'b', [
50+
'query' => $query
51+
]);
52+
$body_content = json_decode((string) $response->getBody());
5053
foreach ($body_content->items as $item) {
5154
$bucket = $item->id;
5255
printf('Bucket: %s' . PHP_EOL, $bucket);

0 commit comments

Comments
 (0)