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