@@ -58,14 +58,14 @@ discard block |
||
58 | 58 | throw new \Exception("Access Key, Secret and Bucket have to be configured."); |
59 | 59 | } |
60 | 60 | |
61 | - $this->id = 'amazon::' . $params['bucket']; |
|
61 | + $this->id = 'amazon::'.$params['bucket']; |
|
62 | 62 | |
63 | 63 | $this->test = isset($params['test']); |
64 | 64 | $this->bucket = $params['bucket']; |
65 | 65 | $this->timeout = !isset($params['timeout']) ? 15 : $params['timeout']; |
66 | 66 | $this->uploadPartSize = !isset($params['uploadPartSize']) ? 524288000 : $params['uploadPartSize']; |
67 | 67 | $params['region'] = empty($params['region']) ? 'eu-west-1' : $params['region']; |
68 | - $params['hostname'] = empty($params['hostname']) ? 's3.' . $params['region'] . '.amazonaws.com' : $params['hostname']; |
|
68 | + $params['hostname'] = empty($params['hostname']) ? 's3.'.$params['region'].'.amazonaws.com' : $params['hostname']; |
|
69 | 69 | if (!isset($params['port']) || $params['port'] === '') { |
70 | 70 | $params['port'] = (isset($params['use_ssl']) && $params['use_ssl'] === false) ? 80 : 443; |
71 | 71 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | $scheme = (isset($this->params['use_ssl']) && $this->params['use_ssl'] === false) ? 'http' : 'https'; |
91 | - $base_url = $scheme . '://' . $this->params['hostname'] . ':' . $this->params['port'] . '/'; |
|
91 | + $base_url = $scheme.'://'.$this->params['hostname'].':'.$this->params['port'].'/'; |
|
92 | 92 | |
93 | 93 | $options = [ |
94 | 94 | 'version' => isset($this->params['version']) ? $this->params['version'] : 'latest', |
@@ -112,16 +112,16 @@ discard block |
||
112 | 112 | |
113 | 113 | if (!$this->connection::isBucketDnsCompatible($this->bucket)) { |
114 | 114 | $logger = \OC::$server->getLogger(); |
115 | - $logger->debug('Bucket "' . $this->bucket . '" This bucket name is not dns compatible, it may contain invalid characters.', |
|
115 | + $logger->debug('Bucket "'.$this->bucket.'" This bucket name is not dns compatible, it may contain invalid characters.', |
|
116 | 116 | ['app' => 'objectstore']); |
117 | 117 | } |
118 | 118 | |
119 | 119 | if (!$this->connection->doesBucketExist($this->bucket)) { |
120 | 120 | $logger = \OC::$server->getLogger(); |
121 | 121 | try { |
122 | - $logger->info('Bucket "' . $this->bucket . '" does not exist - creating it.', ['app' => 'objectstore']); |
|
122 | + $logger->info('Bucket "'.$this->bucket.'" does not exist - creating it.', ['app' => 'objectstore']); |
|
123 | 123 | if (!$this->connection::isBucketDnsCompatible($this->bucket)) { |
124 | - throw new \Exception("The bucket will not be created because the name is not dns compatible, please correct it: " . $this->bucket); |
|
124 | + throw new \Exception("The bucket will not be created because the name is not dns compatible, please correct it: ".$this->bucket); |
|
125 | 125 | } |
126 | 126 | $this->connection->createBucket(['Bucket' => $this->bucket]); |
127 | 127 | $this->testTimeout(); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | 'level' => ILogger::DEBUG, |
132 | 132 | 'app' => 'objectstore', |
133 | 133 | ]); |
134 | - throw new \Exception('Creation of bucket "' . $this->bucket . '" failed. ' . $e->getMessage()); |
|
134 | + throw new \Exception('Creation of bucket "'.$this->bucket.'" failed. '.$e->getMessage()); |
|
135 | 135 | } |
136 | 136 | } |
137 | 137 |