@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | if ($node instanceof SystemTagsObjectMappingCollection) { |
| 134 | 134 | // also add to collection |
| 135 | 135 | $node->createFile($tag->getId()); |
| 136 | - $url = $request->getBaseUrl() . 'systemtags/'; |
|
| 136 | + $url = $request->getBaseUrl().'systemtags/'; |
|
| 137 | 137 | } else { |
| 138 | 138 | $url = $request->getUrl(); |
| 139 | 139 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | $url .= '/'; |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | - $response->setHeader('Content-Location', $url . $tag->getId()); |
|
| 145 | + $response->setHeader('Content-Location', $url.$tag->getId()); |
|
| 146 | 146 | |
| 147 | 147 | // created |
| 148 | 148 | $response->setStatus(201); |
@@ -177,11 +177,11 @@ discard block |
||
| 177 | 177 | $userAssignable = true; |
| 178 | 178 | |
| 179 | 179 | if (isset($data['userVisible'])) { |
| 180 | - $userVisible = (bool)$data['userVisible']; |
|
| 180 | + $userVisible = (bool) $data['userVisible']; |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | if (isset($data['userAssignable'])) { |
| 184 | - $userAssignable = (bool)$data['userAssignable']; |
|
| 184 | + $userAssignable = (bool) $data['userAssignable']; |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | $groups = []; |
@@ -224,29 +224,29 @@ discard block |
||
| 224 | 224 | return; |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | - $propFind->handle(self::ID_PROPERTYNAME, function () use ($node) { |
|
| 227 | + $propFind->handle(self::ID_PROPERTYNAME, function() use ($node) { |
|
| 228 | 228 | return $node->getSystemTag()->getId(); |
| 229 | 229 | }); |
| 230 | 230 | |
| 231 | - $propFind->handle(self::DISPLAYNAME_PROPERTYNAME, function () use ($node) { |
|
| 231 | + $propFind->handle(self::DISPLAYNAME_PROPERTYNAME, function() use ($node) { |
|
| 232 | 232 | return $node->getSystemTag()->getName(); |
| 233 | 233 | }); |
| 234 | 234 | |
| 235 | - $propFind->handle(self::USERVISIBLE_PROPERTYNAME, function () use ($node) { |
|
| 235 | + $propFind->handle(self::USERVISIBLE_PROPERTYNAME, function() use ($node) { |
|
| 236 | 236 | return $node->getSystemTag()->isUserVisible() ? 'true' : 'false'; |
| 237 | 237 | }); |
| 238 | 238 | |
| 239 | - $propFind->handle(self::USERASSIGNABLE_PROPERTYNAME, function () use ($node) { |
|
| 239 | + $propFind->handle(self::USERASSIGNABLE_PROPERTYNAME, function() use ($node) { |
|
| 240 | 240 | // this is the tag's inherent property "is user assignable" |
| 241 | 241 | return $node->getSystemTag()->isUserAssignable() ? 'true' : 'false'; |
| 242 | 242 | }); |
| 243 | 243 | |
| 244 | - $propFind->handle(self::CANASSIGN_PROPERTYNAME, function () use ($node) { |
|
| 244 | + $propFind->handle(self::CANASSIGN_PROPERTYNAME, function() use ($node) { |
|
| 245 | 245 | // this is the effective permission for the current user |
| 246 | 246 | return $this->tagManager->canUserAssignTag($node->getSystemTag(), $this->userSession->getUser()) ? 'true' : 'false'; |
| 247 | 247 | }); |
| 248 | 248 | |
| 249 | - $propFind->handle(self::GROUPS_PROPERTYNAME, function () use ($node) { |
|
| 249 | + $propFind->handle(self::GROUPS_PROPERTYNAME, function() use ($node) { |
|
| 250 | 250 | if (!$this->groupManager->isAdmin($this->userSession->getUser()->getUID())) { |
| 251 | 251 | // property only available for admins |
| 252 | 252 | throw new Forbidden(); |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | self::USERVISIBLE_PROPERTYNAME, |
| 280 | 280 | self::USERASSIGNABLE_PROPERTYNAME, |
| 281 | 281 | self::GROUPS_PROPERTYNAME, |
| 282 | - ], function ($props) use ($node) { |
|
| 282 | + ], function($props) use ($node) { |
|
| 283 | 283 | $tag = $node->getSystemTag(); |
| 284 | 284 | $name = $tag->getName(); |
| 285 | 285 | $userVisible = $tag->isUserVisible(); |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | public function createDirectory($name) { |
| 42 | - throw new Forbidden('Permission denied to create file (filename ' . $name . ')'); |
|
| 42 | + throw new Forbidden('Permission denied to create file (filename '.$name.')'); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | public function getChild($name) { |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | */ |
| 85 | 85 | public function getSize() { |
| 86 | 86 | $children = $this->root->getChildren(); |
| 87 | - $sizes = array_map(function ($node) { |
|
| 87 | + $sizes = array_map(function($node) { |
|
| 88 | 88 | /** @var IFile $node */ |
| 89 | 89 | return $node->getSize(); |
| 90 | 90 | }, $children); |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | |
| 63 | 63 | $requestUri = \OC::$server->getRequest()->getRequestUri(); |
| 64 | 64 | |
| 65 | -$server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, function () { |
|
| 65 | +$server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, function() { |
|
| 66 | 66 | // use the view for the logged in user |
| 67 | 67 | return \OC\Files\Filesystem::getView(); |
| 68 | 68 | }); |
@@ -88,8 +88,8 @@ discard block |
||
| 88 | 88 | } catch (\Exception $e) { |
| 89 | 89 | $this->storage->checkStorageAvailability(); |
| 90 | 90 | throw new \Exception( |
| 91 | - 'Error while scanning remote share: "' . |
|
| 92 | - $this->storage->getRemote() . '" ' . |
|
| 91 | + 'Error while scanning remote share: "'. |
|
| 92 | + $this->storage->getRemote().'" '. |
|
| 93 | 93 | $e->getMessage() |
| 94 | 94 | ); |
| 95 | 95 | } |
@@ -97,8 +97,8 @@ discard block |
||
| 97 | 97 | $this->addResult($data['data'], ''); |
| 98 | 98 | } else { |
| 99 | 99 | throw new \Exception( |
| 100 | - 'Error while scanning remote share: "' . |
|
| 101 | - $this->storage->getRemote() . '"' |
|
| 100 | + 'Error while scanning remote share: "'. |
|
| 101 | + $this->storage->getRemote().'"' |
|
| 102 | 102 | ); |
| 103 | 103 | } |
| 104 | 104 | } |
@@ -113,14 +113,14 @@ discard block |
||
| 113 | 113 | $children = []; |
| 114 | 114 | foreach ($data['children'] as $child) { |
| 115 | 115 | $children[$child['name']] = true; |
| 116 | - $this->addResult($child, ltrim($path . '/' . $child['name'], '/')); |
|
| 116 | + $this->addResult($child, ltrim($path.'/'.$child['name'], '/')); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | $existingCache = $this->cache->getFolderContentsById($id); |
| 120 | 120 | foreach ($existingCache as $existingChild) { |
| 121 | 121 | // if an existing child is not in the new data, remove it |
| 122 | 122 | if (!isset($children[$existingChild['name']])) { |
| 123 | - $this->cache->remove(ltrim($path . '/' . $existingChild['name'], '/')); |
|
| 123 | + $this->cache->remove(ltrim($path.'/'.$existingChild['name'], '/')); |
|
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | } |
@@ -55,8 +55,8 @@ |
||
| 55 | 55 | $logger = \OC::$server->getLogger(); |
| 56 | 56 | |
| 57 | 57 | $sql = |
| 58 | - 'DELETE FROM `*PREFIX*share` ' . |
|
| 59 | - 'WHERE `item_type` in (\'file\', \'folder\') ' . |
|
| 58 | + 'DELETE FROM `*PREFIX*share` '. |
|
| 59 | + 'WHERE `item_type` in (\'file\', \'folder\') '. |
|
| 60 | 60 | 'AND NOT EXISTS (SELECT `fileid` FROM `*PREFIX*filecache` WHERE `file_source` = `fileid`)'; |
| 61 | 61 | |
| 62 | 62 | $deletedEntries = $connection->executeUpdate($sql); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | protected function getPath($user, $path) { |
| 102 | 102 | $node = $this->rootFolder->getUserFolder($user)->get($path); |
| 103 | - return 'files/' . md5($node->getStorage()->getId() . '::' . trim($node->getInternalPath(), '/')); |
|
| 103 | + return 'files/'.md5($node->getStorage()->getId().'::'.trim($node->getInternalPath(), '/')); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /** |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | try { |
| 138 | 138 | $lockingProvider->acquireLock($path, $type); |
| 139 | - $this->config->setAppValue('testing', 'locking_' . $path, $type); |
|
| 139 | + $this->config->setAppValue('testing', 'locking_'.$path, $type); |
|
| 140 | 140 | return new DataResponse(); |
| 141 | 141 | } catch (LockedException $e) { |
| 142 | 142 | throw new OCSException('', Http::STATUS_LOCKED, $e); |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | try { |
| 165 | 165 | $lockingProvider->changeLock($path, $type); |
| 166 | - $this->config->setAppValue('testing', 'locking_' . $path, $type); |
|
| 166 | + $this->config->setAppValue('testing', 'locking_'.$path, $type); |
|
| 167 | 167 | return new DataResponse(); |
| 168 | 168 | } catch (LockedException $e) { |
| 169 | 169 | throw new OCSException('', Http::STATUS_LOCKED, $e); |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | |
| 191 | 191 | try { |
| 192 | 192 | $lockingProvider->releaseLock($path, $type); |
| 193 | - $this->config->deleteAppValue('testing', 'locking_' . $path); |
|
| 193 | + $this->config->deleteAppValue('testing', 'locking_'.$path); |
|
| 194 | 194 | return new DataResponse(); |
| 195 | 195 | } catch (LockedException $e) { |
| 196 | 196 | throw new OCSException('', Http::STATUS_LOCKED, $e); |
@@ -233,9 +233,9 @@ discard block |
||
| 233 | 233 | if (strpos($lock, 'locking_') === 0) { |
| 234 | 234 | $path = substr($lock, strlen('locking_')); |
| 235 | 235 | |
| 236 | - if ($type === ILockingProvider::LOCK_EXCLUSIVE && (int)$this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_EXCLUSIVE) { |
|
| 236 | + if ($type === ILockingProvider::LOCK_EXCLUSIVE && (int) $this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_EXCLUSIVE) { |
|
| 237 | 237 | $lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock)); |
| 238 | - } elseif ($type === ILockingProvider::LOCK_SHARED && (int)$this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_SHARED) { |
|
| 238 | + } elseif ($type === ILockingProvider::LOCK_SHARED && (int) $this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_SHARED) { |
|
| 239 | 239 | $lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock)); |
| 240 | 240 | } else { |
| 241 | 241 | $lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock)); |
@@ -197,7 +197,7 @@ |
||
| 197 | 197 | } catch (NotFoundException $e) { |
| 198 | 198 | return new DataResponse( |
| 199 | 199 | [ |
| 200 | - 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', [$id]) |
|
| 200 | + 'message' => (string) $this->l10n->t('Storage with ID "%d" not found', [$id]) |
|
| 201 | 201 | ], |
| 202 | 202 | Http::STATUS_NOT_FOUND |
| 203 | 203 | ); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } catch (NotFoundException $e) { |
| 123 | 123 | return new DataResponse( |
| 124 | 124 | [ |
| 125 | - 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', [$id]) |
|
| 125 | + 'message' => (string) $this->l10n->t('Storage with ID "%d" not found', [$id]) |
|
| 126 | 126 | ], |
| 127 | 127 | Http::STATUS_NOT_FOUND |
| 128 | 128 | ); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | } else { |
| 163 | 163 | return new DataResponse( |
| 164 | 164 | [ |
| 165 | - 'message' => (string)$this->l10n->t('Storage with ID "%d" is not user editable', [$id]) |
|
| 165 | + 'message' => (string) $this->l10n->t('Storage with ID "%d" is not user editable', [$id]) |
|
| 166 | 166 | ], |
| 167 | 167 | Http::STATUS_FORBIDDEN |
| 168 | 168 | ); |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | } catch (NotFoundException $e) { |
| 171 | 171 | return new DataResponse( |
| 172 | 172 | [ |
| 173 | - 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', [$id]) |
|
| 173 | + 'message' => (string) $this->l10n->t('Storage with ID "%d" not found', [$id]) |
|
| 174 | 174 | ], |
| 175 | 175 | Http::STATUS_NOT_FOUND |
| 176 | 176 | ); |