@@ -37,6 +37,6 @@ |
||
37 | 37 | // Get file stream from remote url |
38 | 38 | $resource = fopen($remoteUrl, 'r'); |
39 | 39 | |
40 | - return (bool)$this->filesystem->getAdapter()->writeStream($path, $resource, $config); |
|
40 | + return (bool) $this->filesystem->getAdapter()->writeStream($path, $resource, $config); |
|
41 | 41 | } |
42 | 42 | } |
@@ -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 | */ |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | public function getUrl($path) |
92 | 92 | { |
93 | 93 | // if (!$this->has($path)) throw new FileNotFoundException($path.' not found'); |
94 | - return ($this->ssl ? 'https://' : 'http://') . ($this->isCname ? ($this->cdnDomain == '' ? $this->endPoint : $this->cdnDomain) : $this->bucket . '.' . $this->endPoint) . '/' . ltrim($path, '/'); |
|
94 | + return ($this->ssl ? 'https://' : 'http://').($this->isCname ? ($this->cdnDomain == '' ? $this->endPoint : $this->cdnDomain) : $this->bucket.'.'.$this->endPoint).'/'.ltrim($path, '/'); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | protected function logErr($func, $e) |
312 | 312 | { |
313 | 313 | if ($this->debug) { |
314 | - Log::error($func . ": FAILED"); |
|
314 | + Log::error($func.": FAILED"); |
|
315 | 315 | Log::error($e->getMessage()); |
316 | 316 | } |
317 | 317 | } |
@@ -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(), |
@@ -112,6 +112,7 @@ |
||
112 | 112 | |
113 | 113 | /** |
114 | 114 | * {@inheritdoc} |
115 | + * @param string $path |
|
115 | 116 | */ |
116 | 117 | public function getVisibility($path) |
117 | 118 | { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public function read($path) |
26 | 26 | { |
27 | 27 | $result = $this->readObject($path); |
28 | - $result['contents'] = (string)$result['raw_contents']; |
|
28 | + $result['contents'] = (string) $result['raw_contents']; |
|
29 | 29 | unset($result['raw_contents']); |
30 | 30 | return $result; |
31 | 31 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $contents = $dirObjects["objects"]; |
55 | 55 | |
56 | 56 | $result = array_map([$this, 'normalizeResponse'], $contents); |
57 | - $result = array_filter($result, function ($value) { |
|
57 | + $result = array_filter($result, function($value) { |
|
58 | 58 | return $value['path'] !== false; |
59 | 59 | }); |
60 | 60 |
@@ -163,7 +163,7 @@ |
||
163 | 163 | */ |
164 | 164 | public function deleteDir($dirname) |
165 | 165 | { |
166 | - $dirname = rtrim($this->applyPathPrefix($dirname), '/') . '/'; |
|
166 | + $dirname = rtrim($this->applyPathPrefix($dirname), '/').'/'; |
|
167 | 167 | $dirObjects = $this->listDirObjects($dirname, true); |
168 | 168 | |
169 | 169 | if (count($dirObjects['objects']) > 0) { |