Passed
Push — master ( 2827b0...9ef23e )
by Roeland
09:51
created
lib/private/Files/Storage/Common.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 			$this->mkdir($path2);
221 221
 			while ($file = readdir($dir)) {
222 222
 				if (!Filesystem::isIgnoredDir($file)) {
223
-					if (!$this->copy($path1 . '/' . $file, $path2 . '/' . $file)) {
223
+					if (!$this->copy($path1.'/'.$file, $path2.'/'.$file)) {
224 224
 						return false;
225 225
 					}
226 226
 				}
@@ -274,12 +274,12 @@  discard block
 block discarded – undo
274 274
 		if (is_resource($dh)) {
275 275
 			while (($file = readdir($dh)) !== false) {
276 276
 				if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
277
-					if ($this->is_dir($path . '/' . $file)) {
278
-						mkdir($target . '/' . $file);
279
-						$this->addLocalFolder($path . '/' . $file, $target . '/' . $file);
277
+					if ($this->is_dir($path.'/'.$file)) {
278
+						mkdir($target.'/'.$file);
279
+						$this->addLocalFolder($path.'/'.$file, $target.'/'.$file);
280 280
 					} else {
281
-						$tmp = $this->toTmpFile($path . '/' . $file);
282
-						rename($tmp, $target . '/' . $file);
281
+						$tmp = $this->toTmpFile($path.'/'.$file);
282
+						rename($tmp, $target.'/'.$file);
283 283
 					}
284 284
 				}
285 285
 			}
@@ -298,10 +298,10 @@  discard block
 block discarded – undo
298 298
 			while (($item = readdir($dh)) !== false) {
299 299
 				if (\OC\Files\Filesystem::isIgnoredDir($item)) continue;
300 300
 				if (strstr(strtolower($item), strtolower($query)) !== false) {
301
-					$files[] = $dir . '/' . $item;
301
+					$files[] = $dir.'/'.$item;
302 302
 				}
303
-				if ($this->is_dir($dir . '/' . $item)) {
304
-					$files = array_merge($files, $this->searchInDir($query, $dir . '/' . $item));
303
+				if ($this->is_dir($dir.'/'.$item)) {
304
+					$files = array_merge($files, $this->searchInDir($query, $dir.'/'.$item));
305 305
 				}
306 306
 			}
307 307
 		}
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 		if (!isset($this->watcher)) {
353 353
 			$this->watcher = new Watcher($storage);
354 354
 			$globalPolicy = \OC::$server->getConfig()->getSystemValue('filesystem_check_changes', Watcher::CHECK_NEVER);
355
-			$this->watcher->setPolicy((int)$this->getMountOption('filesystem_check_changes', $globalPolicy));
355
+			$this->watcher->setPolicy((int) $this->getMountOption('filesystem_check_changes', $globalPolicy));
356 356
 		}
357 357
 		return $this->watcher;
358 358
 	}
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 		}
370 370
 		if (!isset($storage->propagator)) {
371 371
 			$config = \OC::$server->getSystemConfig();
372
-			$storage->propagator = new Propagator($storage, \OC::$server->getDatabaseConnection(), ['appdata_' . $config->getValue('instanceid')]);
372
+			$storage->propagator = new Propagator($storage, \OC::$server->getDatabaseConnection(), ['appdata_'.$config->getValue('instanceid')]);
373 373
 		}
374 374
 		return $storage->propagator;
375 375
 	}
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
 	 */
428 428
 	public function cleanPath($path) {
429 429
 		if (strlen($path) == 0 or $path[0] != '/') {
430
-			$path = '/' . $path;
430
+			$path = '/'.$path;
431 431
 		}
432 432
 
433 433
 		$output = array();
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 			\OC::$server->getLogger()->info("External storage not available: stat() failed");
456 456
 			return false;
457 457
 		} catch (\Exception $e) {
458
-			\OC::$server->getLogger()->info("External storage not available: " . $e->getMessage());
458
+			\OC::$server->getLogger()->info("External storage not available: ".$e->getMessage());
459 459
 			\OC::$server->getLogger()->logException($e, ['level' => ILogger::DEBUG]);
460 460
 			return false;
461 461
 		}
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
 			if (is_resource($dh)) {
607 607
 				while ($result and ($file = readdir($dh)) !== false) {
608 608
 					if (!Filesystem::isIgnoredDir($file)) {
609
-						$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file);
609
+						$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath.'/'.$file, $targetInternalPath.'/'.$file);
610 610
 					}
611 611
 				}
612 612
 			}
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
 				$this->getCache()->remove($targetInternalPath);
633 633
 			}
634 634
 		}
635
-		return (bool)$result;
635
+		return (bool) $result;
636 636
 	}
637 637
 
638 638
 	/**
@@ -712,7 +712,7 @@  discard block
 block discarded – undo
712 712
 			);
713 713
 		}
714 714
 		try {
715
-			$provider->acquireLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);
715
+			$provider->acquireLock('files/'.md5($this->getId().'::'.trim($path, '/')), $type);
716 716
 		} catch (LockedException $e) {
717 717
 			if ($logger) {
718 718
 				$logger->logException($e, ['level' => ILogger::INFO]);
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
 			);
745 745
 		}
746 746
 		try {
747
-			$provider->releaseLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);
747
+			$provider->releaseLock('files/'.md5($this->getId().'::'.trim($path, '/')), $type);
748 748
 		} catch (LockedException $e) {
749 749
 			if ($logger) {
750 750
 				$logger->logException($e, ['level' => ILogger::INFO]);
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
 			);
777 777
 		}
778 778
 		try {
779
-			$provider->changeLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);
779
+			$provider->changeLock('files/'.md5($this->getId().'::'.trim($path, '/')), $type);
780 780
 		} catch (LockedException $e) {
781 781
 			\OC::$server->getLogger()->logException($e, ['level' => ILogger::INFO]);
782 782
 			throw $e;
Please login to merge, or discard this patch.