Skip to content

Commit

Permalink
cs.
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Dec 18, 2023
1 parent b7cd597 commit 7d4fe59
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ObjectClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function deleteObject(string $key, string $versionId = null): Http\Respon

public function deleteObjects(array $body): Http\Response
{
if (key($body) == 'Delete') {
if (array_key_first($body) == 'Delete') {
$body = $body['Delete'];
}

Expand All @@ -74,7 +74,7 @@ public function optionsObject(string $key): Http\Response

public function restoreObject(string $key, array $body, string $versionId = null): Http\Response
{
if (key($body) == 'RestoreRequest') {
if (array_key_first($body) == 'RestoreRequest') {
$body = $body['RestoreRequest'];
}

Expand All @@ -89,7 +89,7 @@ public function restoreObject(string $key, array $body, string $versionId = null

public function selectObjectContents(string $key, array $body): Http\Response
{
if (key($body) == 'SelectRequest') {
if (array_key_first($body) == 'SelectRequest') {
$body = $body['SelectRequest'];
}

Expand All @@ -104,7 +104,7 @@ public function selectObjectContents(string $key, array $body): Http\Response

public function putObjectACL(string $key, array $body, array $headers = []): Http\Response
{
if (key($body) == 'AccessControlPolicy') {
if (array_key_first($body) == 'AccessControlPolicy') {
$body = $body['AccessControlPolicy'];
}

Expand All @@ -128,7 +128,7 @@ public function getObjectACL(string $key): Http\Response

public function putObjectTagging(string $key, array $body, string $versionId = null): Http\Response
{
if (key($body) == 'Tagging') {
if (array_key_first($body) == 'Tagging') {
$body = $body['Tagging'];
}

Expand Down Expand Up @@ -209,7 +209,7 @@ public function copyPart(string $key, int $partNumber, string $uploadId, array $

public function markUploadAsCompleted(string $key, string $uploadId, array $body): Http\Response
{
if (key($body) == 'CompleteMultipartUpload') {
if (array_key_first($body) == 'CompleteMultipartUpload') {
$body = $body['CompleteMultipartUpload'];
}

Expand Down

0 comments on commit 7d4fe59

Please sign in to comment.