Completed
Push — master ( efccbe...6bddbc )
by frey
06:07 queued 02:01
created
src/Client/Cosapi.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -800,7 +800,7 @@
 block discarded – undo
800 800
      *
801 801
      * @param string $path 待编码路径
802 802
      *
803
-     * @return mixed
803
+     * @return string
804 804
      */
805 805
     private static function cosUrlEncode($path)
806 806
     {
Please login to merge, or discard this patch.
src/Adapter.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@
 block discarded – undo
259 259
     /**
260 260
      * @param string $path
261 261
      *
262
-     * @return array|bool
262
+     * @return string
263 263
      */
264 264
     public function read($path)
265 265
     {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $this->bucket = $config['bucket'];
40 40
         $this->debug  = $config['debug'];
41 41
 
42
-        $this->setPathPrefix($config['protocol'] . '://' . $config['domain'] . '/');
42
+        $this->setPathPrefix($config['protocol'].'://'.$config['domain'].'/');
43 43
 
44 44
         Cosapi::setTimeout($config['timeout']);
45 45
     }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $response = $this->normalizeResponse($response);
82 82
 
83 83
         if (false !== $response) {
84
-            $this->setContentType($path, $contents);;
84
+            $this->setContentType($path, $contents); ;
85 85
         }
86 86
 
87 87
         return $response;
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function rename($path, $newpath)
172 172
     {
173
-        return (bool)$this->normalizeResponse(
173
+        return (bool) $this->normalizeResponse(
174 174
             Cosapi::move($this->getBucket(), $path, $newpath, 1)
175 175
         );
176 176
     }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         $resource = $this->read($path);
187 187
 
188 188
         return isset($resource['contents'])
189
-            ? (bool)$this->update($newpath, $resource['contents'], new Config()) : false;
189
+            ? (bool) $this->update($newpath, $resource['contents'], new Config()) : false;
190 190
     }
191 191
 
192 192
     /**
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
      */
197 197
     public function delete($path)
198 198
     {
199
-        return (bool)$this->normalizeResponse(
199
+        return (bool) $this->normalizeResponse(
200 200
             Cosapi::delFile($this->getBucket(), $path)
201 201
         );
202 202
     }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      */
209 209
     public function deleteDir($dirname)
210 210
     {
211
-        return (bool)$this->normalizeResponse(
211
+        return (bool) $this->normalizeResponse(
212 212
             Cosapi::delFolder($this->getBucket(), $dirname)
213 213
         );
214 214
     }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         $visibility = ($visibility === AdapterInterface::VISIBILITY_PUBLIC)
238 238
             ? 'eWPrivateRPublic' : 'eWRPrivate';
239 239
 
240
-        return (bool)$this->normalizeResponse(
240
+        return (bool) $this->normalizeResponse(
241 241
             Cosapi::update($this->getBucket(), $path, null, $visibility)
242 242
         );
243 243
     }
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     public function has($path)
251 251
     {
252 252
         try {
253
-            return (bool)$this->getMetadata($path);
253
+            return (bool) $this->getMetadata($path);
254 254
         } catch (RuntimeException $exception) {
255 255
             return false;
256 256
         }
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
         file_put_contents($temporaryPath, $content);
382 382
 
383 383
         // The file is automatically removed when closed, or when the script ends.
384
-        register_shutdown_function(function () use ($temporaryPath) {
384
+        register_shutdown_function(function() use ($temporaryPath) {
385 385
             unlink($temporaryPath);
386 386
         });
387 387
 
Please login to merge, or discard this patch.
src/ServiceProvider.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@
 block discarded – undo
26 26
         }
27 27
 
28 28
         $this->app->make('filesystem')
29
-                  ->extend('cosv3', function ($app, $config) {
30
-                      $flysystem = new Filesystem(new Adapter($config));
31
-                      $flysystem->addPlugin(new PutRemoteFile());
32
-                      $flysystem->addPlugin(new PutRemoteFileAs());
33
-                      $flysystem->addPlugin(new GetUrl());
34
-                      return $flysystem;
35
-                  });
29
+                    ->extend('cosv3', function ($app, $config) {
30
+                        $flysystem = new Filesystem(new Adapter($config));
31
+                        $flysystem->addPlugin(new PutRemoteFile());
32
+                        $flysystem->addPlugin(new PutRemoteFileAs());
33
+                        $flysystem->addPlugin(new GetUrl());
34
+                        return $flysystem;
35
+                    });
36 36
     }
37 37
 
38 38
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         }
27 27
 
28 28
         $this->app->make('filesystem')
29
-                  ->extend('cosv3', function ($app, $config) {
29
+                  ->extend('cosv3', function($app, $config) {
30 30
                       $flysystem = new Filesystem(new Adapter($config));
31 31
                       $flysystem->addPlugin(new PutRemoteFile());
32 32
                       $flysystem->addPlugin(new PutRemoteFileAs());
Please login to merge, or discard this patch.