@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | /** |
| 4 | 4 | * @copyright Copyright (c) 2018 Robin Appelman <[email protected]> |
| 5 | 5 | * |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | private function getCachedToken(string $cacheKey) { |
| 57 | - $cachedTokenString = $this->cache->get($cacheKey . '/token'); |
|
| 57 | + $cachedTokenString = $this->cache->get($cacheKey.'/token'); |
|
| 58 | 58 | if ($cachedTokenString) { |
| 59 | 59 | return json_decode($cachedTokenString); |
| 60 | 60 | } else { |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | } else { |
| 69 | 69 | $value = json_encode($token); |
| 70 | 70 | } |
| 71 | - $this->cache->set($cacheKey . '/token', $value); |
|
| 71 | + $this->cache->set($cacheKey.'/token', $value); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $this->params['tenantName'] = $this->params['tenant']; |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - $cacheKey = $userName . '@' . $this->params['url'] . '/' . $this->params['container']; |
|
| 101 | + $cacheKey = $userName.'@'.$this->params['url'].'/'.$this->params['container']; |
|
| 102 | 102 | $token = $this->getCachedToken($cacheKey); |
| 103 | 103 | $this->params['cachedToken'] = $token; |
| 104 | 104 | |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | if (is_array($cachedToken)) { |
| 131 | 131 | $token = $authService->generateTokenFromCache($cachedToken); |
| 132 | 132 | if (is_null($token->catalog)) { |
| 133 | - $this->logger->warning('Invalid cached token for swift, no catalog set: ' . json_encode($cachedToken)); |
|
| 133 | + $this->logger->warning('Invalid cached token for swift, no catalog set: '.json_encode($cachedToken)); |
|
| 134 | 134 | } else if ($token->hasExpired()) { |
| 135 | 135 | $this->logger->debug('Cached token for swift expired'); |
| 136 | 136 | } else { |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | } catch (ConnectException $e) { |
| 205 | 205 | /** @var RequestInterface $request */ |
| 206 | 206 | $request = $e->getRequest(); |
| 207 | - $host = $request->getUri()->getHost() . ':' . $request->getUri()->getPort(); |
|
| 207 | + $host = $request->getUri()->getHost().':'.$request->getUri()->getPort(); |
|
| 208 | 208 | \OC::$server->getLogger()->error("Can't connect to object storage server at $host"); |
| 209 | 209 | throw new StorageNotAvailableException("Can't connect to object storage server at $host", StorageNotAvailableException::STATUS_ERROR, $e); |
| 210 | 210 | } |