@@ -64,14 +64,14 @@ discard block |
||
64 | 64 | throw new \Exception("Bucket has to be configured."); |
65 | 65 | } |
66 | 66 | |
67 | - $this->id = 'amazon::' . $params['bucket']; |
|
67 | + $this->id = 'amazon::'.$params['bucket']; |
|
68 | 68 | |
69 | 69 | $this->test = isset($params['test']); |
70 | 70 | $this->bucket = $params['bucket']; |
71 | 71 | $this->timeout = !isset($params['timeout']) ? 15 : $params['timeout']; |
72 | 72 | $this->uploadPartSize = !isset($params['uploadPartSize']) ? 524288000 : $params['uploadPartSize']; |
73 | 73 | $params['region'] = empty($params['region']) ? 'eu-west-1' : $params['region']; |
74 | - $params['hostname'] = empty($params['hostname']) ? 's3.' . $params['region'] . '.amazonaws.com' : $params['hostname']; |
|
74 | + $params['hostname'] = empty($params['hostname']) ? 's3.'.$params['region'].'.amazonaws.com' : $params['hostname']; |
|
75 | 75 | if (!isset($params['port']) || $params['port'] === '') { |
76 | 76 | $params['port'] = (isset($params['use_ssl']) && $params['use_ssl'] === false) ? 80 : 443; |
77 | 77 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | |
96 | 96 | $scheme = (isset($this->params['use_ssl']) && $this->params['use_ssl'] === false) ? 'http' : 'https'; |
97 | - $base_url = $scheme . '://' . $this->params['hostname'] . ':' . $this->params['port'] . '/'; |
|
97 | + $base_url = $scheme.'://'.$this->params['hostname'].':'.$this->params['port'].'/'; |
|
98 | 98 | |
99 | 99 | // Adding explicit credential provider to the beginning chain. |
100 | 100 | // Including environment variables and IAM instance profiles. |
@@ -125,16 +125,16 @@ discard block |
||
125 | 125 | |
126 | 126 | if (!$this->connection::isBucketDnsCompatible($this->bucket)) { |
127 | 127 | $logger = \OC::$server->getLogger(); |
128 | - $logger->debug('Bucket "' . $this->bucket . '" This bucket name is not dns compatible, it may contain invalid characters.', |
|
128 | + $logger->debug('Bucket "'.$this->bucket.'" This bucket name is not dns compatible, it may contain invalid characters.', |
|
129 | 129 | ['app' => 'objectstore']); |
130 | 130 | } |
131 | 131 | |
132 | 132 | if (!$this->connection->doesBucketExist($this->bucket)) { |
133 | 133 | $logger = \OC::$server->getLogger(); |
134 | 134 | try { |
135 | - $logger->info('Bucket "' . $this->bucket . '" does not exist - creating it.', ['app' => 'objectstore']); |
|
135 | + $logger->info('Bucket "'.$this->bucket.'" does not exist - creating it.', ['app' => 'objectstore']); |
|
136 | 136 | if (!$this->connection::isBucketDnsCompatible($this->bucket)) { |
137 | - throw new \Exception("The bucket will not be created because the name is not dns compatible, please correct it: " . $this->bucket); |
|
137 | + throw new \Exception("The bucket will not be created because the name is not dns compatible, please correct it: ".$this->bucket); |
|
138 | 138 | } |
139 | 139 | $this->connection->createBucket(['Bucket' => $this->bucket]); |
140 | 140 | $this->testTimeout(); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | 'level' => ILogger::DEBUG, |
145 | 145 | 'app' => 'objectstore', |
146 | 146 | ]); |
147 | - throw new \Exception('Creation of bucket "' . $this->bucket . '" failed. ' . $e->getMessage()); |
|
147 | + throw new \Exception('Creation of bucket "'.$this->bucket.'" failed. '.$e->getMessage()); |
|
148 | 148 | } |
149 | 149 | } |
150 | 150 | |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | * This function creates a credential provider based on user parameter file |
180 | 180 | */ |
181 | 181 | protected function paramCredentialProvider() : callable { |
182 | - return function () { |
|
182 | + return function() { |
|
183 | 183 | $key = empty($this->params['key']) ? null : $this->params['key']; |
184 | 184 | $secret = empty($this->params['secret']) ? null : $this->params['secret']; |
185 | 185 |