@@ -565,7 +565,7 @@ |
||
565 | 565 | * @param string $path |
566 | 566 | * @param \DateTimeInterface|int $expiration |
567 | 567 | * @param array $options |
568 | - * @return string |
|
568 | + * @return \OSS\Http\ResponseCore |
|
569 | 569 | * |
570 | 570 | * @throws \RuntimeException |
571 | 571 | */ |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | */ |
279 | 279 | public function deleteDir($dirname) |
280 | 280 | { |
281 | - $dirname = rtrim($this->applyPathPrefix($dirname), '/') . '/'; |
|
281 | + $dirname = rtrim($this->applyPathPrefix($dirname), '/').'/'; |
|
282 | 282 | $dirObjects = $this->listDirObjects($dirname, true); |
283 | 283 | |
284 | 284 | if (count($dirObjects['objects']) > 0) { |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | public function read($path) |
430 | 430 | { |
431 | 431 | $result = $this->readObject($path); |
432 | - $result['contents'] = (string)$result['raw_contents']; |
|
432 | + $result['contents'] = (string) $result['raw_contents']; |
|
433 | 433 | unset($result['raw_contents']); |
434 | 434 | return $result; |
435 | 435 | } |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | $contents = $dirObjects["objects"]; |
459 | 459 | |
460 | 460 | $result = array_map([$this, 'normalizeResponse'], $contents); |
461 | - $result = array_filter($result, function ($value) { |
|
461 | + $result = array_filter($result, function($value) { |
|
462 | 462 | return $value['path'] !== false; |
463 | 463 | }); |
464 | 464 | |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | public function getUrl($path) |
557 | 557 | { |
558 | 558 | // if (!$this->has($path)) throw new FileNotFoundException($path.' not found'); |
559 | - return ($this->ssl ? 'https://' : 'http://') . ($this->isCname ? ($this->cdnDomain == '' ? $this->endPoint : $this->cdnDomain) : $this->bucket . '.' . $this->endPoint) . '/' . ltrim($path, '/'); |
|
559 | + return ($this->ssl ? 'https://' : 'http://').($this->isCname ? ($this->cdnDomain == '' ? $this->endPoint : $this->cdnDomain) : $this->bucket.'.'.$this->endPoint).'/'.ltrim($path, '/'); |
|
560 | 560 | } |
561 | 561 | |
562 | 562 | /** |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | protected function logErr($func, $e) |
681 | 681 | { |
682 | 682 | if ($this->debug) { |
683 | - Log::error($func . ": FAILED"); |
|
683 | + Log::error($func.": FAILED"); |
|
684 | 684 | Log::error($e->getMessage()); |
685 | 685 | } |
686 | 686 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | { |
25 | 25 | if ($this->app->runningInConsole()) { |
26 | 26 | $this->publishes([ |
27 | - __DIR__ . '/config/config.php' => config_path('aliyun-oss.php'), |
|
27 | + __DIR__.'/config/config.php' => config_path('aliyun-oss.php'), |
|
28 | 28 | ], 'config'); |
29 | 29 | } |
30 | 30 | $this->mergeConfigFrom( |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | ); |
34 | 34 | |
35 | 35 | $this->app->make('filesystem') |
36 | - ->extend('aliyun', function ($app, array $config) { |
|
36 | + ->extend('aliyun', function($app, array $config) { |
|
37 | 37 | $config = $app->make(AliyunOssConfig::class, ['config' => $config]); |
38 | 38 | $client = $app->get(OssClient::class); |
39 | 39 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | public function register() |
50 | 50 | { |
51 | - $this->app->singleton(AliyunOssConfig::class, function ($app, $params = []) { |
|
51 | + $this->app->singleton(AliyunOssConfig::class, function($app, $params = []) { |
|
52 | 52 | if (isset($params['config'])) { |
53 | 53 | $config = $params['config']; |
54 | 54 | } else { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | return $ossConfig; |
60 | 60 | }); |
61 | 61 | |
62 | - $this->app->singleton(OssClient::class, function ($app) { |
|
62 | + $this->app->singleton(OssClient::class, function($app) { |
|
63 | 63 | $ossConfig = $app->get(AliyunOssConfig::class); |
64 | 64 | $ossClient = new OssClient( |
65 | 65 | $ossConfig->getAccessId(), |