Passed
Push — master ( 4f52e8...171373 )
by Morris
12:04 queued 10s
created
lib/private/Files/Cache/Scanner.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 		}
331 331
 		if ($lock) {
332 332
 			if ($this->storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
333
-				$this->storage->acquireLock('scanner::' . $path, ILockingProvider::LOCK_EXCLUSIVE, $this->lockingProvider);
333
+				$this->storage->acquireLock('scanner::'.$path, ILockingProvider::LOCK_EXCLUSIVE, $this->lockingProvider);
334 334
 				$this->storage->acquireLock($path, ILockingProvider::LOCK_SHARED, $this->lockingProvider);
335 335
 			}
336 336
 		}
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 			if ($lock) {
345 345
 				if ($this->storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
346 346
 					$this->storage->releaseLock($path, ILockingProvider::LOCK_SHARED, $this->lockingProvider);
347
-					$this->storage->releaseLock('scanner::' . $path, ILockingProvider::LOCK_EXCLUSIVE, $this->lockingProvider);
347
+					$this->storage->releaseLock('scanner::'.$path, ILockingProvider::LOCK_EXCLUSIVE, $this->lockingProvider);
348 348
 				}
349 349
 			}
350 350
 		}
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 			}
422 422
 			$file = $fileMeta['name'];
423 423
 			$newChildNames[] = $file;
424
-			$child = $path ? $path . '/' . $file : $file;
424
+			$child = $path ? $path.'/'.$file : $file;
425 425
 			try {
426 426
 				$existingData = isset($existingChildren[$file]) ? $existingChildren[$file] : false;
427 427
 				$data = $this->scanFile($child, $reuse, $folderId, $existingData, $lock, $fileMeta);
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
 					\OC::$server->getDatabaseConnection()->beginTransaction();
447 447
 				}
448 448
 				\OC::$server->getLogger()->logException($ex, [
449
-					'message' => 'Exception while scanning file "' . $child . '"',
449
+					'message' => 'Exception while scanning file "'.$child.'"',
450 450
 					'level' => ILogger::DEBUG,
451 451
 					'app' => 'core',
452 452
 				]);
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 		}
461 461
 		$removedChildren = \array_diff(array_keys($existingChildren), $newChildNames);
462 462
 		foreach ($removedChildren as $childName) {
463
-			$child = $path ? $path . '/' . $childName : $childName;
463
+			$child = $path ? $path.'/'.$childName : $childName;
464 464
 			$this->removeFromCache($child);
465 465
 		}
466 466
 		if ($this->useTransactions) {
@@ -500,13 +500,13 @@  discard block
 block discarded – undo
500 500
 	 */
501 501
 	public function backgroundScan() {
502 502
 		if (!$this->cache->inCache('')) {
503
-			$this->runBackgroundScanJob(function () {
503
+			$this->runBackgroundScanJob(function() {
504 504
 				$this->scan('', self::SCAN_RECURSIVE, self::REUSE_ETAG);
505 505
 			}, '');
506 506
 		} else {
507 507
 			$lastPath = null;
508 508
 			while (($path = $this->cache->getIncomplete()) !== false && $path !== $lastPath) {
509
-				$this->runBackgroundScanJob(function () use ($path) {
509
+				$this->runBackgroundScanJob(function() use ($path) {
510 510
 					$this->scan($path, self::SCAN_RECURSIVE_INCOMPLETE, self::REUSE_ETAG | self::REUSE_SIZE);
511 511
 				}, $path);
512 512
 				// FIXME: this won't proceed with the next item, needs revamping of getIncomplete()
Please login to merge, or discard this patch.