Completed
Pull Request — master (#17)
by frey
29:07
created
src/ServiceProvider.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@
 block discarded – undo
30 30
         });
31 31
 
32 32
         Storage::disk('cosv4')
33
-               ->addPlugin(new PutRemoteFile())
34
-               ->addPlugin(new PutRemoteFileAs())
35
-               ->addPlugin(new GetUrl());
33
+                ->addPlugin(new PutRemoteFile())
34
+                ->addPlugin(new PutRemoteFileAs())
35
+                ->addPlugin(new GetUrl());
36 36
     }
37 37
 
38 38
     /**
Please login to merge, or discard this patch.
src/Adapter.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
         try {
80 80
             $response = Cosapi::upload($this->getBucket(), $tmpfname, $path,
81
-                                       null, null, $config->get('insertOnly', 1));
81
+                                        null, null, $config->get('insertOnly', 1));
82 82
 
83 83
             $this->deleteTempFile($tmpfname);
84 84
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $uri = stream_get_meta_data($resource)['uri'];
113 113
 
114 114
         $response = Cosapi::upload($this->getBucket(), $uri, $path,
115
-                                   null, null, $config->get('insertOnly', 1));
115
+                                    null, null, $config->get('insertOnly', 1));
116 116
 
117 117
         $response = $this->normalizeResponse($response);
118 118
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
         try {
142 142
             $response = Cosapi::upload($this->getBucket(), $tmpfname, $path,
143
-                                       null, null, $config->get('insertOnly', 0));
143
+                                        null, null, $config->get('insertOnly', 0));
144 144
 
145 145
             $this->deleteTempFile($tmpfname);
146 146
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         $uri = stream_get_meta_data($resource)['uri'];
175 175
 
176 176
         $response = Cosapi::upload($this->getBucket(), $uri, $path,
177
-                                   null, null, $config->get('insertOnly', 0));
177
+                                    null, null, $config->get('insertOnly', 0));
178 178
 
179 179
         $response = $this->normalizeResponse($response);
180 180
 
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     }
47 47
 
48 48
     /**
49
-     * @return mixed
49
+     * @return string
50 50
      */
51 51
     public function getBucket()
52 52
     {
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     }
55 55
 
56 56
     /**
57
-     * @param $path
57
+     * @param string $path
58 58
      *
59 59
      * @return string
60 60
      */
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
     }
394 394
 
395 395
     /**
396
-     * @param $content
396
+     * @param string $content
397 397
      *
398 398
      * @return string|bool
399 399
      */
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
     }
410 410
 
411 411
     /**
412
-     * @param $tmpfname
412
+     * @param string|boolean $tmpfname
413 413
      *
414 414
      * @return bool
415 415
      */
@@ -423,8 +423,8 @@  discard block
 block discarded – undo
423 423
     }
424 424
 
425 425
     /**
426
-     * @param $path
427
-     * @param $content
426
+     * @param string $path
427
+     * @param string $content
428 428
      *
429 429
      * @return bool
430 430
      */
Please login to merge, or discard this patch.
src/Client/Cosapi.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
      *
608 608
      * @param string $path 待编码路径
609 609
      *
610
-     * @return mixed
610
+     * @return string
611 611
      */
612 612
     private static function cosUrlEncode($path)
613 613
     {
@@ -791,6 +791,10 @@  discard block
 block discarded – undo
791 791
 
792 792
     // Check |$path| is a valid file path.
793 793
     // Return true on success, otherwise return false.
794
+
795
+    /**
796
+     * @param string $path
797
+     */
794 798
     private static function isValidPath($path)
795 799
     {
796 800
         if (strpos($path, '?') !== false) {
Please login to merge, or discard this patch.