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