@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | throw new \Exception('missing IObjectStore instance'); |
| 56 | 56 | } |
| 57 | 57 | if (isset($params['storageid'])) { |
| 58 | - $this->id = 'object::store:' . $params['storageid']; |
|
| 58 | + $this->id = 'object::store:'.$params['storageid']; |
|
| 59 | 59 | } else { |
| 60 | - $this->id = 'object::store:' . $this->objectStore->getStorageId(); |
|
| 60 | + $this->id = 'object::store:'.$this->objectStore->getStorageId(); |
|
| 61 | 61 | } |
| 62 | 62 | if (isset($params['objectPrefix'])) { |
| 63 | 63 | $this->objectPrefix = $params['objectPrefix']; |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | if ($ex->getCode() !== 404) { |
| 192 | 192 | $this->logger->logException($ex, [ |
| 193 | 193 | 'app' => 'objectstore', |
| 194 | - 'message' => 'Could not delete object ' . $this->getURN($stat['fileid']) . ' for ' . $path, |
|
| 194 | + 'message' => 'Could not delete object '.$this->getURN($stat['fileid']).' for '.$path, |
|
| 195 | 195 | ]); |
| 196 | 196 | return false; |
| 197 | 197 | } else { |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | */ |
| 225 | 225 | protected function getURN($fileId) { |
| 226 | 226 | if (is_numeric($fileId)) { |
| 227 | - return $this->objectPrefix . $fileId; |
|
| 227 | + return $this->objectPrefix.$fileId; |
|
| 228 | 228 | } |
| 229 | 229 | return null; |
| 230 | 230 | } |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | } catch (\Exception $ex) { |
| 273 | 273 | $this->logger->logException($ex, [ |
| 274 | 274 | 'app' => 'objectstore', |
| 275 | - 'message' => 'Count not get object ' . $this->getURN($stat['fileid']) . ' for file ' . $path, |
|
| 275 | + 'message' => 'Count not get object '.$this->getURN($stat['fileid']).' for file '.$path, |
|
| 276 | 276 | ]); |
| 277 | 277 | return false; |
| 278 | 278 | } |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | file_put_contents($tmpFile, $source); |
| 303 | 303 | } |
| 304 | 304 | $handle = fopen($tmpFile, $mode); |
| 305 | - return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { |
|
| 305 | + return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) { |
|
| 306 | 306 | $this->writeBack($tmpFile, $path); |
| 307 | 307 | }); |
| 308 | 308 | } |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | |
| 312 | 312 | public function file_exists($path) { |
| 313 | 313 | $path = $this->normalizePath($path); |
| 314 | - return (bool)$this->stat($path); |
|
| 314 | + return (bool) $this->stat($path); |
|
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | public function rename($source, $target) { |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | $this->getCache()->remove($path); |
| 370 | 370 | $this->logger->logException($ex, [ |
| 371 | 371 | 'app' => 'objectstore', |
| 372 | - 'message' => 'Could not create object ' . $this->getURN($fileId) . ' for ' . $path, |
|
| 372 | + 'message' => 'Could not create object '.$this->getURN($fileId).' for '.$path, |
|
| 373 | 373 | ]); |
| 374 | 374 | return false; |
| 375 | 375 | } |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | $stat['storage_mtime'] = $mTime; |
| 393 | 393 | |
| 394 | 394 | // run path based detection first, to use file extension because $tmpFile is only a random string |
| 395 | - $mimetypeDetector = \OC::$server->getMimeTypeDetector(); |
|
| 395 | + $mimetypeDetector = \OC::$server->getMimeTypeDetector(); |
|
| 396 | 396 | $mimetype = $mimetypeDetector->detectPath($path); |
| 397 | 397 | if ($mimetype === 'application/octet-stream') { |
| 398 | 398 | $mimetype = $mimetypeDetector->detect($tmpFile); |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | $this->getCache()->remove($path); |
| 410 | 410 | $this->logger->logException($ex, [ |
| 411 | 411 | 'app' => 'objectstore', |
| 412 | - 'message' => 'Could not create object ' . $this->getURN($fileId) . ' for ' . $path, |
|
| 412 | + 'message' => 'Could not create object '.$this->getURN($fileId).' for '.$path, |
|
| 413 | 413 | ]); |
| 414 | 414 | throw $ex; // make this bubble up |
| 415 | 415 | } |