@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | * @suppress SqlInjectionChecker |
62 | 62 | */ |
63 | 63 | public function propagateChange($internalPath, $time, $sizeDifference = 0) { |
64 | - $storageId = (int)$this->storage->getStorageCache()->getNumericId(); |
|
64 | + $storageId = (int) $this->storage->getStorageCache()->getNumericId(); |
|
65 | 65 | |
66 | 66 | $parents = $this->getParents($internalPath); |
67 | 67 | |
@@ -76,12 +76,12 @@ discard block |
||
76 | 76 | $etag = uniqid(); // since we give all folders the same etag we don't ask the storage for the etag |
77 | 77 | |
78 | 78 | $builder = $this->connection->getQueryBuilder(); |
79 | - $hashParams = array_map(function ($hash) use ($builder) { |
|
79 | + $hashParams = array_map(function($hash) use ($builder) { |
|
80 | 80 | return $builder->expr()->literal($hash); |
81 | 81 | }, $parentHashes); |
82 | 82 | |
83 | 83 | $builder->update('filecache') |
84 | - ->set('mtime', $builder->createFunction('GREATEST(`mtime`, ' . $builder->createNamedParameter((int)$time, IQueryBuilder::PARAM_INT) . ')')) |
|
84 | + ->set('mtime', $builder->createFunction('GREATEST(`mtime`, '.$builder->createNamedParameter((int) $time, IQueryBuilder::PARAM_INT).')')) |
|
85 | 85 | ->set('etag', $builder->createNamedParameter($etag, IQueryBuilder::PARAM_STR)) |
86 | 86 | ->where($builder->expr()->eq('storage', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT))) |
87 | 87 | ->andWhere($builder->expr()->in('path_hash', $hashParams)); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | // we need to do size separably so we can ignore entries with uncalculated size |
93 | 93 | $builder = $this->connection->getQueryBuilder(); |
94 | 94 | $builder->update('filecache') |
95 | - ->set('size', $builder->createFunction('`size` + ' . $builder->createNamedParameter($sizeDifference))) |
|
95 | + ->set('size', $builder->createFunction('`size` + '.$builder->createNamedParameter($sizeDifference))) |
|
96 | 96 | ->where($builder->expr()->eq('storage', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT))) |
97 | 97 | ->andWhere($builder->expr()->in('path_hash', $hashParams)) |
98 | 98 | ->andWhere($builder->expr()->gt('size', $builder->expr()->literal(-1, IQueryBuilder::PARAM_INT))); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $parents = []; |
108 | 108 | foreach ($parts as $part) { |
109 | 109 | $parents[] = $parent; |
110 | - $parent = trim($parent . '/' . $part, '/'); |
|
110 | + $parent = trim($parent.'/'.$part, '/'); |
|
111 | 111 | } |
112 | 112 | return $parents; |
113 | 113 | } |
@@ -152,17 +152,17 @@ discard block |
||
152 | 152 | $this->connection->beginTransaction(); |
153 | 153 | |
154 | 154 | $query = $this->connection->getQueryBuilder(); |
155 | - $storageId = (int)$this->storage->getStorageCache()->getNumericId(); |
|
155 | + $storageId = (int) $this->storage->getStorageCache()->getNumericId(); |
|
156 | 156 | |
157 | 157 | $query->update('filecache') |
158 | - ->set('mtime', $query->createFunction('GREATEST(`mtime`, ' . $query->createParameter('time') . ')')) |
|
158 | + ->set('mtime', $query->createFunction('GREATEST(`mtime`, '.$query->createParameter('time').')')) |
|
159 | 159 | ->set('etag', $query->expr()->literal(uniqid())) |
160 | 160 | ->where($query->expr()->eq('storage', $query->expr()->literal($storageId, IQueryBuilder::PARAM_INT))) |
161 | 161 | ->andWhere($query->expr()->eq('path_hash', $query->createParameter('hash'))); |
162 | 162 | |
163 | 163 | $sizeQuery = $this->connection->getQueryBuilder(); |
164 | 164 | $sizeQuery->update('filecache') |
165 | - ->set('size', $sizeQuery->createFunction('`size` + ' . $sizeQuery->createParameter('size'))) |
|
165 | + ->set('size', $sizeQuery->createFunction('`size` + '.$sizeQuery->createParameter('size'))) |
|
166 | 166 | ->where($query->expr()->eq('storage', $query->expr()->literal($storageId, IQueryBuilder::PARAM_INT))) |
167 | 167 | ->andWhere($query->expr()->eq('path_hash', $query->createParameter('hash'))) |
168 | 168 | ->andWhere($sizeQuery->expr()->gt('size', $sizeQuery->expr()->literal(-1, IQueryBuilder::PARAM_INT))); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | public function __construct(ILogger $logger) { |
73 | 73 | $this->logger = $logger; |
74 | 74 | $baseUrl = \OC::$WEBROOT; |
75 | - if(!(\OC::$server->getConfig()->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) { |
|
75 | + if (!(\OC::$server->getConfig()->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) { |
|
76 | 76 | $baseUrl = \OC::$server->getURLGenerator()->linkTo('', 'index.php'); |
77 | 77 | } |
78 | 78 | if (!\OC::$CLI && isset($_SERVER['REQUEST_METHOD'])) { |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | $this->routingFiles = []; |
99 | 99 | foreach (\OC_APP::getEnabledApps() as $app) { |
100 | 100 | $appPath = \OC_App::getAppPath($app); |
101 | - if($appPath !== false) { |
|
102 | - $file = $appPath . '/appinfo/routes.php'; |
|
101 | + if ($appPath !== false) { |
|
102 | + $file = $appPath.'/appinfo/routes.php'; |
|
103 | 103 | if (file_exists($file)) { |
104 | 104 | $this->routingFiles[$app] = $file; |
105 | 105 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | * @param null|string $app |
116 | 116 | */ |
117 | 117 | public function loadRoutes($app = null) { |
118 | - if(is_string($app)) { |
|
118 | + if (is_string($app)) { |
|
119 | 119 | $app = \OC_App::cleanAppId($app); |
120 | 120 | } |
121 | 121 | |
@@ -130,14 +130,14 @@ discard block |
||
130 | 130 | if (isset($this->loadedApps[$app])) { |
131 | 131 | return; |
132 | 132 | } |
133 | - $file = \OC_App::getAppPath($app) . '/appinfo/routes.php'; |
|
133 | + $file = \OC_App::getAppPath($app).'/appinfo/routes.php'; |
|
134 | 134 | if ($file !== false && file_exists($file)) { |
135 | 135 | $routingFiles = [$app => $file]; |
136 | 136 | } else { |
137 | 137 | $routingFiles = []; |
138 | 138 | } |
139 | 139 | } |
140 | - \OC::$server->getEventLogger()->start('loadroutes' . $requestedApp, 'Loading Routes'); |
|
140 | + \OC::$server->getEventLogger()->start('loadroutes'.$requestedApp, 'Loading Routes'); |
|
141 | 141 | foreach ($routingFiles as $app => $file) { |
142 | 142 | if (!isset($this->loadedApps[$app])) { |
143 | 143 | if (!\OC_App::isAppLoaded($app)) { |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $this->useCollection($app); |
151 | 151 | $this->requireRouteFile($file, $app); |
152 | 152 | $collection = $this->getCollection($app); |
153 | - $collection->addPrefix('/apps/' . $app); |
|
153 | + $collection->addPrefix('/apps/'.$app); |
|
154 | 154 | $this->root->addCollection($collection); |
155 | 155 | |
156 | 156 | // Also add the OCS collection |
@@ -162,8 +162,8 @@ discard block |
||
162 | 162 | if (!isset($this->loadedApps['core'])) { |
163 | 163 | $this->loadedApps['core'] = true; |
164 | 164 | $this->useCollection('root'); |
165 | - require_once __DIR__ . '/../../../settings/routes.php'; |
|
166 | - require_once __DIR__ . '/../../../core/routes.php'; |
|
165 | + require_once __DIR__.'/../../../settings/routes.php'; |
|
166 | + require_once __DIR__.'/../../../core/routes.php'; |
|
167 | 167 | |
168 | 168 | // Also add the OCS collection |
169 | 169 | $collection = $this->getCollection('root.ocs'); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $collection->addPrefix('/ocs'); |
176 | 176 | $this->root->addCollection($collection); |
177 | 177 | } |
178 | - \OC::$server->getEventLogger()->end('loadroutes' . $requestedApp); |
|
178 | + \OC::$server->getEventLogger()->end('loadroutes'.$requestedApp); |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | /** |
@@ -246,14 +246,14 @@ discard block |
||
246 | 246 | public function match($url) { |
247 | 247 | if (substr($url, 0, 6) === '/apps/') { |
248 | 248 | // empty string / 'apps' / $app / rest of the route |
249 | - list(, , $app,) = explode('/', $url, 4); |
|
249 | + list(,, $app,) = explode('/', $url, 4); |
|
250 | 250 | |
251 | 251 | $app = \OC_App::cleanAppId($app); |
252 | 252 | \OC::$REQUESTEDAPP = $app; |
253 | 253 | $this->loadRoutes($app); |
254 | 254 | } else if (substr($url, 0, 13) === '/ocsapp/apps/') { |
255 | 255 | // empty string / 'ocsapp' / 'apps' / $app / rest of the route |
256 | - list(, , , $app,) = explode('/', $url, 5); |
|
256 | + list(,,, $app,) = explode('/', $url, 5); |
|
257 | 257 | |
258 | 258 | $app = \OC_App::cleanAppId($app); |
259 | 259 | \OC::$REQUESTEDAPP = $app; |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | // However, since Symfony does not allow empty route names, the route |
278 | 278 | // we need to match is '/', so we need to append the '/' here. |
279 | 279 | try { |
280 | - $parameters = $matcher->match($url . '/'); |
|
280 | + $parameters = $matcher->match($url.'/'); |
|
281 | 281 | } catch (ResourceNotFoundException $newException) { |
282 | 282 | // If we still didn't match a route, we throw the original exception |
283 | 283 | throw $e; |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | if (is_array($routes)) { |
368 | 368 | $appNameSpace = App::buildAppNamespace($appName); |
369 | 369 | |
370 | - $applicationClassName = $appNameSpace . '\\AppInfo\\Application'; |
|
370 | + $applicationClassName = $appNameSpace.'\\AppInfo\\Application'; |
|
371 | 371 | |
372 | 372 | if (class_exists($applicationClassName)) { |
373 | 373 | $application = new $applicationClassName(); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | return new DataResponse(); |
85 | 85 | } |
86 | 86 | |
87 | - $this->logger->error('Could not accept federated share with id: ' . $id, |
|
87 | + $this->logger->error('Could not accept federated share with id: '.$id, |
|
88 | 88 | ['app' => 'files_sharing']); |
89 | 89 | |
90 | 90 | throw new OCSNotFoundException('wrong share ID, share doesn\'t exist.'); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | * @return array enriched share info with data from the filecache |
116 | 116 | */ |
117 | 117 | private static function extendShareInfo($share) { |
118 | - $view = new \OC\Files\View('/' . \OC_User::getUser() . '/files/'); |
|
118 | + $view = new \OC\Files\View('/'.\OC_User::getUser().'/files/'); |
|
119 | 119 | $info = $view->getFileInfo($share['mountpoint']); |
120 | 120 | |
121 | 121 | $share['mimetype'] = $info->getMimetype(); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | throw new OCSNotFoundException('Share does not exist'); |
179 | 179 | } |
180 | 180 | |
181 | - $mountPoint = '/' . \OC_User::getUser() . '/files' . $shareInfo['mountpoint']; |
|
181 | + $mountPoint = '/'.\OC_User::getUser().'/files'.$shareInfo['mountpoint']; |
|
182 | 182 | |
183 | 183 | if ($this->externalManager->removeShare($mountPoint) === true) { |
184 | 184 | return new DataResponse(); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $owner = isset($_POST['owner']) ? $_POST['owner'] : null; |
127 | 127 | $sharedBy = isset($_POST['sharedBy']) ? $_POST['sharedBy'] : null; |
128 | 128 | $shareWith = isset($_POST['shareWith']) ? $_POST['shareWith'] : null; |
129 | - $remoteId = isset($_POST['remoteId']) ? (int)$_POST['remoteId'] : null; |
|
129 | + $remoteId = isset($_POST['remoteId']) ? (int) $_POST['remoteId'] : null; |
|
130 | 130 | $sharedByFederatedId = isset($_POST['sharedByFederatedId']) ? $_POST['sharedByFederatedId'] : null; |
131 | 131 | $ownerFederatedId = isset($_POST['ownerFederatedId']) ? $_POST['ownerFederatedId'] : null; |
132 | 132 | |
@@ -137,13 +137,13 @@ discard block |
||
137 | 137 | } |
138 | 138 | |
139 | 139 | // FIXME this should be a method in the user management instead |
140 | - \OCP\Util::writeLog('files_sharing', 'shareWith before, ' . $shareWith, \OCP\Util::DEBUG); |
|
140 | + \OCP\Util::writeLog('files_sharing', 'shareWith before, '.$shareWith, \OCP\Util::DEBUG); |
|
141 | 141 | \OCP\Util::emitHook( |
142 | 142 | '\OCA\Files_Sharing\API\Server2Server', |
143 | 143 | 'preLoginNameUsedAsUserName', |
144 | 144 | array('uid' => &$shareWith) |
145 | 145 | ); |
146 | - \OCP\Util::writeLog('files_sharing', 'shareWith after, ' . $shareWith, \OCP\Util::DEBUG); |
|
146 | + \OCP\Util::writeLog('files_sharing', 'shareWith after, '.$shareWith, \OCP\Util::DEBUG); |
|
147 | 147 | |
148 | 148 | if (!\OCP\User::userExists($shareWith)) { |
149 | 149 | throw new OCSException('User does not exists', 400); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | ->setType('remote_share') |
180 | 180 | ->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_RECEIVED, [$ownerFederatedId, trim($name, '/')]) |
181 | 181 | ->setAffectedUser($shareWith) |
182 | - ->setObject('remote_share', (int)$shareId, $name); |
|
182 | + ->setObject('remote_share', (int) $shareId, $name); |
|
183 | 183 | \OC::$server->getActivityManager()->publish($event); |
184 | 184 | |
185 | 185 | $urlGenerator = \OC::$server->getURLGenerator(); |
@@ -194,20 +194,20 @@ discard block |
||
194 | 194 | |
195 | 195 | $declineAction = $notification->createAction(); |
196 | 196 | $declineAction->setLabel('decline') |
197 | - ->setLink($urlGenerator->getAbsoluteURL($urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/' . $shareId)), 'DELETE'); |
|
197 | + ->setLink($urlGenerator->getAbsoluteURL($urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/'.$shareId)), 'DELETE'); |
|
198 | 198 | $notification->addAction($declineAction); |
199 | 199 | |
200 | 200 | $acceptAction = $notification->createAction(); |
201 | 201 | $acceptAction->setLabel('accept') |
202 | - ->setLink($urlGenerator->getAbsoluteURL($urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/' . $shareId)), 'POST'); |
|
202 | + ->setLink($urlGenerator->getAbsoluteURL($urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/'.$shareId)), 'POST'); |
|
203 | 203 | $notification->addAction($acceptAction); |
204 | 204 | |
205 | 205 | $notificationManager->notify($notification); |
206 | 206 | |
207 | 207 | return new Http\DataResponse(); |
208 | 208 | } catch (\Exception $e) { |
209 | - \OCP\Util::writeLog('files_sharing', 'server can not add remote share, ' . $e->getMessage(), \OCP\Util::ERROR); |
|
210 | - throw new OCSException('internal server error, was not able to add share from ' . $remote, 500); |
|
209 | + \OCP\Util::writeLog('files_sharing', 'server can not add remote share, '.$e->getMessage(), \OCP\Util::ERROR); |
|
210 | + throw new OCSException('internal server error, was not able to add share from '.$remote, 500); |
|
211 | 211 | } |
212 | 212 | } |
213 | 213 | |
@@ -230,8 +230,8 @@ discard block |
||
230 | 230 | |
231 | 231 | $token = $this->request->getParam('token', null); |
232 | 232 | $shareWith = $this->request->getParam('shareWith', null); |
233 | - $permission = (int)$this->request->getParam('permission', null); |
|
234 | - $remoteId = (int)$this->request->getParam('remoteId', null); |
|
233 | + $permission = (int) $this->request->getParam('permission', null); |
|
234 | + $remoteId = (int) $this->request->getParam('remoteId', null); |
|
235 | 235 | |
236 | 236 | if ($id === null || |
237 | 237 | $token === null || |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | $share->setSharedWith($shareWith); |
267 | 267 | try { |
268 | 268 | $result = $this->federatedShareProvider->create($share); |
269 | - $this->federatedShareProvider->storeRemoteId((int)$result->getId(), $remoteId); |
|
269 | + $this->federatedShareProvider->storeRemoteId((int) $result->getId(), $remoteId); |
|
270 | 270 | return new Http\DataResponse([ |
271 | 271 | 'token' => $result->getToken(), |
272 | 272 | 'remoteId' => $result->getId() |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | $notification = $notificationManager->createNotification(); |
446 | 446 | $notification->setApp('files_sharing') |
447 | 447 | ->setUser($share['user']) |
448 | - ->setObject('remote_share', (int)$share['id']); |
|
448 | + ->setObject('remote_share', (int) $share['id']); |
|
449 | 449 | $notificationManager->markProcessed($notification); |
450 | 450 | |
451 | 451 | $event = \OC::$server->getActivityManager()->generateEvent(); |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | ->setType('remote_share') |
454 | 454 | ->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_UNSHARED, [$owner->getId(), $path]) |
455 | 455 | ->setAffectedUser($user) |
456 | - ->setObject('remote_share', (int)$share['id'], $path); |
|
456 | + ->setObject('remote_share', (int) $share['id'], $path); |
|
457 | 457 | \OC::$server->getActivityManager()->publish($event); |
458 | 458 | } |
459 | 459 | |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | $validPermission = ctype_digit($permissions); |
596 | 596 | $validToken = $this->verifyShare($share, $token); |
597 | 597 | if ($validPermission && $validToken) { |
598 | - $this->updatePermissionsInDatabase($share, (int)$permissions); |
|
598 | + $this->updatePermissionsInDatabase($share, (int) $permissions); |
|
599 | 599 | } else { |
600 | 600 | throw new OCSBadRequestException(); |
601 | 601 | } |
@@ -84,7 +84,7 @@ |
||
84 | 84 | ->andWhere($qb->expr()->eq('configvalue', $qb->createNamedParameter($oldCode), IQueryBuilder::PARAM_STR)) |
85 | 85 | ->execute(); |
86 | 86 | |
87 | - $output->info('Changed ' . $affectedRows . ' setting(s) from "' . $oldCode . '" to "' . $newCode . '" in preferences table.'); |
|
87 | + $output->info('Changed '.$affectedRows.' setting(s) from "'.$oldCode.'" to "'.$newCode.'" in preferences table.'); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | use OCA\Testing\AlternativeHomeUserBackend; |
26 | 26 | |
27 | 27 | class Application extends App { |
28 | - public function __construct (array $urlParams = array()) { |
|
28 | + public function __construct(array $urlParams = array()) { |
|
29 | 29 | $appName = 'testing'; |
30 | 30 | parent::__construct($appName, $urlParams); |
31 | 31 |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | protected function getPath($user, $path) { |
100 | 100 | $node = $this->rootFolder->getUserFolder($user)->get($path); |
101 | - return 'files/' . md5($node->getStorage()->getId() . '::' . trim($node->getInternalPath(), '/')); |
|
101 | + return 'files/'.md5($node->getStorage()->getId().'::'.trim($node->getInternalPath(), '/')); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | |
135 | 135 | try { |
136 | 136 | $lockingProvider->acquireLock($path, $type); |
137 | - $this->config->setAppValue('testing', 'locking_' . $path, $type); |
|
137 | + $this->config->setAppValue('testing', 'locking_'.$path, $type); |
|
138 | 138 | return new DataResponse(); |
139 | 139 | } catch (LockedException $e) { |
140 | 140 | throw new OCSException('', Http::STATUS_LOCKED, $e); |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | |
162 | 162 | try { |
163 | 163 | $lockingProvider->changeLock($path, $type); |
164 | - $this->config->setAppValue('testing', 'locking_' . $path, $type); |
|
164 | + $this->config->setAppValue('testing', 'locking_'.$path, $type); |
|
165 | 165 | return new DataResponse(); |
166 | 166 | } catch (LockedException $e) { |
167 | 167 | throw new OCSException('', Http::STATUS_LOCKED, $e); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | |
189 | 189 | try { |
190 | 190 | $lockingProvider->releaseLock($path, $type); |
191 | - $this->config->deleteAppValue('testing', 'locking_' . $path); |
|
191 | + $this->config->deleteAppValue('testing', 'locking_'.$path); |
|
192 | 192 | return new DataResponse(); |
193 | 193 | } catch (LockedException $e) { |
194 | 194 | throw new OCSException('', Http::STATUS_LOCKED, $e); |
@@ -231,9 +231,9 @@ discard block |
||
231 | 231 | if (strpos($lock, 'locking_') === 0) { |
232 | 232 | $path = substr($lock, strlen('locking_')); |
233 | 233 | |
234 | - if ($type === ILockingProvider::LOCK_EXCLUSIVE && (int)$this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_EXCLUSIVE) { |
|
234 | + if ($type === ILockingProvider::LOCK_EXCLUSIVE && (int) $this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_EXCLUSIVE) { |
|
235 | 235 | $lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock)); |
236 | - } else if ($type === ILockingProvider::LOCK_SHARED && (int)$this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_SHARED) { |
|
236 | + } else if ($type === ILockingProvider::LOCK_SHARED && (int) $this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_SHARED) { |
|
237 | 237 | $lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock)); |
238 | 238 | } else { |
239 | 239 | $lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock)); |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | * @return bool |
51 | 51 | * @since 5.0.0 |
52 | 52 | */ |
53 | - static public function rmdirr( $dir ) { |
|
54 | - return \OC_Helper::rmdirr( $dir ); |
|
53 | + static public function rmdirr($dir) { |
|
54 | + return \OC_Helper::rmdirr($dir); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | * does NOT work for ownClouds filesystem, use OC_FileSystem::getMimeType instead |
62 | 62 | * @since 5.0.0 |
63 | 63 | */ |
64 | - static public function getMimeType( $path ) { |
|
64 | + static public function getMimeType($path) { |
|
65 | 65 | return \OC::$server->getMimeTypeDetector()->detect($path); |
66 | 66 | } |
67 | 67 | |
@@ -82,8 +82,8 @@ discard block |
||
82 | 82 | * @return int the number of bytes copied |
83 | 83 | * @since 5.0.0 |
84 | 84 | */ |
85 | - public static function streamCopy( $source, $target ) { |
|
86 | - list($count, ) = \OC_Helper::streamCopy( $source, $target ); |
|
85 | + public static function streamCopy($source, $target) { |
|
86 | + list($count,) = \OC_Helper::streamCopy($source, $target); |
|
87 | 87 | return $count; |
88 | 88 | } |
89 | 89 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * @deprecated 8.1.0 use getTemporaryFile() of \OCP\ITempManager - \OC::$server->getTempManager() |
97 | 97 | * @since 5.0.0 |
98 | 98 | */ |
99 | - public static function tmpFile( $postfix='' ) { |
|
99 | + public static function tmpFile($postfix = '') { |
|
100 | 100 | return \OC::$server->getTempManager()->getTemporaryFile($postfix); |
101 | 101 | } |
102 | 102 | |
@@ -131,6 +131,6 @@ discard block |
||
131 | 131 | * @since 5.0.0 |
132 | 132 | */ |
133 | 133 | public static function getStorage($app) { |
134 | - return \OC_App::getStorage( $app ); |
|
134 | + return \OC_App::getStorage($app); |
|
135 | 135 | } |
136 | 136 | } |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | * @param array $headers additional key value based headers |
47 | 47 | * @since 8.1.0 |
48 | 48 | */ |
49 | - public function __construct($data='', $statusCode=Http::STATUS_OK, |
|
50 | - $headers=[]) { |
|
49 | + public function __construct($data = '', $statusCode = Http::STATUS_OK, |
|
50 | + $headers = []) { |
|
51 | 51 | $this->data = $data; |
52 | 52 | $this->setStatus($statusCode); |
53 | 53 | $this->setHeaders(array_merge($this->getHeaders(), $headers)); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | * @return DataDisplayResponse Reference to this object |
71 | 71 | * @since 8.1.0 |
72 | 72 | */ |
73 | - public function setData($data){ |
|
73 | + public function setData($data) { |
|
74 | 74 | $this->data = $data; |
75 | 75 | |
76 | 76 | return $this; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @return string the data |
83 | 83 | * @since 8.1.0 |
84 | 84 | */ |
85 | - public function getData(){ |
|
85 | + public function getData() { |
|
86 | 86 | return $this->data; |
87 | 87 | } |
88 | 88 |