Test Failed
Push — master ( fb7a4d...a9e3cd )
by frey
03:47
created
src/Adapter.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -323,9 +323,9 @@  discard block
 block discarded – undo
323 323
         try {
324 324
             if (isset($this->config['read_from_cdn']) && $this->config['read_from_cdn']) {
325 325
                 $response = $this->getHttpClient()
326
-                                 ->get($this->getTemporaryUrl($path, Carbon::now()->addMinutes(5)))
327
-                                 ->getBody()
328
-                                 ->getContents();
326
+                                    ->get($this->getTemporaryUrl($path, Carbon::now()->addMinutes(5)))
327
+                                    ->getBody()
328
+                                    ->getContents();
329 329
             } else {
330 330
                 $response = $this->client->getObject([
331 331
                     'Bucket' => $this->getBucket(),
@@ -364,9 +364,9 @@  discard block
 block discarded – undo
364 364
             $temporaryUrl = $this->getTemporaryUrl($path, Carbon::now()->addMinutes(5));
365 365
 
366 366
             $stream = $this->getHttpClient()
367
-                           ->get($temporaryUrl, ['stream' => true])
368
-                           ->getBody()
369
-                           ->detach();
367
+                            ->get($temporaryUrl, ['stream' => true])
368
+                            ->getBody()
369
+                            ->detach();
370 370
 
371 371
             return ['stream' => $stream];
372 372
         } catch (NoSuchKeyException $e) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
             return true;
252 252
         }
253 253
 
254
-        $keys = array_map(function ($item) {
254
+        $keys = array_map(function($item) {
255 255
             return ['Key' => $item['Key']];
256 256
         }, (array) $response['Contents']);
257 257
 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
                 ])->get('Body');
334 334
             }
335 335
 
336
-            return ['contents' => (string)$response];
336
+            return ['contents' => (string) $response];
337 337
         } catch (NoSuchKeyException $e) {
338 338
             return false;
339 339
         } catch (\GuzzleHttp\Exception\ClientException $e) {
Please login to merge, or discard this patch.
src/ServiceProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,19 +30,19 @@
 block discarded – undo
30 30
         }
31 31
 
32 32
         $this->app->make('filesystem')
33
-                  ->extend('cosv5', function ($app, $config) {
34
-                      $client = new Client($config);
35
-                      $flysystem = new Filesystem(new Adapter($client, $config), $config);
33
+                    ->extend('cosv5', function ($app, $config) {
34
+                        $client = new Client($config);
35
+                        $flysystem = new Filesystem(new Adapter($client, $config), $config);
36 36
 
37
-                      $flysystem->addPlugin(new PutRemoteFile());
38
-                      $flysystem->addPlugin(new PutRemoteFileAs());
39
-                      $flysystem->addPlugin(new GetUrl());
40
-                      $flysystem->addPlugin(new CDN());
41
-                      $flysystem->addPlugin(new TCaptcha());
42
-                      $flysystem->addPlugin(new GetFederationToken());
37
+                        $flysystem->addPlugin(new PutRemoteFile());
38
+                        $flysystem->addPlugin(new PutRemoteFileAs());
39
+                        $flysystem->addPlugin(new GetUrl());
40
+                        $flysystem->addPlugin(new CDN());
41
+                        $flysystem->addPlugin(new TCaptcha());
42
+                        $flysystem->addPlugin(new GetFederationToken());
43 43
 
44
-                      return $flysystem;
45
-                  });
44
+                        return $flysystem;
45
+                    });
46 46
     }
47 47
 
48 48
     /**
Please login to merge, or discard this patch.
src/Plugins/GetFederationToken.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
     {
168 168
         ksort($params);
169 169
 
170
-        $srcStr = 'POSTsts.api.qcloud.com/v2/index.php?' . urldecode(http_build_query($params));
170
+        $srcStr = 'POSTsts.api.qcloud.com/v2/index.php?'.urldecode(http_build_query($params));
171 171
 
172 172
         return base64_encode(hash_hmac('sha1', $srcStr, $this->getCredentials()['secretKey'], true));
173 173
     }
Please login to merge, or discard this patch.
src/Plugins/CDN.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
         $timestamp = dechex($timestamp ?: time());
38 38
 
39 39
         $parsed = parse_url($url);
40
-        $signature = md5($key . $parsed['path'] . $timestamp);
40
+        $signature = md5($key.$parsed['path'].$timestamp);
41 41
         $query = http_build_query(['sign' => $signature, 't' => $timestamp]);
42 42
         $separator = empty($parsed['query']) ? '?' : '&';
43 43
 
44
-        return $url . $separator . $query;
44
+        return $url.$separator.$query;
45 45
     }
46 46
 
47 47
     /**
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     protected function buildFormParams(array $values, $key, $action)
134 134
     {
135
-        $keys = array_map(function ($n) use ($key) {
135
+        $keys = array_map(function($n) use ($key) {
136 136
             return sprintf("{$key}.%d", $n);
137 137
         }, range(0, count($values) - 1));
138 138
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     {
189 189
         ksort($params);
190 190
 
191
-        $srcStr = 'POSTcdn.api.qcloud.com/v2/index.php?' . urldecode(http_build_query($params));
191
+        $srcStr = 'POSTcdn.api.qcloud.com/v2/index.php?'.urldecode(http_build_query($params));
192 192
 
193 193
         return base64_encode(hash_hmac('sha1', $srcStr, $this->getCredentials()['secretKey'], true));
194 194
     }
Please login to merge, or discard this patch.