@@ -29,7 +29,7 @@ |
||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | $this->app->make('filesystem') |
| 32 | - ->extend('cosv5', function ($app, $config) { |
|
| 32 | + ->extend('cosv5', function($app, $config) { |
|
| 33 | 33 | $client = new Client($config); |
| 34 | 34 | $flysystem = new Filesystem(new Adapter($client, $config), $config); |
| 35 | 35 | |
@@ -31,20 +31,20 @@ |
||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | $this->app->make('filesystem') |
| 34 | - ->extend('cosv5', function ($app, $config) { |
|
| 35 | - $client = new Client($config); |
|
| 36 | - $flysystem = new Filesystem(new Adapter($client, $config), $config); |
|
| 34 | + ->extend('cosv5', function ($app, $config) { |
|
| 35 | + $client = new Client($config); |
|
| 36 | + $flysystem = new Filesystem(new Adapter($client, $config), $config); |
|
| 37 | 37 | |
| 38 | - $flysystem->addPlugin(new PutRemoteFile()); |
|
| 39 | - $flysystem->addPlugin(new PutRemoteFileAs()); |
|
| 40 | - $flysystem->addPlugin(new GetUrl()); |
|
| 41 | - $flysystem->addPlugin(new CDN()); |
|
| 42 | - $flysystem->addPlugin(new TCaptcha()); |
|
| 43 | - $flysystem->addPlugin(new GetFederationToken()); |
|
| 44 | - $flysystem->addPlugin(new GetFederationTokenV3()); |
|
| 38 | + $flysystem->addPlugin(new PutRemoteFile()); |
|
| 39 | + $flysystem->addPlugin(new PutRemoteFileAs()); |
|
| 40 | + $flysystem->addPlugin(new GetUrl()); |
|
| 41 | + $flysystem->addPlugin(new CDN()); |
|
| 42 | + $flysystem->addPlugin(new TCaptcha()); |
|
| 43 | + $flysystem->addPlugin(new GetFederationToken()); |
|
| 44 | + $flysystem->addPlugin(new GetFederationTokenV3()); |
|
| 45 | 45 | |
| 46 | - return $flysystem; |
|
| 47 | - }); |
|
| 46 | + return $flysystem; |
|
| 47 | + }); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | */ |
| 132 | 132 | protected function buildFormParams(array $values, $key, $action) |
| 133 | 133 | { |
| 134 | - $keys = array_map(function ($n) use ($key) { |
|
| 134 | + $keys = array_map(function($n) use ($key) { |
|
| 135 | 135 | return sprintf("{$key}.%d", $n); |
| 136 | 136 | }, range(0, count($values) - 1)); |
| 137 | 137 | |
@@ -406,9 +406,9 @@ |
||
| 406 | 406 | $temporaryUrl = $this->getTemporaryUrl($path, Carbon::now()->addMinutes(5)); |
| 407 | 407 | |
| 408 | 408 | $stream = $this->getHttpClient() |
| 409 | - ->get($temporaryUrl, ['stream' => true]) |
|
| 410 | - ->getBody() |
|
| 411 | - ->detach(); |
|
| 409 | + ->get($temporaryUrl, ['stream' => true]) |
|
| 410 | + ->getBody() |
|
| 411 | + ->detach(); |
|
| 412 | 412 | |
| 413 | 413 | return ['stream' => $stream]; |
| 414 | 414 | } catch (NoSuchKeyException $e) { |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | '%s Credential=%s/%s, SignedHeaders=%s, Signature=%s', |
| 182 | 182 | 'TC3-HMAC-SHA256', |
| 183 | 183 | $this->getCredentials()['secretId'], |
| 184 | - date('Y-m-d', $timestamp) . '/sts/tc3_request', |
|
| 184 | + date('Y-m-d', $timestamp).'/sts/tc3_request', |
|
| 185 | 185 | 'content-type;host', |
| 186 | 186 | hash_hmac( |
| 187 | 187 | 'SHA256', |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | return hash_hmac('SHA256', 'tc3_request', |
| 202 | 202 | hash_hmac('SHA256', 'sts', |
| 203 | 203 | hash_hmac('SHA256', date('Y-m-d', $timestamp), |
| 204 | - 'TC3' . $this->getCredentials()['secretKey'], true |
|
| 204 | + 'TC3'.$this->getCredentials()['secretKey'], true |
|
| 205 | 205 | ), true |
| 206 | 206 | ), true |
| 207 | 207 | ); |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | return implode("\n", [ |
| 240 | 240 | 'TC3-HMAC-SHA256', |
| 241 | 241 | $timestamp, |
| 242 | - date('Y-m-d', $timestamp) . '/sts/tc3_request', |
|
| 242 | + date('Y-m-d', $timestamp).'/sts/tc3_request', |
|
| 243 | 243 | hash('SHA256', $this->getCanonicalRequest($args)), |
| 244 | 244 | ]); |
| 245 | 245 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | $adapter = $this->filesystem->getAdapter(); |
| 30 | 30 | |
| 31 | - $url = 'https://' . $adapter->getPicturePath($objectKey) . '?image_process'; |
|
| 31 | + $url = 'https://'.$adapter->getPicturePath($objectKey).'?image_process'; |
|
| 32 | 32 | |
| 33 | 33 | $response = $adapter->getHttpClient()->post($url, [ |
| 34 | 34 | 'http_errors' => false, |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $result = null; |
| 81 | 81 | |
| 82 | 82 | if (is_object($obj)) { |
| 83 | - $obj = (array)$obj; |
|
| 83 | + $obj = (array) $obj; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | if (is_array($obj)) { |