@@ -27,7 +27,7 @@ |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | $resource = fopen($remoteUrl, 'r'); |
| 30 | - $status = (bool)$this->filesystem->getAdapter()->writeStream($path, $resource, $config); |
|
| 30 | + $status = (bool) $this->filesystem->getAdapter()->writeStream($path, $resource, $config); |
|
| 31 | 31 | fclose($resource); |
| 32 | 32 | return $status; |
| 33 | 33 | } |
@@ -59,10 +59,10 @@ |
||
| 59 | 59 | if ($this->config['is_cname']) { |
| 60 | 60 | $url .= $this->config['cdn_domain']; |
| 61 | 61 | } else { |
| 62 | - $url .= $this->config['bucket'] . '.' . $this->config['endpoint']; |
|
| 62 | + $url .= $this->config['bucket'].'.'.$this->config['endpoint']; |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - $url .= '/' . ltrim($path, '/'); |
|
| 65 | + $url .= '/'.ltrim($path, '/'); |
|
| 66 | 66 | return $url; |
| 67 | 67 | } |
| 68 | 68 | |
@@ -23,14 +23,14 @@ discard block |
||
| 23 | 23 | ); |
| 24 | 24 | |
| 25 | 25 | $this->app->make('filesystem') |
| 26 | - ->extend('aliyun', function ($app, array $config) { |
|
| 26 | + ->extend('aliyun', function($app, array $config) { |
|
| 27 | 27 | return $app->make('aliyun-oss.oss-filesystem', $config); |
| 28 | 28 | }); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | public function register() |
| 32 | 32 | { |
| 33 | - $this->app->bind('aliyun-oss.oss-client', function ($app, array $config) { |
|
| 33 | + $this->app->bind('aliyun-oss.oss-client', function($app, array $config) { |
|
| 34 | 34 | return $app->make(OssClient::class, [ |
| 35 | 35 | 'accessKeyId' => $config['access_id'], |
| 36 | 36 | 'accessKeySecret' => $config['access_key'], |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | ]); |
| 41 | 41 | }); |
| 42 | 42 | |
| 43 | - $this->app->bind('aliyun-oss.oss-filesystem', function ($app, array $config) { |
|
| 43 | + $this->app->bind('aliyun-oss.oss-filesystem', function($app, array $config) { |
|
| 44 | 44 | $client = $app->make('aliyun-oss.oss-client', $config); |
| 45 | 45 | $adapter = new AliyunOssAdapter($client, $config); |
| 46 | 46 | $filesystem = new Filesystem($adapter, new Config(['disable_asserts' => true])); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | return $filesystem; |
| 50 | 50 | }); |
| 51 | 51 | |
| 52 | - $this->app->singleton('aliyun-oss.client', function ($app) { |
|
| 52 | + $this->app->singleton('aliyun-oss.client', function($app) { |
|
| 53 | 53 | $config = $app->get('config')->get('filesystems.disks.aliyun'); |
| 54 | 54 | return $app->make('aliyun-oss.oss-client', $config); |
| 55 | 55 | }); |