@@ -73,14 +73,14 @@ discard block |
||
73 | 73 | |
74 | 74 | if (isset($params['apiKey'])) { |
75 | 75 | $this->client = new Rackspace($params['url'], $params); |
76 | - $cacheKey = $params['username'] . '@' . $params['url'] . '/' . $params['bucket']; |
|
76 | + $cacheKey = $params['username'].'@'.$params['url'].'/'.$params['bucket']; |
|
77 | 77 | } else { |
78 | 78 | $this->client = new OpenStack($params['url'], $params); |
79 | - $cacheKey = $params['username'] . '@' . $params['url'] . '/' . $params['bucket']; |
|
79 | + $cacheKey = $params['username'].'@'.$params['url'].'/'.$params['bucket']; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | $cacheFactory = \OC::$server->getMemCacheFactory(); |
83 | - $this->memcache = $cacheFactory->create('swift::' . $cacheKey); |
|
83 | + $this->memcache = $cacheFactory->create('swift::'.$cacheKey); |
|
84 | 84 | |
85 | 85 | $this->params = $params; |
86 | 86 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | |
157 | 157 | private function exportToken() { |
158 | 158 | $export = $this->client->exportCredentials(); |
159 | - $export['catalog'] = array_map(function (CatalogItem $item) { |
|
159 | + $export['catalog'] = array_map(function(CatalogItem $item) { |
|
160 | 160 | return [ |
161 | 161 | 'name' => $item->getName(), |
162 | 162 | 'endpoints' => $item->getEndpoints(), |
@@ -170,10 +170,10 @@ discard block |
||
170 | 170 | $cachedTokenString = $this->memcache->get('token'); |
171 | 171 | if ($cachedTokenString) { |
172 | 172 | $cachedToken = json_decode($cachedTokenString, true); |
173 | - $cachedToken['catalog'] = array_map(function (array $item) { |
|
173 | + $cachedToken['catalog'] = array_map(function(array $item) { |
|
174 | 174 | $itemClass = new \stdClass(); |
175 | 175 | $itemClass->name = $item['name']; |
176 | - $itemClass->endpoints = array_map(function (array $endpoint) { |
|
176 | + $itemClass->endpoints = array_map(function(array $endpoint) { |
|
177 | 177 | return (object) $endpoint; |
178 | 178 | }, $item['endpoints']); |
179 | 179 | $itemClass->type = $item['type']; |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | } |
213 | 213 | } |
214 | 214 | |
215 | - $availableRegions = implode(', ', array_map(function ($endpoint) { |
|
215 | + $availableRegions = implode(', ', array_map(function($endpoint) { |
|
216 | 216 | return $endpoint->region; |
217 | 217 | }, $endPoints)); |
218 | 218 | |
@@ -220,9 +220,9 @@ discard block |
||
220 | 220 | } |
221 | 221 | |
222 | 222 | private function getAvailableServiceNames(Catalog $catalog) { |
223 | - return array_map(function (CatalogItem $item) { |
|
223 | + return array_map(function(CatalogItem $item) { |
|
224 | 224 | return $item->getName(); |
225 | - }, array_filter($catalog->getItems(), function (CatalogItem $item) { |
|
225 | + }, array_filter($catalog->getItems(), function(CatalogItem $item) { |
|
226 | 226 | return $item->hasType(Service::DEFAULT_TYPE); |
227 | 227 | })); |
228 | 228 | } |