Completed
Pull Request — master (#6360)
by Christoph
14:02
created
lib/private/Files/View.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
 			$path = '/';
126 126
 		}
127 127
 		if ($path[0] !== '/') {
128
-			$path = '/' . $path;
128
+			$path = '/'.$path;
129 129
 		}
130
-		return $this->fakeRoot . $path;
130
+		return $this->fakeRoot.$path;
131 131
 	}
132 132
 
133 133
 	/**
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	public function chroot($fakeRoot) {
140 140
 		if (!$fakeRoot == '') {
141 141
 			if ($fakeRoot[0] !== '/') {
142
-				$fakeRoot = '/' . $fakeRoot;
142
+				$fakeRoot = '/'.$fakeRoot;
143 143
 			}
144 144
 		}
145 145
 		$this->fakeRoot = $fakeRoot;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 		}
172 172
 
173 173
 		// missing slashes can cause wrong matches!
174
-		$root = rtrim($this->fakeRoot, '/') . '/';
174
+		$root = rtrim($this->fakeRoot, '/').'/';
175 175
 
176 176
 		if (strpos($path, $root) !== 0) {
177 177
 			return null;
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 		if ($mount instanceof MoveableMount) {
278 278
 			// cut of /user/files to get the relative path to data/user/files
279 279
 			$pathParts = explode('/', $path, 4);
280
-			$relPath = '/' . $pathParts[3];
280
+			$relPath = '/'.$pathParts[3];
281 281
 			$this->lockFile($relPath, ILockingProvider::LOCK_SHARED, true);
282 282
 			\OC_Hook::emit(
283 283
 				Filesystem::CLASSNAME, "umount",
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
 		}
689 689
 		$postFix = (substr($path, -1, 1) === '/') ? '/' : '';
690 690
 		$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
691
-		$mount = Filesystem::getMountManager()->find($absolutePath . $postFix);
691
+		$mount = Filesystem::getMountManager()->find($absolutePath.$postFix);
692 692
 		if ($mount and $mount->getInternalPath($absolutePath) === '') {
693 693
 			return $this->removeMount($mount, $absolutePath);
694 694
 		}
@@ -954,7 +954,7 @@  discard block
 block discarded – undo
954 954
 				$hooks[] = 'write';
955 955
 				break;
956 956
 			default:
957
-				\OCP\Util::writeLog('core', 'invalid mode (' . $mode . ') for ' . $path, \OCP\Util::ERROR);
957
+				\OCP\Util::writeLog('core', 'invalid mode ('.$mode.') for '.$path, \OCP\Util::ERROR);
958 958
 		}
959 959
 
960 960
 		if ($mode !== 'r' && $mode !== 'w') {
@@ -1058,7 +1058,7 @@  discard block
 block discarded – undo
1058 1058
 					array(Filesystem::signal_param_path => $this->getHookPath($path))
1059 1059
 				);
1060 1060
 			}
1061
-			list($storage, $internalPath) = Filesystem::resolvePath($absolutePath . $postFix);
1061
+			list($storage, $internalPath) = Filesystem::resolvePath($absolutePath.$postFix);
1062 1062
 			if ($storage) {
1063 1063
 				$result = $storage->hash($type, $internalPath, $raw);
1064 1064
 				return $result;
@@ -1109,7 +1109,7 @@  discard block
 block discarded – undo
1109 1109
 
1110 1110
 			$run = $this->runHooks($hooks, $path);
1111 1111
 			/** @var \OC\Files\Storage\Storage $storage */
