Completed
Push — master ( 1dbd71...eac04a )
by Morris
14:56
created
lib/private/Files/Filesystem.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -409,17 +409,17 @@  discard block
 block discarded – undo
409 409
 		$userObject = $userManager->get($user);
410 410
 
411 411
 		if (is_null($userObject)) {
412
-			\OCP\Util::writeLog('files', ' Backends provided no user object for ' . $user, ILogger::ERROR);
412
+			\OCP\Util::writeLog('files', ' Backends provided no user object for '.$user, ILogger::ERROR);
413 413
 			// reset flag, this will make it possible to rethrow the exception if called again
414 414
 			unset(self::$usersSetup[$user]);
415
-			throw new \OC\User\NoUserException('Backends provided no user object for ' . $user);
415
+			throw new \OC\User\NoUserException('Backends provided no user object for '.$user);
416 416
 		}
417 417
 
418 418
 		$realUid = $userObject->getUID();
419 419
 		// workaround in case of different casings
420 420
 		if ($user !== $realUid) {
421 421
 			$stack = json_encode(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 50));
422
-			\OCP\Util::writeLog('files', 'initMountPoints() called with wrong user casing. This could be a bug. Expected: "' . $realUid . '" got "' . $user . '". Stack: ' . $stack, ILogger::WARN);
422
+			\OCP\Util::writeLog('files', 'initMountPoints() called with wrong user casing. This could be a bug. Expected: "'.$realUid.'" got "'.$user.'". Stack: '.$stack, ILogger::WARN);
423 423
 			$user = $realUid;
424 424
 
425 425
 			// again with the correct casing
@@ -452,11 +452,11 @@  discard block
 block discarded – undo
452 452
 		} else {
453 453
 			self::getMountManager()->addMount(new MountPoint(
454 454
 				new NullStorage([]),
455
-				'/' . $user
455
+				'/'.$user
456 456
 			));
457 457
 			self::getMountManager()->addMount(new MountPoint(
458 458
 				new NullStorage([]),
459
-				'/' . $user . '/files'
459
+				'/'.$user.'/files'
460 460
 			));
461 461
 		}
462 462
 		\OC_Hook::emit('OC_Filesystem', 'post_initMountPoints', array('user' => $user));
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 	private static function listenForNewMountProviders(MountProviderCollection $mountConfigManager, IUserManager $userManager) {
472 472
 		if (!self::$listeningForProviders) {
473 473
 			self::$listeningForProviders = true;
474
-			$mountConfigManager->listen('\OC\Files\Config', 'registerMountProvider', function (IMountProvider $provider) use ($userManager) {
474
+			$mountConfigManager->listen('\OC\Files\Config', 'registerMountProvider', function(IMountProvider $provider) use ($userManager) {
475 475
 				foreach (Filesystem::$usersSetup as $user => $setup) {
476 476
 					$userObject = $userManager->get($user);
477 477
 					if ($userObject) {
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
 	 * @return string
567 567
 	 */
568 568
 	static public function getLocalPath($path) {
569
-		$datadir = \OC_User::getHome(\OC_User::getUser()) . '/files';
569
+		$datadir = \OC_User::getHome(\OC_User::getUser()).'/files';
570 570
 		$newpath = $path;
571 571
 		if (strncmp($newpath, $datadir, strlen($datadir)) == 0) {
572 572
 			$newpath = substr($path, strlen($datadir));
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
 	static public function isValidPath($path) {
584 584
 		$path = self::normalizePath($path);
585 585
 		if (!$path || $path[0] !== '/') {
586
-			$path = '/' . $path;
586
+			$path = '/'.$path;
587 587
 		}
588 588
 		if (strpos($path, '/../') !== false || strrchr($path, '/') === '/..') {
589 589
 			return false;
@@ -804,7 +804,7 @@  discard block
 block discarded – undo
804 804
 		 *        conversion should get removed as soon as all existing
805 805
 		 *        function calls have been fixed.
806 806
 		 */
807
-		$path = (string)$path;
807
+		$path = (string) $path;
808 808
 
809 809
 		$cacheKey = json_encode([$path, $stripTrailingSlash, $isAbsolutePath, $keepUnicode]);
810 810
 
@@ -822,13 +822,13 @@  discard block
 block discarded – undo
822 822
 		}
823 823
 
824 824
 		//add leading slash, if it is already there we strip it anyway
825
-		$path = '/' . $path;
825
+		$path = '/'.$path;
826 826
 
827 827
 		$patterns = [
828
-			'/\\\\/s',          // no windows style slashes
828
+			'/\\\\/s', // no windows style slashes
829 829
 			'/\/\.(\/\.)?\//s', // remove '/./'
830
-			'/\/{2,}/s',        // remove squence of slashes
831
-			'/\/\.$/s',         // remove trailing /.
830
+			'/\/{2,}/s', // remove squence of slashes
831
+			'/\/\.$/s', // remove trailing /.
832 832
 		];
833 833
 
834 834
 		do {
Please login to merge, or discard this patch.