@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public function getUrl(string $path): string |
38 | 38 | { |
39 | 39 | $object = $this->prefixer->prefixPath($path); |
40 | - return $this->config->getDomain() . '/' . ltrim($object, '/'); |
|
40 | + return $this->config->getDomain().'/'.ltrim($object, '/'); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | if (is_null($expiration)) { |
59 | 59 | $timeout = intval($this->config->get('signature_expires')); |
60 | - }else{ |
|
60 | + } else { |
|
61 | 61 | $timeout = $expiration->getTimestamp() - (new \DateTime())->getTimestamp(); |
62 | 62 | } |
63 | 63 |
@@ -57,7 +57,7 @@ |
||
57 | 57 | |
58 | 58 | if (is_null($expiration)) { |
59 | 59 | $timeout = intval($this->config->get('signature_expires')); |
60 | - }else{ |
|
60 | + } else{ |
|
61 | 61 | $timeout = $expiration->getTimestamp() - (new \DateTime())->getTimestamp(); |
62 | 62 | } |
63 | 63 |
@@ -12,15 +12,15 @@ |
||
12 | 12 | public function boot() |
13 | 13 | { |
14 | 14 | $this->mergeConfigFrom( |
15 | - __DIR__ . '/../config/config.php', |
|
15 | + __DIR__.'/../config/config.php', |
|
16 | 16 | 'filesystems.disks.oss' |
17 | 17 | ); |
18 | 18 | |
19 | 19 | $this->app->make('filesystem') |
20 | - ->extend('oss', function ($app, array $config) { |
|
20 | + ->extend('oss', function($app, array $config) { |
|
21 | 21 | $aliyunConfig = new AliyunConfig($config); |
22 | 22 | |
23 | - $ossClient = new OssClient($aliyunConfig->get('access_key_id'), $aliyunConfig->get('access_key_secret'), $aliyunConfig->getRequestEndpoint(), $aliyunConfig->get('is_cname',false), $aliyunConfig->get('security_token',null), $aliyunConfig->get('request_proxy',null)); |
|
23 | + $ossClient = new OssClient($aliyunConfig->get('access_key_id'), $aliyunConfig->get('access_key_secret'), $aliyunConfig->getRequestEndpoint(), $aliyunConfig->get('is_cname', false), $aliyunConfig->get('security_token', null), $aliyunConfig->get('request_proxy', null)); |
|
24 | 24 | $aliyunConfig->get("use_ssl") && $ossClient->setUseSSL($config["use_ssl"]); |
25 | 25 | $aliyunConfig->get("max_retries") && $ossClient->setMaxTries($config["max_retries"]); |
26 | 26 | $aliyunConfig->get("enable_sts_in_url") && $ossClient->setSignStsInUrl($config["enable_sts_in_url"]); |