1112
-			list($storage, $internalPath) = Filesystem::resolvePath($absolutePath . $postFix);
1112
+			list($storage, $internalPath) = Filesystem::resolvePath($absolutePath.$postFix);
1113 1113
 			if ($run and $storage) {
1114 1114
 				if (in_array('write', $hooks) || in_array('delete', $hooks)) {
1115 1115
 					$this->changeLock($path, ILockingProvider::LOCK_EXCLUSIVE);
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
 					$unlockLater = true;
1149 1149
 					// make sure our unlocking callback will still be called if connection is aborted
1150 1150
 					ignore_user_abort(true);
1151
-					$result = CallbackWrapper::wrap($result, null, null, function () use ($hooks, $path) {
1151
+					$result = CallbackWrapper::wrap($result, null, null, function() use ($hooks, $path) {
1152 1152
 						if (in_array('write', $hooks)) {
1153 1153
 							$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
1154 1154
 						} else if (in_array('read', $hooks)) {
@@ -1209,7 +1209,7 @@  discard block
 block discarded – undo
1209 1209
 			return true;
1210 1210
 		}
1211 1211
 
1212
-		return (strlen($fullPath) > strlen($defaultRoot)) && (substr($fullPath, 0, strlen($defaultRoot) + 1) === $defaultRoot . '/');
1212
+		return (strlen($fullPath) > strlen($defaultRoot)) && (substr($fullPath, 0, strlen($defaultRoot) + 1) === $defaultRoot.'/');
1213 1213
 	}
1214 1214
 
1215 1215
 	/**
@@ -1228,7 +1228,7 @@  discard block
 block discarded – undo
1228 1228
 				if ($hook != 'read') {
1229 1229
 					\OC_Hook::emit(
1230 1230
 						Filesystem::CLASSNAME,
1231
-						$prefix . $hook,
1231
+						$prefix.$hook,
1232 1232
 						array(
1233 1233
 							Filesystem::signal_param_run => &$run,
1234 1234
 							Filesystem::signal_param_path => $path
@@ -1237,7 +1237,7 @@  discard block
 block discarded – undo
1237 1237
 				} elseif (!$post) {
1238 1238
 					\OC_Hook::emit(
1239 1239
 						Filesystem::CLASSNAME,
1240
-						$prefix . $hook,
1240
+						$prefix.$hook,
1241 1241
 						array(
1242 1242
 							Filesystem::signal_param_path => $path
1243 1243
 						)
@@ -1332,7 +1332,7 @@  discard block
 block discarded – undo
1332 1332
 			return $this->getPartFileInfo($path);
1333 1333
 		}
1334 1334
 		$relativePath = $path;
1335
-		$path = Filesystem::normalizePath($this->fakeRoot . '/' . $path);
1335
+		$path = Filesystem::normalizePath($this->fakeRoot.'/'.$path);
1336 1336
 
1337 1337
 		$mount = Filesystem::getMountManager()->find($path);
1338 1338
 		$storage = $mount->getStorage();
@@ -1356,7 +1356,7 @@  discard block
 block discarded – undo
1356 1356
 					//add the sizes of other mount points to the folder
1357 1357
 					$extOnly = ($includeMountPoints === 'ext');
1358 1358
 					$mounts = Filesystem::getMountManager()->findIn($path);
1359
-					$info->setSubMounts(array_filter($mounts, function (IMountPoint $mount) use ($extOnly) {
1359
+					$info->setSubMounts(array_filter($mounts, function(IMountPoint $mount) use ($extOnly) {
1360 1360
 						$subStorage = $mount->getStorage();
1361 1361
 						return !($extOnly && $subStorage instanceof \OCA\Files_Sharing\SharedStorage);
1362 1362
 					}));
@@ -1403,12 +1403,12 @@  discard block
 block discarded – undo
1403 1403
 			/**
1404 1404
 			 * @var \OC\Files\FileInfo[] $files
1405 1405
 			 */
1406
-			$files = array_map(function (ICacheEntry $content) use ($path, $storage, $mount, $sharingDisabled) {
1406
+			$files = array_map(function(ICacheEntry $content) use ($path, $storage, $mount, $sharingDisabled) {
1407 1407
 				if ($sharingDisabled) {
1408 1408
 					$content['permissions'] = $content['permissions'] & ~\OCP\Constants::PERMISSION_SHARE;
1409 1409
 				}
1410 1410
 				$owner = $this->getUserObjectForOwner($storage->getOwner($content['path']));
1411
-				return new FileInfo($path . '/' . $content['name'], $storage, $content['path'], $content, $mount, $owner);
1411
+				return new FileInfo($path.'/'.$content['name'], $storage, $content['path'], $content, $mount, $owner);
1412 1412
 			}, $contents);
1413 1413
 
1414 1414
 			//add a folder for any mountpoint in this directory and add the sizes of other mountpoints to the folders
@@ -1433,8 +1433,8 @@  discard block
 block discarded – undo
1433 1433
 							// sometimes when the storage is not available it can be any exception
1434 1434
 							\OCP\Util::writeLog(
1435 1435
 								'core',
1436
-								'Exception while scanning storage "' . $subStorage->getId() . '": ' .
1437
-								get_class($e) . ': ' . $e->getMessage(),
1436
+								'Exception while scanning storage "'.$subStorage->getId().'": '.
1437
+								get_class($e).': '.$e->getMessage(),
1438 1438
 								\OCP\Util::ERROR
1439 1439
 							);
1440 1440
 							continue;
@@ -1471,7 +1471,7 @@  discard block
 block discarded – undo
1471 1471
 									break;
1472 1472
 								}
1473 1473
 							}
1474
-							$rootEntry['path'] = substr(Filesystem::normalizePath($path . '/' . $rootEntry['name']), strlen($user) + 2); // full path without /$user/
1474
+							$rootEntry['path'] = substr(Filesystem::normalizePath($path.'/'.$rootEntry['name']), strlen($user) + 2); // full path without /$user/
1475 1475
 
1476 1476
 							// if sharing was disabled for the user we remove the share permissions
1477 1477
 							if (\OCP\Util::isSharingDisabledForUser()) {
@@ -1479,14 +1479,14 @@  discard block
 block discarded – undo
1479 1479
 							}
1480 1480
 
1481 1481
 							$owner = $this->getUserObjectForOwner($subStorage->getOwner(''));
1482
-							$files[] = new FileInfo($path . '/' . $rootEntry['name'], $subStorage, '', $rootEntry, $mount, $owner);
1482
+							$files[] = new FileInfo($path.'/'.$rootEntry['name'], $subStorage, '', $rootEntry, $mount, $owner);
1483 1483
 						}
1484 1484
 					}
1485 1485
 				}
1486 1486
 			}
1487 1487
 
1488 1488
 			if ($mimetype_filter) {
1489
-				$files = array_filter($files, function (FileInfo $file) use ($mimetype_filter) {
1489
+				$files = array_filter($files, function(FileInfo $file) use ($mimetype_filter) {
1490 1490
 					if (strpos($mimetype_filter, '/')) {
1491 1491
 						return $file->getMimetype() === $mimetype_filter;
1492 1492
 					} else {
@@ -1515,7 +1515,7 @@  discard block
 block discarded – undo
1515 1515
 		if ($data instanceof FileInfo) {
1516 1516
 			$data = $data->getData();
1517 1517
 		}
1518
-		$path = Filesystem::normalizePath($this->fakeRoot . '/' . $path);
1518
+		$path = Filesystem::normalizePath($this->fakeRoot.'/'.$path);
1519 1519
 		/**
1520 1520
 		 * @var \OC\Files\Storage\Storage $storage
1521 1521
 		 * @var string $internalPath
@@ -1542,7 +1542,7 @@  discard block
 block discarded – undo
1542 1542
 	 * @return FileInfo[]
1543 1543
 	 */
1544 1544
 	public function search($query) {
1545
-		return $this->searchCommon('search', array('%' . $query . '%'));
1545
+		return $this->searchCommon('search', array('%'.$query.'%'));
1546 1546
 	}
1547 1547
 
1548 1548
 	/**
@@ -1593,10 +1593,10 @@  discard block
 block discarded – undo
1593 1593
 
1594 1594
 			$results = call_user_func_array(array($cache, $method), $args);
1595 1595
 			foreach ($results as $result) {
1596
-				if (substr($mountPoint . $result['path'], 0, $rootLength + 1) === $this->fakeRoot . '/') {
1596
+				if (substr($mountPoint.$result['path'], 0, $rootLength + 1) === $this->fakeRoot.'/') {
1597 1597
 					$internalPath = $result['path'];
1598
-					$path = $mountPoint . $result['path'];
1599
-					$result['path'] = substr($mountPoint . $result['path'], $rootLength);
1598
+					$path = $mountPoint.$result['path'];
1599
+					$result['path'] = substr($mountPoint.$result['path'], $rootLength);
1600 1600
 					$owner = \OC::$server->getUserManager()->get($storage->getOwner($internalPath));
1601 1601
 					$files[] = new FileInfo($path, $storage, $internalPath, $result, $mount, $owner);
1602 1602
 				}
@@ -1614,8 +1614,8 @@  discard block
 block discarded – undo
1614 1614
 					if ($results) {
1615 1615
 						foreach ($results as $result) {
1616 1616
 							$internalPath = $result['path'];
1617
-							$result['path'] = rtrim($relativeMountPoint . $result['path'], '/');
1618
-							$path = rtrim($mountPoint . $internalPath, '/');
1617
+							$result['path'] = rtrim($relativeMountPoint.$result['path'], '/');
1618
+							$path = rtrim($mountPoint.$internalPath, '/');
1619 1619
 							$owner = \OC::$server->getUserManager()->get($storage->getOwner($internalPath));
1620 1620
 							$files[] = new FileInfo($path, $storage, $internalPath, $result, $mount, $owner);
1621 1621
 						}
@@ -1636,7 +1636,7 @@  discard block
 block discarded – undo
1636 1636
 	public function getOwner($path) {
1637 1637
 		$info = $this->getFileInfo($path);
1638 1638
 		if (!$info) {
1639
-			throw new NotFoundException($path . ' not found while trying to get owner');
1639
+			throw new NotFoundException($path.' not found while trying to get owner');
1640 1640
 		}
1641 1641
 		return $info->getOwner()->getUID();
1642 1642
 	}
@@ -1670,7 +1670,7 @@  discard block
 block discarded – undo
1670 1670
 	 * @return string
1671 1671
 	 */
1672 1672
 	public function getPath($id) {
1673
-		$id = (int)$id;
1673
+		$id = (int) $id;
1674 1674
 		$manager = Filesystem::getMountManager();
1675 1675
 		$mounts = $manager->findIn($this->fakeRoot);
1676 1676
 		$mounts[] = $manager->find($this->fakeRoot);
@@ -1685,7 +1685,7 @@  discard block
 block discarded – undo
1685 1685
 				$cache = $mount->getStorage()->getCache();
1686 1686
 				$internalPath = $cache->getPathById($id);
1687 1687
 				if (is_string($internalPath)) {
1688
-					$fullPath = $mount->getMountPoint() . $internalPath;
1688
+					$fullPath = $mount->getMountPoint().$internalPath;
1689 1689
 					if (!is_null($path = $this->getRelativePath($fullPath))) {
1690 1690
 						return $path;
1691 1691
 					}
@@ -1728,10 +1728,10 @@  discard block
 block discarded – undo
1728 1728
 		}
1729 1729
 
1730 1730
 		// note: cannot use the view because the target is already locked
1731
-		$fileId = (int)$targetStorage->getCache()->getId($targetInternalPath);
1731
+		$fileId = (int) $targetStorage->getCache()->getId($targetInternalPath);
1732 1732
 		if ($fileId === -1) {
1733 1733
 			// target might not exist, need to check parent instead
1734
-			$fileId = (int)$targetStorage->getCache()->getId(dirname($targetInternalPath));
1734
+			$fileId = (int) $targetStorage->getCache()->getId(dirname($targetInternalPath));
1735 1735
 		}
1736 1736
 
1737 1737
 		// check if any of the parents were shared by the current owner (include collections)
@@ -1831,7 +1831,7 @@  discard block
 block discarded – undo
1831 1831
 		$resultPath = '';
1832 1832
 		foreach ($parts as $part) {
1833 1833
 			if ($part) {
1834
-				$resultPath .= '/' . $part;
1834
+				$resultPath .= '/'.$part;
1835 1835
 				$result[] = $resultPath;
1836 1836
 			}
1837 1837
 		}
@@ -2081,16 +2081,16 @@  discard block
 block discarded – undo
2081 2081
 	public function getUidAndFilename($filename) {
2082 2082
 		$info = $this->getFileInfo($filename);
2083 2083
 		if (!$info instanceof \OCP\Files\FileInfo) {
2084
-			throw new NotFoundException($this->getAbsolutePath($filename) . ' not found');
2084
+			throw new NotFoundException($this->getAbsolutePath($filename).' not found');
2085 2085
 		}
2086 2086
 		$uid = $info->getOwner()->getUID();
2087 2087
 		if ($uid != \OCP\User::getUser()) {
2088 2088
 			Filesystem::initMountPoints($uid);
2089
-			$ownerView = new View('/' . $uid . '/files');
2089
+			$ownerView = new View('/'.$uid.'/files');
2090 2090
 			try {
2091 2091
 				$filename = $ownerView->getPath($info['fileid']);
2092 2092
 			} catch (NotFoundException $e) {
2093
-				throw new NotFoundException('File with id ' . $info['fileid'] . ' not found for user ' . $uid);
2093
+				throw new NotFoundException('File with id '.$info['fileid'].' not found for user '.$uid);
2094 2094
 			}
2095 2095
 		}
2096 2096
 		return [$uid, $filename];
@@ -2107,7 +2107,7 @@  discard block
 block discarded – undo
2107 2107
 		$directoryParts = array_filter($directoryParts);
2108 2108
 		foreach ($directoryParts as $key => $part) {
2109 2109
 			$currentPathElements = array_slice($directoryParts, 0, $key);
2110
-			$currentPath = '/' . implode('/', $currentPathElements);
2110
+			$currentPath = '/'.implode('/', $currentPathElements);
2111 2111
 			if ($this->is_file($currentPath)) {
2112 2112
 				return false;
2113 2113
 			}
Please login to merge, or discard this patch.
lib/private/Files/SimpleFS/SimpleFile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 use OCP\Files\NotPermittedException;
27 27
 use OCP\Files\SimpleFS\ISimpleFile;
28 28
 
29
-class SimpleFile implements ISimpleFile  {
29
+class SimpleFile implements ISimpleFile {
30 30
 
31 31
 	/** @var File $file */
32 32
 	private $file;
Please login to merge, or discard this patch.
lib/private/Files/SimpleFS/SimpleFolder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 use OCP\Files\NotFoundException;
29 29
 use OCP\Files\SimpleFS\ISimpleFolder;
30 30
 
31
-class SimpleFolder implements ISimpleFolder   {
31
+class SimpleFolder implements ISimpleFolder {
32 32
 
33 33
 	/** @var Folder */
34 34
 	private $folder;
Please login to merge, or discard this patch.
lib/private/Files/Storage/Wrapper/Encoding.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 				// no point in continuing if the section was not found, use original path
81 81
 				return $fullPath;
82 82
 			}
83
-			$path = $convertedPath . '/';
83
+			$path = $convertedPath.'/';
84 84
 		}
85 85
 		$path = rtrim($path, '/');
86 86
 		return $path;
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 * @return string|null original or converted path, or null if none of the forms was found
97 97
 	 */
98 98
 	private function findPathToUseLastSection($basePath, $lastSection) {
99
-		$fullPath = $basePath . $lastSection;
99
+		$fullPath = $basePath.$lastSection;
100 100
 		if ($lastSection === '' || $this->isAscii($lastSection) || $this->storage->file_exists($fullPath)) {
101 101
 			$this->namesCache[$fullPath] = $fullPath;
102 102
 			return $fullPath;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 		} else {
109 109
 			$otherFormPath = \Normalizer::normalize($lastSection, \Normalizer::FORM_C);
110 110
 		}
111
-		$otherFullPath = $basePath . $otherFormPath;
111
+		$otherFullPath = $basePath.$otherFormPath;
112 112
 		if ($this->storage->file_exists($otherFullPath)) {
113 113
 			$this->namesCache[$fullPath] = $otherFullPath;
114 114
 			return $otherFullPath;
Please login to merge, or discard this patch.
lib/private/Files/Storage/Wrapper/Jail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 		if ($path === '') {
54 54
 			return $this->rootPath;
55 55
 		} else {
56
-			return $this->rootPath . '/' . $path;
56
+			return $this->rootPath.'/'.$path;
57 57
 		}
58 58
 	}
59 59
 
Please login to merge, or discard this patch.
lib/private/Files/Storage/Home.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 	public function __construct($arguments) {
50 50
 		$this->user = $arguments['user'];
51 51
 		$datadir = $this->user->getHome();
52
-		$this->id = 'home::' . $this->user->getUID();
52
+		$this->id = 'home::'.$this->user->getUID();
53 53
 
54 54
 		parent::__construct(array('datadir' => $datadir));
55 55
 	}
Please login to merge, or discard this patch.
lib/private/Files/Storage/Temporary.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 /**
29 29
  * local storage backend in temporary folder for testing purpose
30 30
  */
31
-class Temporary extends Local{
31
+class Temporary extends Local {
32 32
 	public function __construct($arguments = null) {
33 33
 		parent::__construct(array('datadir' => \OC::$server->getTempManager()->getTemporaryFolder()));
34 34
 	}
Please login to merge, or discard this patch.
lib/private/Files/Storage/Local.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 		if ($this->datadir === '/') {
59 59
 			$this->realDataDir = $this->datadir;
60 60
 		} else {
61
-			$this->realDataDir = rtrim(realpath($this->datadir), '/') . '/';
61
+			$this->realDataDir = rtrim(realpath($this->datadir), '/').'/';
62 62
 		}
63 63
 		if (substr($this->datadir, -1) !== '/') {
64 64
 			$this->datadir .= '/';
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	}
71 71
 
72 72
 	public function getId() {
73
-		return 'local::' . $this->datadir;
73
+		return 'local::'.$this->datadir;
74 74
 	}
75 75
 
76 76
 	public function mkdir($path) {
@@ -228,17 +228,17 @@  discard block
 block discarded – undo
228 228
 		$dstParent = dirname($path2);
229 229
 
230 230
 		if (!$this->isUpdatable($srcParent)) {
231
-			\OCP\Util::writeLog('core', 'unable to rename, source directory is not writable : ' . $srcParent, \OCP\Util::ERROR);
231
+			\OCP\Util::writeLog('core', 'unable to rename, source directory is not writable : '.$srcParent, \OCP\Util::ERROR);
232 232
 			return false;
233 233
 		}
234 234
 
235 235
 		if (!$this->isUpdatable($dstParent)) {
236
-			\OCP\Util::writeLog('core', 'unable to rename, destination directory is not writable : ' . $dstParent, \OCP\Util::ERROR);
236
+			\OCP\Util::writeLog('core', 'unable to rename, destination directory is not writable : '.$dstParent, \OCP\Util::ERROR);
237 237
 			return false;
238 238
 		}
239 239
 
240 240
 		if (!$this->file_exists($path1)) {
241
-			\OCP\Util::writeLog('core', 'unable to rename, file does not exists : ' . $path1, \OCP\Util::ERROR);
241
+			\OCP\Util::writeLog('core', 'unable to rename, file does not exists : '.$path1, \OCP\Util::ERROR);
242 242
 			return false;
243 243
 		}
244 244
 
@@ -319,13 +319,13 @@  discard block
 block discarded – undo
319 319
 		foreach (scandir($physicalDir) as $item) {
320 320
 			if (\OC\Files\Filesystem::isIgnoredDir($item))
321 321
 				continue;
322
-			$physicalItem = $physicalDir . '/' . $item;
322
+			$physicalItem = $physicalDir.'/'.$item;
323 323
 
324 324
 			if (strstr(strtolower($item), strtolower($query)) !== false) {
325
-				$files[] = $dir . '/' . $item;
325
+				$files[] = $dir.'/'.$item;
326 326
 			}
327 327
 			if (is_dir($physicalItem)) {
328
-				$files = array_merge($files, $this->searchInDir($query, $dir . '/' . $item));
328
+				$files = array_merge($files, $this->searchInDir($query, $dir.'/'.$item));
329 329
 			}
330 330
 		}
331 331
 		return $files;
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
 	 * @throws ForbiddenException
355 355
 	 */
356 356
 	public function getSourcePath($path) {
357
-		$fullPath = $this->datadir . $path;
357
+		$fullPath = $this->datadir.$path;
358 358
 		if ($this->allowSymlinks || $path === '') {
359 359
 			return $fullPath;
360 360
 		}
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 			$realPath = realpath($pathToResolve);
366 366
 		}
367 367
 		if ($realPath) {
368
-			$realPath = $realPath . '/';
368
+			$realPath = $realPath.'/';
369 369
 		}
370 370
 		if (substr($realPath, 0, $this->dataDirLength) === $this->realDataDir) {
371 371
 			return $fullPath;
@@ -391,9 +391,9 @@  discard block
 block discarded – undo
391 391
 		if ($this->is_file($path)) {
392 392
 			$stat = $this->stat($path);
393 393
 			return md5(
394
-				$stat['mtime'] .
395
-				$stat['ino'] .
396
-				$stat['dev'] .
394
+				$stat['mtime'].
395
+				$stat['ino'].
396
+				$stat['dev'].
397 397
 				$stat['size']
398 398
 			);
399 399
 		} else {
Please login to merge, or discard this patch.
lib/private/Files/Storage/Common.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 			$this->mkdir($path2);
217 217
 			while ($file = readdir($dir)) {
218 218
 				if (!Filesystem::isIgnoredDir($file)) {
219
-					if (!$this->copy($path1 . '/' . $file, $path2 . '/' . $file)) {
219
+					if (!$this->copy($path1.'/'.$file, $path2.'/'.$file)) {
220 220
 						return false;
221 221
 					}
222 222
 				}
@@ -267,12 +267,12 @@  discard block
 block discarded – undo
267 267
 		if (is_resource($dh)) {
268 268
 			while (($file = readdir($dh)) !== false) {
269 269
 				if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
270
-					if ($this->is_dir($path . '/' . $file)) {
271
-						mkdir($target . '/' . $file);
272
-						$this->addLocalFolder($path . '/' . $file, $target . '/' . $file);
270
+					if ($this->is_dir($path.'/'.$file)) {
271
+						mkdir($target.'/'.$file);
272
+						$this->addLocalFolder($path.'/'.$file, $target.'/'.$file);
273 273
 					} else {
274
-						$tmp = $this->toTmpFile($path . '/' . $file);
275
-						rename($tmp, $target . '/' . $file);
274
+						$tmp = $this->toTmpFile($path.'/'.$file);
275
+						rename($tmp, $target.'/'.$file);
276 276
 					}
277 277
 				}
278 278
 			}
@@ -291,10 +291,10 @@  discard block
 block discarded – undo
291 291
 			while (($item = readdir($dh)) !== false) {
292 292
 				if (\OC\Files\Filesystem::isIgnoredDir($item)) continue;
293 293
 				if (strstr(strtolower($item), strtolower($query)) !== false) {
294
-					$files[] = $dir . '/' . $item;
294
+					$files[] = $dir.'/'.$item;
295 295
 				}
296
-				if ($this->is_dir($dir . '/' . $item)) {
297
-					$files = array_merge($files, $this->searchInDir($query, $dir . '/' . $item));
296
+				if ($this->is_dir($dir.'/'.$item)) {
297
+					$files = array_merge($files, $this->searchInDir($query, $dir.'/'.$item));
298 298
 				}
299 299
 			}
300 300
 		}
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 		if (!isset($this->watcher)) {
346 346
 			$this->watcher = new Watcher($storage);
347 347
 			$globalPolicy = \OC::$server->getConfig()->getSystemValue('filesystem_check_changes', Watcher::CHECK_NEVER);
348
-			$this->watcher->setPolicy((int)$this->getMountOption('filesystem_check_changes', $globalPolicy));
348
+			$this->watcher->setPolicy((int) $this->getMountOption('filesystem_check_changes', $globalPolicy));
349 349
 		}
350 350
 		return $this->watcher;
351 351
 	}
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 	 */
420 420
 	public function cleanPath($path) {
421 421
 		if (strlen($path) == 0 or $path[0] != '/') {
422
-			$path = '/' . $path;
422
+			$path = '/'.$path;
423 423
 		}
424 424
 
425 425
 		$output = array();
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 			if (is_resource($dh)) {
596 596
 				while ($result and ($file = readdir($dh)) !== false) {
597 597
 					if (!Filesystem::isIgnoredDir($file)) {
598
-						$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file);
598
+						$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath.'/'.$file, $targetInternalPath.'/'.$file);
599 599
 					}
600 600
 				}
601 601
 			}
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
 				$this->getCache()->remove($targetInternalPath);
622 622
 			}
623 623
 		}
624
-		return (bool)$result;
624
+		return (bool) $result;
625 625
 	}
626 626
 
627 627
 	/**
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
 			);
702 702
 		}
703 703
 		try {
704
-			$provider->acquireLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);
704
+			$provider->acquireLock('files/'.md5($this->getId().'::'.trim($path, '/')), $type);
705 705
 		} catch (LockedException $e) {
706 706
 			if ($logger) {
707 707
 				$logger->logException($e);
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
 			);
734 734
 		}
735 735
 		try {
736
-			$provider->releaseLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);
736
+			$provider->releaseLock('files/'.md5($this->getId().'::'.trim($path, '/')), $type);
737 737
 		} catch (LockedException $e) {
738 738
 			if ($logger) {
739 739
 				$logger->logException($e);
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
 			);
766 766
 		}
767 767
 		try {
768
-			$provider->changeLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);
768
+			$provider->changeLock('files/'.md5($this->getId().'::'.trim($path, '/')), $type);
769 769
 		} catch (LockedException $e) {
770 770
 			if ($logger) {
771 771
 				$logger->logException($e);
Please login to merge, or discard this patch.