@@ -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 | |
@@ -32,21 +32,21 @@ |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | $this->app->make('filesystem') |
| 35 | - ->extend('cosv5', function ($app, $config) { |
|
| 36 | - $client = new Client($config); |
|
| 37 | - $flysystem = new Filesystem(new Adapter($client, $config), $config); |
|
| 35 | + ->extend('cosv5', function ($app, $config) { |
|
| 36 | + $client = new Client($config); |
|
| 37 | + $flysystem = new Filesystem(new Adapter($client, $config), $config); |
|
| 38 | 38 | |
| 39 | - $flysystem->addPlugin(new PutRemoteFile()); |
|
| 40 | - $flysystem->addPlugin(new PutRemoteFileAs()); |
|
| 41 | - $flysystem->addPlugin(new GetUrl()); |
|
| 42 | - $flysystem->addPlugin(new CDN()); |
|
| 43 | - $flysystem->addPlugin(new TCaptcha()); |
|
| 44 | - $flysystem->addPlugin(new GetFederationToken()); |
|
| 45 | - $flysystem->addPlugin(new GetFederationTokenV3()); |
|
| 46 | - $flysystem->addPlugin(new CloudInfinite()); |
|
| 39 | + $flysystem->addPlugin(new PutRemoteFile()); |
|
| 40 | + $flysystem->addPlugin(new PutRemoteFileAs()); |
|
| 41 | + $flysystem->addPlugin(new GetUrl()); |
|
| 42 | + $flysystem->addPlugin(new CDN()); |
|
| 43 | + $flysystem->addPlugin(new TCaptcha()); |
|
| 44 | + $flysystem->addPlugin(new GetFederationToken()); |
|
| 45 | + $flysystem->addPlugin(new GetFederationTokenV3()); |
|
| 46 | + $flysystem->addPlugin(new CloudInfinite()); |
|
| 47 | 47 | |
| 48 | - return $flysystem; |
|
| 49 | - }); |
|
| 48 | + return $flysystem; |
|
| 49 | + }); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -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 | |
@@ -436,9 +436,9 @@ |
||
| 436 | 436 | $temporaryUrl = $this->getTemporaryUrl($path, Carbon::now()->addMinutes(5)); |
| 437 | 437 | |
| 438 | 438 | $stream = $this->getHttpClient() |
| 439 | - ->get($temporaryUrl, ['stream' => true]) |
|
| 440 | - ->getBody() |
|
| 441 | - ->detach(); |
|
| 439 | + ->get($temporaryUrl, ['stream' => true]) |
|
| 440 | + ->getBody() |
|
| 441 | + ->detach(); |
|
| 442 | 442 | |
| 443 | 443 | return ['stream' => $stream]; |
| 444 | 444 | } catch (ServiceResponseException $e) { |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | '%s Credential=%s/%s, SignedHeaders=%s, Signature=%s', |
| 94 | 94 | 'TC3-HMAC-SHA256', |
| 95 | 95 | $this->getCredentials()['secretId'], |
| 96 | - date('Y-m-d', $timestamp) . "/{$service}/tc3_request", |
|
| 96 | + date('Y-m-d', $timestamp)."/{$service}/tc3_request", |
|
| 97 | 97 | 'content-type;host', |
| 98 | 98 | hash_hmac( |
| 99 | 99 | 'SHA256', |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $secretDate = hash_hmac( |
| 115 | 115 | 'SHA256', |
| 116 | 116 | date('Y-m-d', $timestamp), |
| 117 | - 'TC3' . $this->getCredentials()['secretKey'], |
|
| 117 | + 'TC3'.$this->getCredentials()['secretKey'], |
|
| 118 | 118 | true |
| 119 | 119 | ); |
| 120 | 120 | $secretService = hash_hmac('SHA256', $service, $secretDate, true); |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | return implode("\n", [ |
| 154 | 154 | 'TC3-HMAC-SHA256', |
| 155 | 155 | $timestamp, |
| 156 | - date('Y-m-d', $timestamp) . "/{$service}/tc3_request", |
|
| 156 | + date('Y-m-d', $timestamp)."/{$service}/tc3_request", |
|
| 157 | 157 | hash('SHA256', $this->getCanonicalRequest($service, $body)), |
| 158 | 158 | ]); |
| 159 | 159 | } |