@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | if ($provider === null) { |
| 217 | - throw new ProviderException('No provider with id .' . $id . ' found.'); |
|
| 217 | + throw new ProviderException('No provider with id .'.$id.' found.'); |
|
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | return $provider; |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | |
| 242 | 242 | |
| 243 | 243 | if ($provider === null) { |
| 244 | - throw new ProviderException('No share provider for share type ' . $shareType); |
|
| 244 | + throw new ProviderException('No share provider for share type '.$shareType); |
|
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | return $provider; |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | $eventDispatcher->addListener(MapperEvent::EVENT_ASSIGN, $mapperListener); |
| 66 | 66 | $eventDispatcher->addListener(MapperEvent::EVENT_UNASSIGN, $mapperListener); |
| 67 | 67 | |
| 68 | -\OCA\Files\App::getNavigationManager()->add(function () { |
|
| 68 | +\OCA\Files\App::getNavigationManager()->add(function() { |
|
| 69 | 69 | $l = \OC::$server->getL10N('systemtags'); |
| 70 | 70 | return [ |
| 71 | 71 | 'id' => 'systemtagsfilter', |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $config = \OC::$server->getConfig(); |
| 52 | 52 | if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') { |
| 53 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 53 | + \OCA\Files\App::getNavigationManager()->add(function() { |
|
| 54 | 54 | $l = \OC::$server->getL10N('files_sharing'); |
| 55 | 55 | return [ |
| 56 | 56 | 'id' => 'sharingin', |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | }); |
| 63 | 63 | |
| 64 | 64 | if (\OCP\Util::isSharingDisabledForUser() === false) { |
| 65 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 65 | + \OCA\Files\App::getNavigationManager()->add(function() { |
|
| 66 | 66 | $l = \OC::$server->getL10N('files_sharing'); |
| 67 | 67 | return [ |
| 68 | 68 | 'id' => 'sharingout', |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | // Check if sharing by link is enabled |
| 77 | 77 | if ($config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') { |
| 78 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 78 | + \OCA\Files\App::getNavigationManager()->add(function() { |
|
| 79 | 79 | $l = \OC::$server->getL10N('files_sharing'); |
| 80 | 80 | return [ |
| 81 | 81 | 'id' => 'sharinglinks', |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | // register hooks |
| 29 | 29 | \OCA\Files_Trashbin\Trashbin::registerHooks(); |
| 30 | 30 | |
| 31 | -\OCA\Files\App::getNavigationManager()->add(function () { |
|
| 31 | +\OCA\Files\App::getNavigationManager()->add(function() { |
|
| 32 | 32 | $l = \OC::$server->getL10N('files_trashbin'); |
| 33 | 33 | return [ |
| 34 | 34 | 'id' => 'trashbin', |
@@ -119,9 +119,9 @@ |
||
| 119 | 119 | $elements = explode(' ', $fullName); |
| 120 | 120 | $result = ['', '', '', '', '']; |
| 121 | 121 | if (count($elements) > 2) { |
| 122 | - $result[0] = implode(' ', array_slice($elements, count($elements)-1)); |
|
| 122 | + $result[0] = implode(' ', array_slice($elements, count($elements) - 1)); |
|
| 123 | 123 | $result[1] = $elements[0]; |
| 124 | - $result[2] = implode(' ', array_slice($elements, 1, count($elements)-2)); |
|
| 124 | + $result[2] = implode(' ', array_slice($elements, 1, count($elements) - 2)); |
|
| 125 | 125 | } elseif (count($elements) === 2) { |
| 126 | 126 | $result[0] = $elements[1]; |
| 127 | 127 | $result[1] = $elements[0]; |
@@ -33,10 +33,10 @@ |
||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | public function setupDatabase($username) { |
| 36 | - $datadir = $this->config->getValue('datadirectory', \OC::$SERVERROOT . '/data'); |
|
| 36 | + $datadir = $this->config->getValue('datadirectory', \OC::$SERVERROOT.'/data'); |
|
| 37 | 37 | |
| 38 | 38 | //delete the old sqlite database first, might cause infinte loops otherwise |
| 39 | - if(file_exists("$datadir/owncloud.db")) { |
|
| 39 | + if (file_exists("$datadir/owncloud.db")) { |
|
| 40 | 40 | unlink("$datadir/owncloud.db"); |
| 41 | 41 | } |
| 42 | 42 | //in case of sqlite, we can always fill the database |
@@ -57,9 +57,9 @@ |
||
| 57 | 57 | * @return false |
| 58 | 58 | */ |
| 59 | 59 | function httpGet(RequestInterface $request, ResponseInterface $response) { |
| 60 | - $string = 'This is the WebDAV interface. It can only be accessed by ' . |
|
| 60 | + $string = 'This is the WebDAV interface. It can only be accessed by '. |
|
| 61 | 61 | 'WebDAV clients such as the Nextcloud desktop sync client.'; |
| 62 | - $stream = fopen('php://memory','r+'); |
|
| 62 | + $stream = fopen('php://memory', 'r+'); |
|
| 63 | 63 | fwrite($stream, $string); |
| 64 | 64 | rewind($stream); |
| 65 | 65 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $shares = array_merge($shares, $this->shareManager->getSharedWith($user->getUID(), \OCP\Share::SHARE_TYPE_CIRCLE, null, -1)); |
| 75 | 75 | |
| 76 | 76 | // filter out excluded shares and group shares that includes self |
| 77 | - $shares = array_filter($shares, function (\OCP\Share\IShare $share) use ($user) { |
|
| 77 | + $shares = array_filter($shares, function(\OCP\Share\IShare $share) use ($user) { |
|
| 78 | 78 | return $share->getPermissions() > 0 && $share->getShareOwner() !== $user->getUID(); |
| 79 | 79 | }); |
| 80 | 80 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | // null groups which usually appear with group backend |
| 187 | 187 | // caching inconsistencies |
| 188 | 188 | $this->logger->debug( |
| 189 | - 'Could not adjust share target for share ' . $share->getId() . ' to make it consistent: ' . $e->getMessage(), |
|
| 189 | + 'Could not adjust share target for share '.$share->getId().' to make it consistent: '.$e->getMessage(), |
|
| 190 | 190 | ['app' => 'files_sharing'] |
| 191 | 191 | ); |
| 192 | 192 | } |
@@ -74,13 +74,13 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function getMountsForUser(IUser $user) { |
| 76 | 76 | $loader = $this->loader; |
| 77 | - $mounts = array_map(function (IMountProvider $provider) use ($user, $loader) { |
|
| 77 | + $mounts = array_map(function(IMountProvider $provider) use ($user, $loader) { |
|
| 78 | 78 | return $provider->getMountsForUser($user, $loader); |
| 79 | 79 | }, $this->providers); |
| 80 | - $mounts = array_filter($mounts, function ($result) { |
|
| 80 | + $mounts = array_filter($mounts, function($result) { |
|
| 81 | 81 | return is_array($result); |
| 82 | 82 | }); |
| 83 | - return array_reduce($mounts, function (array $mounts, array $providerMounts) { |
|
| 83 | + return array_reduce($mounts, function(array $mounts, array $providerMounts) { |
|
| 84 | 84 | return array_merge($mounts, $providerMounts); |
| 85 | 85 | }, array()); |
| 86 | 86 | } |
@@ -89,10 +89,10 @@ discard block |
||
| 89 | 89 | // shared mount provider gets to go last since it needs to know existing files |
| 90 | 90 | // to check for name collisions |
| 91 | 91 | $firstMounts = []; |
| 92 | - $firstProviders = array_filter($this->providers, function (IMountProvider $provider) { |
|
| 92 | + $firstProviders = array_filter($this->providers, function(IMountProvider $provider) { |
|
| 93 | 93 | return (get_class($provider) !== 'OCA\Files_Sharing\MountProvider'); |
| 94 | 94 | }); |
| 95 | - $lastProviders = array_filter($this->providers, function (IMountProvider $provider) { |
|
| 95 | + $lastProviders = array_filter($this->providers, function(IMountProvider $provider) { |
|
| 96 | 96 | return (get_class($provider) === 'OCA\Files_Sharing\MountProvider'); |
| 97 | 97 | }); |
| 98 | 98 | foreach ($firstProviders as $provider) { |
@@ -128,11 +128,11 @@ discard block |
||
| 128 | 128 | $providers = array_reverse($this->homeProviders); // call the latest registered provider first to give apps an opportunity to overwrite builtin |
| 129 | 129 | foreach ($providers as $homeProvider) { |
| 130 | 130 | if ($mount = $homeProvider->getHomeMountForUser($user, $this->loader)) { |
| 131 | - $mount->setMountPoint('/' . $user->getUID()); //make sure the mountpoint is what we expect |
|
| 131 | + $mount->setMountPoint('/'.$user->getUID()); //make sure the mountpoint is what we expect |
|
| 132 | 132 | return $mount; |
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | - throw new \Exception('No home storage configured for user ' . $user); |
|
| 135 | + throw new \Exception('No home storage configured for user '.$user); |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | /** |