Completed
Pull Request — master (#9395)
by Robin
16:14
created
lib/private/Files/Cache/Scanner.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 		}
329 329
 		if ($lock) {
330 330
 			if ($this->storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
331
-				$this->storage->acquireLock('scanner::' . $path, ILockingProvider::LOCK_EXCLUSIVE, $this->lockingProvider);
331
+				$this->storage->acquireLock('scanner::'.$path, ILockingProvider::LOCK_EXCLUSIVE, $this->lockingProvider);
332 332
 				$this->storage->acquireLock($path, ILockingProvider::LOCK_SHARED, $this->lockingProvider);
333 333
 			}
334 334
 		}
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 			if ($lock) {
343 343
 				if ($this->storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
344 344
 					$this->storage->releaseLock($path, ILockingProvider::LOCK_SHARED, $this->lockingProvider);
345
-					$this->storage->releaseLock('scanner::' . $path, ILockingProvider::LOCK_EXCLUSIVE, $this->lockingProvider);
345
+					$this->storage->releaseLock('scanner::'.$path, ILockingProvider::LOCK_EXCLUSIVE, $this->lockingProvider);
346 346
 				}
347 347
 			}
348 348
 		}
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 		$exceptionOccurred = false;
433 433
 		$childQueue = [];
434 434
 		foreach ($newChildren as $file) {
435
-			$child = $path ? $path . '/' . $file : $file;
435
+			$child = $path ? $path.'/'.$file : $file;
436 436
 			try {
437 437
 				$existingData = isset($existingChildren[$file]) ? $existingChildren[$file] : null;
438 438
 				$data = $this->scanFile($child, $reuse, $folderId, $existingData, $lock);
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 					\OC::$server->getDatabaseConnection()->beginTransaction();
458 458
 				}
459 459
 				\OC::$server->getLogger()->logException($ex, [
460
-					'message' => 'Exception while scanning file "' . $child . '"',
460
+					'message' => 'Exception while scanning file "'.$child.'"',
461 461
 					'level' => ILogger::DEBUG,
462 462
 					'app' => 'core',
463 463
 				]);
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 		}
472 472
 		$removedChildren = \array_diff(array_keys($existingChildren), $newChildren);
473 473
 		foreach ($removedChildren as $childName) {
474
-			$child = $path ? $path . '/' . $childName : $childName;
474
+			$child = $path ? $path.'/'.$childName : $childName;
475 475
 			$this->removeFromCache($child);
476 476
 		}
477 477
 		if ($this->useTransactions) {
@@ -511,13 +511,13 @@  discard block
 block discarded – undo
511 511
 	 */
512 512
 	public function backgroundScan() {
513 513
 		if (!$this->cache->inCache('')) {
514
-			$this->runBackgroundScanJob(function () {
514
+			$this->runBackgroundScanJob(function() {
515 515
 				$this->scan('', self::SCAN_RECURSIVE, self::REUSE_ETAG);
516 516
 			}, '');
517 517
 		} else {
518 518
 			$lastPath = null;
519 519
 			while (($path = $this->cache->getIncomplete()) !== false && $path !== $lastPath) {
520
-				$this->runBackgroundScanJob(function () use ($path) {
520
+				$this->runBackgroundScanJob(function() use ($path) {
521 521
 					$this->scan($path, self::SCAN_RECURSIVE_INCOMPLETE, self::REUSE_ETAG | self::REUSE_SIZE);
522 522
 				}, $path);
523 523
 				// FIXME: this won't proceed with the next item, needs revamping of getIncomplete()
Please login to merge, or discard this patch.