Skip to content
This repository was archived by the owner on Oct 29, 2023. It is now read-only.

Commit 36ccd54

Browse files
committed
fix format
1 parent a56e309 commit 36ccd54

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Api.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function createToken(string $email, string $password, array $options = []
4343
return $this->client->safePost(
4444
'/api/auth/token',
4545
\array_merge($body, $options),
46-
);
46+
)['data'] ?? [];
4747
}
4848

4949
/**
@@ -63,7 +63,7 @@ public function createBucket(string $name): array
6363
return $this->client->safePost(
6464
'/api/bucket',
6565
\compact('name'),
66-
);
66+
)['data'] ?? [];
6767
}
6868

6969
/**
@@ -72,7 +72,7 @@ public function createBucket(string $name): array
7272
*/
7373
public function showBucket(string $name): array
7474
{
75-
return $this->client->safeGet(\sprintf('/api/bucket/%s', $name));
75+
return $this->client->safeGet(\sprintf('/api/bucket/%s', $name))['data'] ?? [];
7676
}
7777

7878
/**
@@ -129,7 +129,7 @@ public function createView(string $bucket, array $props): array
129129
return $this->client->safePost(
130130
\sprintf('/api/bucket/%s/view', $bucket),
131131
$props,
132-
);
132+
)['data'] ?? [];
133133
}
134134

135135
/**
@@ -141,7 +141,7 @@ public function showView(string $bucket, string $view): array
141141
{
142142
return $this->client->safeGet(
143143
\sprintf('/api/bucket/%s/view/%s', $bucket, $view),
144-
);
144+
)['data'] ?? [];
145145
}
146146

147147
/**
@@ -227,7 +227,7 @@ public function showFile(string $bucket, string $route): array
227227
{
228228
return $this->client->safeGet(
229229
\sprintf('/api/bucket/%s/file/%s', $bucket, $route)
230-
);
230+
)['data'] ?? [];
231231
}
232232

233233
/**
@@ -241,7 +241,7 @@ public function visibilityFile(string $bucket, string $route, bool $visibility):
241241
return $this->client->safePatch(
242242
\sprintf('/api/bucket/%s/file/%s', $bucket, $route),
243243
['visibility' => $visibility],
244-
);
244+
)['data'] ?? [];
245245
}
246246

247247
/**
@@ -291,7 +291,7 @@ public function inviteFile(string $bucket, string $route): array
291291
{
292292
return $this->client->safePost(
293293
\sprintf('/api/bucket/%s/invite/%d', $bucket, $route),
294-
);
294+
)['data'] ?? [];
295295
}
296296

297297
}

0 commit comments

Comments
 (0)