@@ -388,17 +388,17 @@ discard block |
||
388 | 388 | $userObject = $userManager->get($user); |
389 | 389 | |
390 | 390 | if (is_null($userObject)) { |
391 | - \OCP\Util::writeLog('files', ' Backends provided no user object for ' . $user, ILogger::ERROR); |
|
391 | + \OCP\Util::writeLog('files', ' Backends provided no user object for '.$user, ILogger::ERROR); |
|
392 | 392 | // reset flag, this will make it possible to rethrow the exception if called again |
393 | 393 | unset(self::$usersSetup[$user]); |
394 | - throw new \OC\User\NoUserException('Backends provided no user object for ' . $user); |
|
394 | + throw new \OC\User\NoUserException('Backends provided no user object for '.$user); |
|
395 | 395 | } |
396 | 396 | |
397 | 397 | $realUid = $userObject->getUID(); |
398 | 398 | // workaround in case of different casings |
399 | 399 | if ($user !== $realUid) { |
400 | 400 | $stack = json_encode(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 50)); |
401 | - \OCP\Util::writeLog('files', 'initMountPoints() called with wrong user casing. This could be a bug. Expected: "' . $realUid . '" got "' . $user . '". Stack: ' . $stack, ILogger::WARN); |
|
401 | + \OCP\Util::writeLog('files', 'initMountPoints() called with wrong user casing. This could be a bug. Expected: "'.$realUid.'" got "'.$user.'". Stack: '.$stack, ILogger::WARN); |
|
402 | 402 | $user = $realUid; |
403 | 403 | |
404 | 404 | // again with the correct casing |
@@ -435,11 +435,11 @@ discard block |
||
435 | 435 | } else { |
436 | 436 | self::getMountManager()->addMount(new MountPoint( |
437 | 437 | new NullStorage([]), |
438 | - '/' . $user |
|
438 | + '/'.$user |
|
439 | 439 | )); |
440 | 440 | self::getMountManager()->addMount(new MountPoint( |
441 | 441 | new NullStorage([]), |
442 | - '/' . $user . '/files' |
|
442 | + '/'.$user.'/files' |
|
443 | 443 | )); |
444 | 444 | } |
445 | 445 | \OC_Hook::emit('OC_Filesystem', 'post_initMountPoints', ['user' => $user]); |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | private static function listenForNewMountProviders(MountProviderCollection $mountConfigManager, IUserManager $userManager) { |
455 | 455 | if (!self::$listeningForProviders) { |
456 | 456 | self::$listeningForProviders = true; |
457 | - $mountConfigManager->listen('\OC\Files\Config', 'registerMountProvider', function (IMountProvider $provider) use ($userManager) { |
|
457 | + $mountConfigManager->listen('\OC\Files\Config', 'registerMountProvider', function(IMountProvider $provider) use ($userManager) { |
|
458 | 458 | foreach (Filesystem::$usersSetup as $user => $setup) { |
459 | 459 | $userObject = $userManager->get($user); |
460 | 460 | if ($userObject) { |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | * @return string |
550 | 550 | */ |
551 | 551 | public static function getLocalPath($path) { |
552 | - $datadir = \OC_User::getHome(\OC_User::getUser()) . '/files'; |
|
552 | + $datadir = \OC_User::getHome(\OC_User::getUser()).'/files'; |
|
553 | 553 | $newpath = $path; |
554 | 554 | if (strncmp($newpath, $datadir, strlen($datadir)) == 0) { |
555 | 555 | $newpath = substr($path, strlen($datadir)); |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | public static function isValidPath($path) { |
567 | 567 | $path = self::normalizePath($path); |
568 | 568 | if (!$path || $path[0] !== '/') { |
569 | - $path = '/' . $path; |
|
569 | + $path = '/'.$path; |
|
570 | 570 | } |
571 | 571 | if (strpos($path, '/../') !== false || strrchr($path, '/') === '/..') { |
572 | 572 | return false; |
@@ -783,7 +783,7 @@ discard block |
||
783 | 783 | * conversion should get removed as soon as all existing |
784 | 784 | * function calls have been fixed. |
785 | 785 | */ |
786 | - $path = (string)$path; |
|
786 | + $path = (string) $path; |
|
787 | 787 | |
788 | 788 | if ($path === '') { |
789 | 789 | return '/'; |
@@ -805,13 +805,13 @@ discard block |
||
805 | 805 | } |
806 | 806 | |
807 | 807 | //add leading slash, if it is already there we strip it anyway |
808 | - $path = '/' . $path; |
|
808 | + $path = '/'.$path; |
|
809 | 809 | |
810 | 810 | $patterns = [ |
811 | - '/\\\\/s', // no windows style slashes |
|
811 | + '/\\\\/s', // no windows style slashes |
|
812 | 812 | '/\/\.(\/\.)?\//s', // remove '/./' |
813 | - '/\/{2,}/s', // remove sequence of slashes |
|
814 | - '/\/\.$/s', // remove trailing /. |
|
813 | + '/\/{2,}/s', // remove sequence of slashes |
|
814 | + '/\/\.$/s', // remove trailing /. |
|
815 | 815 | ]; |
816 | 816 | |
817 | 817 | do { |