Passed
Pull Request — master (#54)
by
unknown
02:04
created
src/Flysystem/Oss/Plugins/Verify.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@
 block discarded – undo
56 56
         $path = $_SERVER['REQUEST_URI'];
57 57
         $pos  = strpos($path, '?');
58 58
         if (false === $pos) {
59
-            $authStr = urldecode($path) . "\n" . $body;
59
+            $authStr = urldecode($path)."\n".$body;
60 60
         } else {
61
-            $authStr = urldecode(substr($path, 0, $pos)) . substr($path, $pos, strlen($path) - $pos) . "\n" . $body;
61
+            $authStr = urldecode(substr($path, 0, $pos)).substr($path, $pos, strlen($path) - $pos)."\n".$body;
62 62
         }
63 63
         // 验证签名
64 64
         $ok = openssl_verify($authStr, $authorization, $pubKey, OPENSSL_ALGO_MD5);
Please login to merge, or discard this patch.
src/Flysystem/Oss/OssAdapter.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -182,12 +182,12 @@  discard block
 block discarded – undo
182 182
         $data        = [];
183 183
         if (!empty($customData)) {
184 184
             foreach ($customData as $key => $value) {
185
-                $callbackVar['x:' . $key] = $value;
186
-                $data[$key]               = '${x:' . $key . '}';
185
+                $callbackVar['x:'.$key] = $value;
186
+                $data[$key]               = '${x:'.$key.'}';
187 187
             }
188 188
         }
189 189
 
190
-        $callbackParam      = [
190
+        $callbackParam = [
191 191
             'callbackUrl'      => $callBackUrl,
192 192
             'callbackBody'     => urldecode(http_build_query(array_merge($system, $data))),
193 193
             'callbackBodyType' => 'application/x-www-form-urlencoded',
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         $expiration = $this->gmt_iso8601($end);
201 201
 
202 202
         // 最大文件大小.用户可以自己设置
203
-        $condition    = [
203
+        $condition = [
204 204
             0 => 'content-length-range',
205 205
             1 => 0,
206 206
             2 => $contentLengthRangeValue,
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
         $response['expire']       = $end;
232 232
         $response['callback']     = $base64CallbackBody;
233 233
         $response['callback-var'] = $callbackVar;
234
-        $response['dir']          = $prefix;  // 这个参数是设置用户上传文件时指定的前缀。
234
+        $response['dir']          = $prefix; // 这个参数是设置用户上传文件时指定的前缀。
235 235
 
236 236
         return json_encode($response);
237 237
     }
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
      */
408 408
     public function createDir(string $dirname, Config $config)
409 409
     {
410
-        $defaultFile = trim($dirname, '/') . '/oss.txt';
410
+        $defaultFile = trim($dirname, '/').'/oss.txt';
411 411
 
412 412
         return $this->write($defaultFile, '当虚拟目录下有其他文件时,可删除此文件~', $config);
413 413
     }
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
     {
454 454
         $path = $this->applyPathPrefix($path);
455 455
 
456
-        return $this->normalizeHost() . ltrim($path, '/');
456
+        return $this->normalizeHost().ltrim($path, '/');
457 457
     }
458 458
 
459 459
     /**
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
                 $domain = $this->endpoint;
576 576
             }
577 577
         } else {
578
-            $domain = $this->bucket . '.' . $this->endpoint;
578
+            $domain = $this->bucket.'.'.$this->endpoint;
579 579
         }
580 580
 
581 581
         if ($this->useSSL) {
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
             $domain = "http://{$domain}";
585 585
         }
586 586
 
587
-        return rtrim($domain, '/') . '/';
587
+        return rtrim($domain, '/').'/';
588 588
     }
589 589
 
590 590
     /**
Please login to merge, or discard this patch.
src/Flysystem/Oss/OssStorageServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public function boot()
27 27
     {
28
-        app('filesystem')->extend('oss', function ($app, $config) {
28
+        app('filesystem')->extend('oss', function($app, $config) {
29 29
             $root    = $config['root'] ?? null;
30 30
             $buckets = isset($config['buckets']) ? $config['buckets'] : [];
31 31
             $cdnHost = isset($config['cdnHost']) ? $config['cdnHost'] : '';
Please login to merge, or discard this patch.