@@ -61,9 +61,9 @@ discard block |
||
61 | 61 | throw new \Exception('missing IObjectStore instance'); |
62 | 62 | } |
63 | 63 | if (isset($params['storageid'])) { |
64 | - $this->id = 'object::store:' . $params['storageid']; |
|
64 | + $this->id = 'object::store:'.$params['storageid']; |
|
65 | 65 | } else { |
66 | - $this->id = 'object::store:' . $this->objectStore->getStorageId(); |
|
66 | + $this->id = 'object::store:'.$this->objectStore->getStorageId(); |
|
67 | 67 | } |
68 | 68 | if (isset($params['objectPrefix'])) { |
69 | 69 | $this->objectPrefix = $params['objectPrefix']; |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | if ($ex->getCode() !== 404) { |
206 | 206 | $this->logger->logException($ex, [ |
207 | 207 | 'app' => 'objectstore', |
208 | - 'message' => 'Could not delete object ' . $this->getURN($stat['fileid']) . ' for ' . $path, |
|
208 | + 'message' => 'Could not delete object '.$this->getURN($stat['fileid']).' for '.$path, |
|
209 | 209 | ]); |
210 | 210 | return false; |
211 | 211 | } |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | */ |
238 | 238 | public function getURN($fileId) { |
239 | 239 | if (is_numeric($fileId)) { |
240 | - return $this->objectPrefix . $fileId; |
|
240 | + return $this->objectPrefix.$fileId; |
|
241 | 241 | } |
242 | 242 | return null; |
243 | 243 | } |
@@ -291,13 +291,13 @@ discard block |
||
291 | 291 | } catch (NotFoundException $e) { |
292 | 292 | $this->logger->logException($e, [ |
293 | 293 | 'app' => 'objectstore', |
294 | - 'message' => 'Could not get object ' . $this->getURN($stat['fileid']) . ' for file ' . $path, |
|
294 | + 'message' => 'Could not get object '.$this->getURN($stat['fileid']).' for file '.$path, |
|
295 | 295 | ]); |
296 | 296 | throw $e; |
297 | 297 | } catch (\Exception $ex) { |
298 | 298 | $this->logger->logException($ex, [ |
299 | 299 | 'app' => 'objectstore', |
300 | - 'message' => 'Could not get object ' . $this->getURN($stat['fileid']) . ' for file ' . $path, |
|
300 | + 'message' => 'Could not get object '.$this->getURN($stat['fileid']).' for file '.$path, |
|
301 | 301 | ]); |
302 | 302 | return false; |
303 | 303 | } |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | case 'wb+': |
312 | 312 | $tmpFile = \OC::$server->getTempManager()->getTemporaryFile($ext); |
313 | 313 | $handle = fopen($tmpFile, $mode); |
314 | - return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { |
|
314 | + return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) { |
|
315 | 315 | $this->writeBack($tmpFile, $path); |
316 | 316 | }); |
317 | 317 | case 'a': |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | file_put_contents($tmpFile, $source); |
329 | 329 | } |
330 | 330 | $handle = fopen($tmpFile, $mode); |
331 | - return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { |
|
331 | + return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) { |
|
332 | 332 | $this->writeBack($tmpFile, $path); |
333 | 333 | }); |
334 | 334 | } |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | |
338 | 338 | public function file_exists($path) { |
339 | 339 | $path = $this->normalizePath($path); |
340 | - return (bool)$this->stat($path); |
|
340 | + return (bool) $this->stat($path); |
|
341 | 341 | } |
342 | 342 | |
343 | 343 | public function rename($source, $target) { |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | } catch (\Exception $ex) { |
390 | 390 | $this->logger->logException($ex, [ |
391 | 391 | 'app' => 'objectstore', |
392 | - 'message' => 'Could not create object for ' . $path, |
|
392 | + 'message' => 'Could not create object for '.$path, |
|
393 | 393 | ]); |
394 | 394 | throw $ex; |
395 | 395 | } |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | } |
435 | 435 | // update stat with new data |
436 | 436 | $mTime = time(); |
437 | - $stat['size'] = (int)$size; |
|
437 | + $stat['size'] = (int) $size; |
|
438 | 438 | $stat['mtime'] = $mTime; |
439 | 439 | $stat['storage_mtime'] = $mTime; |
440 | 440 | |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | $stat['etag'] = $this->getETag($path); |
446 | 446 | |
447 | 447 | $exists = $this->getCache()->inCache($path); |
448 | - $uploadPath = $exists ? $path : $path . '.part'; |
|
448 | + $uploadPath = $exists ? $path : $path.'.part'; |
|
449 | 449 | |
450 | 450 | if ($exists) { |
451 | 451 | $fileId = $stat['fileid']; |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | try { |
458 | 458 | //upload to object storage |
459 | 459 | if ($size === null) { |
460 | - $countStream = CountWrapper::wrap($stream, function ($writtenSize) use ($fileId, &$size) { |
|
460 | + $countStream = CountWrapper::wrap($stream, function($writtenSize) use ($fileId, &$size) { |
|
461 | 461 | $this->getCache()->update($fileId, [ |
462 | 462 | 'size' => $writtenSize |
463 | 463 | ]); |
@@ -480,12 +480,12 @@ discard block |
||
480 | 480 | $this->getCache()->remove($uploadPath); |
481 | 481 | $this->logger->logException($ex, [ |
482 | 482 | 'app' => 'objectstore', |
483 | - 'message' => 'Could not create object ' . $urn . ' for ' . $path, |
|
483 | + 'message' => 'Could not create object '.$urn.' for '.$path, |
|
484 | 484 | ]); |
485 | 485 | } else { |
486 | 486 | $this->logger->logException($ex, [ |
487 | 487 | 'app' => 'objectstore', |
488 | - 'message' => 'Could not update object ' . $urn . ' for ' . $path, |
|
488 | + 'message' => 'Could not update object '.$urn.' for '.$path, |
|
489 | 489 | ]); |
490 | 490 | } |
491 | 491 | throw $ex; // make this bubble up |