Completed
Pull Request — master (#3233)
by Christoph
14:41
created
lib/private/Contacts/ContactsMenu/ActionFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 	 * @return ILinkAction
52 52
 	 */
53 53
 	public function newEMailAction($icon, $name, $email) {
54
-		return $this->newLinkAction($icon, $name, 'mailto:' . urlencode($email));
54
+		return $this->newLinkAction($icon, $name, 'mailto:'.urlencode($email));
55 55
 	}
56 56
 
57 57
 }
Please login to merge, or discard this patch.
apps/dav/lib/Files/FileSearchBackend.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 		/** @var Folder $folder $results */
156 156
 		$results = $folder->search($query);
157 157
 
158
-		return array_map(function (Node $node) {
158
+		return array_map(function(Node $node) {
159 159
 			if ($node instanceof Folder) {
160 160
 				return new SearchResult(new \OCA\DAV\Connector\Sabre\Directory($this->view, $node, $this->tree, $this->shareManager), $this->getHrefForNode($node));
161 161
 			} else {
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
 	 * @return string
170 170
 	 */
171 171
 	private function getHrefForNode(Node $node) {
172
-		$base = '/files/' . $this->user->getUID();
173
-		return $base . $this->view->getRelativePath($node->getPath());
172
+		$base = '/files/'.$this->user->getUID();
173
+		return $base.$this->view->getRelativePath($node->getPath());
174 174
 	}
175 175
 
176 176
 	/**
@@ -210,19 +210,19 @@  discard block
 block discarded – undo
210 210
 			case Operator::OPERATION_LESS_THAN:
211 211
 			case Operator::OPERATION_IS_LIKE:
212 212
 				if (count($operator->arguments) !== 2) {
213
-					throw new \InvalidArgumentException('Invalid number of arguments for ' . $trimmedType . ' operation');
213
+					throw new \InvalidArgumentException('Invalid number of arguments for '.$trimmedType.' operation');
214 214
 				}
215 215
 				if (!is_string($operator->arguments[0])) {
216
-					throw new \InvalidArgumentException('Invalid argument 1 for ' . $trimmedType . ' operation, expected property');
216
+					throw new \InvalidArgumentException('Invalid argument 1 for '.$trimmedType.' operation, expected property');
217 217
 				}
218 218
 				if (!($operator->arguments[1] instanceof Literal)) {
219
-					throw new \InvalidArgumentException('Invalid argument 2 for ' . $trimmedType . ' operation, expected literal');
219
+					throw new \InvalidArgumentException('Invalid argument 2 for '.$trimmedType.' operation, expected literal');
220 220
 				}
221 221
 				return new SearchComparison($trimmedType, $this->mapPropertyNameToColumn($operator->arguments[0]), $this->castValue($operator->arguments[0], $operator->arguments[1]->value));
222 222
 			case Operator::OPERATION_IS_COLLECTION:
223 223
 				return new SearchComparison('eq', 'mimetype', ICacheEntry::DIRECTORY_MIMETYPE);
224 224
 			default:
225
-				throw new \InvalidArgumentException('Unsupported operation ' . $trimmedType . ' (' . $operator->type . ')');
225
+				throw new \InvalidArgumentException('Unsupported operation '.$trimmedType.' ('.$operator->type.')');
226 226
 		}
227 227
 	}
228 228
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 			case FilesPlugin::INTERNAL_FILEID_PROPERTYNAME:
248 248
 				return 'fileid';
249 249
 			default:
250
-				throw new \InvalidArgumentException('Unsupported property for search or order: ' . $propertyName);
250
+				throw new \InvalidArgumentException('Unsupported property for search or order: '.$propertyName);
251 251
 		}
252 252
 	}
253 253
 
Please login to merge, or discard this patch.
lib/private/Server.php 1 patch
Spacing   +95 added lines, -95 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
 
142 142
 
143
-		$this->registerService(\OCP\IPreview::class, function (Server $c) {
143
+		$this->registerService(\OCP\IPreview::class, function(Server $c) {
144 144
 			return new PreviewManager(
145 145
 				$c->getConfig(),
146 146
 				$c->getRootFolder(),
@@ -151,13 +151,13 @@  discard block
 block discarded – undo
151 151
 		});
152 152
 		$this->registerAlias('PreviewManager', \OCP\IPreview::class);
153 153
 
154
-		$this->registerService(\OC\Preview\Watcher::class, function (Server $c) {
154
+		$this->registerService(\OC\Preview\Watcher::class, function(Server $c) {
155 155
 			return new \OC\Preview\Watcher(
156 156
 				$c->getAppDataDir('preview')
157 157
 			);
158 158
 		});
159 159
 
160
-		$this->registerService('EncryptionManager', function (Server $c) {
160
+		$this->registerService('EncryptionManager', function(Server $c) {
161 161
 			$view = new View();
162 162
 			$util = new Encryption\Util(
163 163
 				$view,
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 			);
176 176
 		});
177 177
 
178
-		$this->registerService('EncryptionFileHelper', function (Server $c) {
178
+		$this->registerService('EncryptionFileHelper', function(Server $c) {
179 179
 			$util = new Encryption\Util(
180 180
 				new View(),
181 181
 				$c->getUserManager(),
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 			return new Encryption\File($util);
186 186
 		});
187 187
 
188
-		$this->registerService('EncryptionKeyStorage', function (Server $c) {
188
+		$this->registerService('EncryptionKeyStorage', function(Server $c) {
189 189
 			$view = new View();
190 190
 			$util = new Encryption\Util(
191 191
 				$view,
@@ -196,32 +196,32 @@  discard block
 block discarded – undo
196 196
 
197 197
 			return new Encryption\Keys\Storage($view, $util);
198 198
 		});
199
-		$this->registerService('TagMapper', function (Server $c) {
199
+		$this->registerService('TagMapper', function(Server $c) {
200 200
 			return new TagMapper($c->getDatabaseConnection());
201 201
 		});
202 202
 
203
-		$this->registerService(\OCP\ITagManager::class, function (Server $c) {
203
+		$this->registerService(\OCP\ITagManager::class, function(Server $c) {
204 204
 			$tagMapper = $c->query('TagMapper');
205 205
 			return new TagManager($tagMapper, $c->getUserSession());
206 206
 		});
207 207
 		$this->registerAlias('TagManager', \OCP\ITagManager::class);
208 208
 
209
-		$this->registerService('SystemTagManagerFactory', function (Server $c) {
209
+		$this->registerService('SystemTagManagerFactory', function(Server $c) {
210 210
 			$config = $c->getConfig();
211 211
 			$factoryClass = $config->getSystemValue('systemtags.managerFactory', '\OC\SystemTag\ManagerFactory');
212 212
 			/** @var \OC\SystemTag\ManagerFactory $factory */
213 213
 			$factory = new $factoryClass($this);
214 214
 			return $factory;
215 215
 		});
216
-		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) {
216
+		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) {
217 217
 			return $c->query('SystemTagManagerFactory')->getManager();
218 218
 		});
219 219
 		$this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class);
220 220
 
221
-		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) {
221
+		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) {
222 222
 			return $c->query('SystemTagManagerFactory')->getObjectMapper();
223 223
 		});
224
-		$this->registerService('RootFolder', function (Server $c) {
224
+		$this->registerService('RootFolder', function(Server $c) {
225 225
 			$manager = \OC\Files\Filesystem::getMountManager(null);
226 226
 			$view = new View();
227 227
 			$root = new Root(
@@ -249,30 +249,30 @@  discard block
 block discarded – undo
249 249
 		});
250 250
 		$this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class);
251 251
 
252
-		$this->registerService(\OCP\IUserManager::class, function (Server $c) {
252
+		$this->registerService(\OCP\IUserManager::class, function(Server $c) {
253 253
 			$config = $c->getConfig();
254 254
 			return new \OC\User\Manager($config);
255 255
 		});
256 256
 		$this->registerAlias('UserManager', \OCP\IUserManager::class);
257 257
 
258
-		$this->registerService(\OCP\IGroupManager::class, function (Server $c) {
258
+		$this->registerService(\OCP\IGroupManager::class, function(Server $c) {
259 259
 			$groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger());
260
-			$groupManager->listen('\OC\Group', 'preCreate', function ($gid) {
260
+			$groupManager->listen('\OC\Group', 'preCreate', function($gid) {
261 261
 				\OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid));
262 262
 			});
263
-			$groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) {
263
+			$groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) {
264 264
 				\OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID()));
265 265
 			});
266
-			$groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) {
266
+			$groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) {
267 267
 				\OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID()));
268 268
 			});
269
-			$groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) {
269
+			$groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) {
270 270
 				\OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID()));
271 271
 			});
272
-			$groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
272
+			$groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
273 273
 				\OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID()));
274 274
 			});
275
-			$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
275
+			$groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
276 276
 				\OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
277 277
 				//Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks
278 278
 				\OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
@@ -292,11 +292,11 @@  discard block
 block discarded – undo
292 292
 			return new Store($session, $logger, $tokenProvider);
293 293
 		});
294 294
 		$this->registerAlias(IStore::class, Store::class);
295
-		$this->registerService('OC\Authentication\Token\DefaultTokenMapper', function (Server $c) {
295
+		$this->registerService('OC\Authentication\Token\DefaultTokenMapper', function(Server $c) {
296 296
 			$dbConnection = $c->getDatabaseConnection();
297 297
 			return new Authentication\Token\DefaultTokenMapper($dbConnection);
298 298
 		});
299
-		$this->registerService('OC\Authentication\Token\DefaultTokenProvider', function (Server $c) {
299
+		$this->registerService('OC\Authentication\Token\DefaultTokenProvider', function(Server $c) {
300 300
 			$mapper = $c->query('OC\Authentication\Token\DefaultTokenMapper');
301 301
 			$crypto = $c->getCrypto();
302 302
 			$config = $c->getConfig();
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 		});
307 307
 		$this->registerAlias('OC\Authentication\Token\IProvider', 'OC\Authentication\Token\DefaultTokenProvider');
308 308
 
309
-		$this->registerService(\OCP\IUserSession::class, function (Server $c) {
309
+		$this->registerService(\OCP\IUserSession::class, function(Server $c) {
310 310
 			$manager = $c->getUserManager();
311 311
 			$session = new \OC\Session\Memory('');
312 312
 			$timeFactory = new TimeFactory();
@@ -319,40 +319,40 @@  discard block
 block discarded – undo
319 319
 			}
320 320
 
321 321
 			$userSession = new \OC\User\Session($manager, $session, $timeFactory, $defaultTokenProvider, $c->getConfig(), $c->getSecureRandom(), $c->getLockdownManager());
322
-			$userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) {
322
+			$userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) {
323 323
 				\OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password));
324 324
 			});
325
-			$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
325
+			$userSession->listen('\OC\User', 'postCreateUser', function($user, $password) {
326 326
 				/** @var $user \OC\User\User */
327 327
 				\OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password));
328 328
 			});
329
-			$userSession->listen('\OC\User', 'preDelete', function ($user) {
329
+			$userSession->listen('\OC\User', 'preDelete', function($user) {
330 330
 				/** @var $user \OC\User\User */
331 331
 				\OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID()));
332 332
 			});
333
-			$userSession->listen('\OC\User', 'postDelete', function ($user) {
333
+			$userSession->listen('\OC\User', 'postDelete', function($user) {
334 334
 				/** @var $user \OC\User\User */
335 335
 				\OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID()));
336 336
 			});
337
-			$userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) {
337
+			$userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) {
338 338
 				/** @var $user \OC\User\User */
339 339
 				\OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
340 340
 			});
341
-			$userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) {
341
+			$userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) {
342 342
 				/** @var $user \OC\User\User */
343 343
 				\OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
344 344
 			});
345
-			$userSession->listen('\OC\User', 'preLogin', function ($uid, $password) {
345
+			$userSession->listen('\OC\User', 'preLogin', function($uid, $password) {
346 346
 				\OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password));
347 347
 			});
348
-			$userSession->listen('\OC\User', 'postLogin', function ($user, $password) {
348
+			$userSession->listen('\OC\User', 'postLogin', function($user, $password) {
349 349
 				/** @var $user \OC\User\User */
350 350
 				\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
351 351
 			});
352
-			$userSession->listen('\OC\User', 'logout', function () {
352
+			$userSession->listen('\OC\User', 'logout', function() {
353 353
 				\OC_Hook::emit('OC_User', 'logout', array());
354 354
 			});
355
-			$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value) {
355
+			$userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value) {
356 356
 				/** @var $user \OC\User\User */
357 357
 				\OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value));
358 358
 			});
@@ -360,14 +360,14 @@  discard block
 block discarded – undo
360 360
 		});
361 361
 		$this->registerAlias('UserSession', \OCP\IUserSession::class);
362 362
 
363
-		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function (Server $c) {
363
+		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function(Server $c) {
364 364
 			return new \OC\Authentication\TwoFactorAuth\Manager($c->getAppManager(), $c->getSession(), $c->getConfig(), $c->getActivityManager(), $c->getLogger());
365 365
 		});
366 366
 
367 367
 		$this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class);
368 368
 		$this->registerAlias('NavigationManager', \OCP\INavigationManager::class);
369 369
 
370
-		$this->registerService(\OC\AllConfig::class, function (Server $c) {
370
+		$this->registerService(\OC\AllConfig::class, function(Server $c) {
371 371
 			return new \OC\AllConfig(
372 372
 				$c->getSystemConfig()
373 373
 			);
@@ -375,17 +375,17 @@  discard block
 block discarded – undo
375 375
 		$this->registerAlias('AllConfig', \OC\AllConfig::class);
376 376
 		$this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class);
377 377
 
378
-		$this->registerService('SystemConfig', function ($c) use ($config) {
378
+		$this->registerService('SystemConfig', function($c) use ($config) {
379 379
 			return new \OC\SystemConfig($config);
380 380
 		});
381 381
 
382
-		$this->registerService(\OC\AppConfig::class, function (Server $c) {
382
+		$this->registerService(\OC\AppConfig::class, function(Server $c) {
383 383
 			return new \OC\AppConfig($c->getDatabaseConnection());
384 384
 		});
385 385
 		$this->registerAlias('AppConfig', \OC\AppConfig::class);
386 386
 		$this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class);
387 387
 
388
-		$this->registerService(\OCP\L10N\IFactory::class, function (Server $c) {
388
+		$this->registerService(\OCP\L10N\IFactory::class, function(Server $c) {
389 389
 			return new \OC\L10N\Factory(
390 390
 				$c->getConfig(),
391 391
 				$c->getRequest(),
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 		});
396 396
 		$this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class);
397 397
 
398
-		$this->registerService(\OCP\IURLGenerator::class, function (Server $c) {
398
+		$this->registerService(\OCP\IURLGenerator::class, function(Server $c) {
399 399
 			$config = $c->getConfig();
400 400
 			$cacheFactory = $c->getMemCacheFactory();
401 401
 			return new \OC\URLGenerator(
@@ -405,10 +405,10 @@  discard block
 block discarded – undo
405 405
 		});
406 406
 		$this->registerAlias('URLGenerator', \OCP\IURLGenerator::class);
407 407
 
408
-		$this->registerService('AppHelper', function ($c) {
408
+		$this->registerService('AppHelper', function($c) {
409 409
 			return new \OC\AppHelper();
410 410
 		});
411
-		$this->registerService('AppFetcher', function ($c) {
411
+		$this->registerService('AppFetcher', function($c) {
412 412
 			return new AppFetcher(
413 413
 				$this->getAppDataDir('appstore'),
414 414
 				$this->getHTTPClientService(),
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
 				$this->getConfig()
417 417
 			);
418 418
 		});
419
-		$this->registerService('CategoryFetcher', function ($c) {
419
+		$this->registerService('CategoryFetcher', function($c) {
420 420
 			return new CategoryFetcher(
421 421
 				$this->getAppDataDir('appstore'),
422 422
 				$this->getHTTPClientService(),
@@ -425,21 +425,21 @@  discard block
 block discarded – undo
425 425
 			);
426 426
 		});
427 427
 
428
-		$this->registerService(\OCP\ICache::class, function ($c) {
428
+		$this->registerService(\OCP\ICache::class, function($c) {
429 429
 			return new Cache\File();
430 430
 		});
431 431
 		$this->registerAlias('UserCache', \OCP\ICache::class);
432 432
 
433
-		$this->registerService(Factory::class, function (Server $c) {
433
+		$this->registerService(Factory::class, function(Server $c) {
434 434
 			$config = $c->getConfig();
435 435
 
436 436
 			if ($config->getSystemValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) {
437 437
 				$v = \OC_App::getAppVersions();
438
-				$v['core'] = md5(file_get_contents(\OC::$SERVERROOT . '/version.php'));
438
+				$v['core'] = md5(file_get_contents(\OC::$SERVERROOT.'/version.php'));
439 439
 				$version = implode(',', $v);
440 440
 				$instanceId = \OC_Util::getInstanceId();
441 441
 				$path = \OC::$SERVERROOT;
442
-				$prefix = md5($instanceId . '-' . $version . '-' . $path . '-' . \OC::$WEBROOT);
442
+				$prefix = md5($instanceId.'-'.$version.'-'.$path.'-'.\OC::$WEBROOT);
443 443
 				return new \OC\Memcache\Factory($prefix, $c->getLogger(),
444 444
 					$config->getSystemValue('memcache.local', null),
445 445
 					$config->getSystemValue('memcache.distributed', null),
@@ -456,12 +456,12 @@  discard block
 block discarded – undo
456 456
 		$this->registerAlias('MemCacheFactory', Factory::class);
457 457
 		$this->registerAlias(ICacheFactory::class, Factory::class);
458 458
 
459
-		$this->registerService('RedisFactory', function (Server $c) {
459
+		$this->registerService('RedisFactory', function(Server $c) {
460 460
 			$systemConfig = $c->getSystemConfig();
461 461
 			return new RedisFactory($systemConfig);
462 462
 		});
463 463
 
464
-		$this->registerService(\OCP\Activity\IManager::class, function (Server $c) {
464
+		$this->registerService(\OCP\Activity\IManager::class, function(Server $c) {
465 465
 			return new \OC\Activity\Manager(
466 466
 				$c->getRequest(),
467 467
 				$c->getUserSession(),
@@ -471,14 +471,14 @@  discard block
 block discarded – undo
471 471
 		});
472 472
 		$this->registerAlias('ActivityManager', \OCP\Activity\IManager::class);
473 473
 
474
-		$this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) {
474
+		$this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) {
475 475
 			return new \OC\Activity\EventMerger(
476 476
 				$c->getL10N('lib')
477 477
 			);
478 478
 		});
479 479
 		$this->registerAlias(IValidator::class, Validator::class);
480 480
 
481
-		$this->registerService(\OCP\IAvatarManager::class, function (Server $c) {
481
+		$this->registerService(\OCP\IAvatarManager::class, function(Server $c) {
482 482
 			return new AvatarManager(
483 483
 				$c->getUserManager(),
484 484
 				$c->getAppDataDir('avatar'),
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
 		});
490 490
 		$this->registerAlias('AvatarManager', \OCP\IAvatarManager::class);
491 491
 
492
-		$this->registerService(\OCP\ILogger::class, function (Server $c) {
492
+		$this->registerService(\OCP\ILogger::class, function(Server $c) {
493 493
 			$logType = $c->query('AllConfig')->getSystemValue('log_type', 'file');
494 494
 			$logger = Log::getLogClass($logType);
495 495
 			call_user_func(array($logger, 'init'));
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 		});
499 499
 		$this->registerAlias('Logger', \OCP\ILogger::class);
500 500
 
501
-		$this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) {
501
+		$this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) {
502 502
 			$config = $c->getConfig();
503 503
 			return new \OC\BackgroundJob\JobList(
504 504
 				$c->getDatabaseConnection(),
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 		});
509 509
 		$this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class);
510 510
 
511
-		$this->registerService(\OCP\Route\IRouter::class, function (Server $c) {
511
+		$this->registerService(\OCP\Route\IRouter::class, function(Server $c) {
512 512
 			$cacheFactory = $c->getMemCacheFactory();
513 513
 			$logger = $c->getLogger();
514 514
 			if ($cacheFactory->isAvailable()) {
@@ -520,32 +520,32 @@  discard block
 block discarded – undo
520 520
 		});
521 521
 		$this->registerAlias('Router', \OCP\Route\IRouter::class);
522 522
 
523
-		$this->registerService(\OCP\ISearch::class, function ($c) {
523
+		$this->registerService(\OCP\ISearch::class, function($c) {
524 524
 			return new Search();
525 525
 		});
526 526
 		$this->registerAlias('Search', \OCP\ISearch::class);
527 527
 
528
-		$this->registerService(\OCP\Security\ISecureRandom::class, function ($c) {
528
+		$this->registerService(\OCP\Security\ISecureRandom::class, function($c) {
529 529
 			return new SecureRandom();
530 530
 		});
531 531
 		$this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class);
532 532
 
533
-		$this->registerService(\OCP\Security\ICrypto::class, function (Server $c) {
533
+		$this->registerService(\OCP\Security\ICrypto::class, function(Server $c) {
534 534
 			return new Crypto($c->getConfig(), $c->getSecureRandom());
535 535
 		});
536 536
 		$this->registerAlias('Crypto', \OCP\Security\ICrypto::class);
537 537
 
538
-		$this->registerService(\OCP\Security\IHasher::class, function (Server $c) {
538
+		$this->registerService(\OCP\Security\IHasher::class, function(Server $c) {
539 539
 			return new Hasher($c->getConfig());
540 540
 		});
541 541
 		$this->registerAlias('Hasher', \OCP\Security\IHasher::class);
542 542
 
543
-		$this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) {
543
+		$this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) {
544 544
 			return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection());
545 545
 		});
546 546
 		$this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class);
547 547
 
548
-		$this->registerService(IDBConnection::class, function (Server $c) {
548
+		$this->registerService(IDBConnection::class, function(Server $c) {
549 549
 			$systemConfig = $c->getSystemConfig();
550 550
 			$factory = new \OC\DB\ConnectionFactory($systemConfig);
551 551
 			$type = $systemConfig->getValue('dbtype', 'sqlite');
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
 		});
560 560
 		$this->registerAlias('DatabaseConnection', IDBConnection::class);
561 561
 
562
-		$this->registerService('HTTPHelper', function (Server $c) {
562
+		$this->registerService('HTTPHelper', function(Server $c) {
563 563
 			$config = $c->getConfig();
564 564
 			return new HTTPHelper(
565 565
 				$config,
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
 			);
568 568
 		});
569 569
 
570
-		$this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) {
570
+		$this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) {
571 571
 			$user = \OC_User::getUser();
572 572
 			$uid = $user ? $user : null;
573 573
 			return new ClientService(
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
 		});
578 578
 		$this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class);
579 579
 
580
-		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) {
580
+		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) {
581 581
 			if ($c->getSystemConfig()->getValue('debug', false)) {
582 582
 				return new EventLogger();
583 583
 			} else {
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 		});
587 587
 		$this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class);
588 588
 
589
-		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) {
589
+		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) {
590 590
 			if ($c->getSystemConfig()->getValue('debug', false)) {
591 591
 				return new QueryLogger();
592 592
 			} else {
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 		});
596 596
 		$this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class);
597 597
 
598
-		$this->registerService(TempManager::class, function (Server $c) {
598
+		$this->registerService(TempManager::class, function(Server $c) {
599 599
 			return new TempManager(
600 600
 				$c->getLogger(),
601 601
 				$c->getConfig()
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
 		$this->registerAlias('TempManager', TempManager::class);
605 605
 		$this->registerAlias(ITempManager::class, TempManager::class);
606 606
 
607
-		$this->registerService(AppManager::class, function (Server $c) {
607
+		$this->registerService(AppManager::class, function(Server $c) {
608 608
 			return new \OC\App\AppManager(
609 609
 				$c->getUserSession(),
610 610
 				$c->getAppConfig(),
@@ -616,7 +616,7 @@  discard block
 block discarded – undo
616 616
 		$this->registerAlias('AppManager', AppManager::class);
617 617
 		$this->registerAlias(IAppManager::class, AppManager::class);
618 618
 
619
-		$this->registerService(\OCP\IDateTimeZone::class, function (Server $c) {
619
+		$this->registerService(\OCP\IDateTimeZone::class, function(Server $c) {
620 620
 			return new DateTimeZone(
621 621
 				$c->getConfig(),
622 622
 				$c->getSession()
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 		});
625 625
 		$this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class);
626 626
 
627
-		$this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) {
627
+		$this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) {
628 628
 			$language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null);
629 629
 
630 630
 			return new DateTimeFormatter(
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
 		});
635 635
 		$this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class);
636 636
 
637
-		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) {
637
+		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) {
638 638
 			$mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger());
639 639
 			$listener = new UserMountCacheListener($mountCache);
640 640
 			$listener->listen($c->getUserManager());
@@ -642,10 +642,10 @@  discard block
 block discarded – undo
642 642
 		});
643 643
 		$this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class);
644 644
 
645
-		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) {
645
+		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) {
646 646
 			$loader = \OC\Files\Filesystem::getLoader();
647 647
 			$mountCache = $c->query('UserMountCache');
648
-			$manager =  new \OC\Files\Config\MountProviderCollection($loader, $mountCache);
648
+			$manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache);
649 649
 
650 650
 			// builtin providers
651 651
 
@@ -658,14 +658,14 @@  discard block
 block discarded – undo
658 658
 		});
659 659
 		$this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class);
660 660
 
661
-		$this->registerService('IniWrapper', function ($c) {
661
+		$this->registerService('IniWrapper', function($c) {
662 662
 			return new IniGetWrapper();
663 663
 		});
664
-		$this->registerService('AsyncCommandBus', function (Server $c) {
664
+		$this->registerService('AsyncCommandBus', function(Server $c) {
665 665
 			$jobList = $c->getJobList();
666 666
 			return new AsyncBus($jobList);
667 667
 		});
668
-		$this->registerService('TrustedDomainHelper', function ($c) {
668
+		$this->registerService('TrustedDomainHelper', function($c) {
669 669
 			return new TrustedDomainHelper($this->getConfig());
670 670
 		});
671 671
 		$this->registerService('Throttler', function(Server $c) {
@@ -676,10 +676,10 @@  discard block
 block discarded – undo
676 676
 				$c->getConfig()
677 677
 			);
678 678
 		});
679
-		$this->registerService('IntegrityCodeChecker', function (Server $c) {
679
+		$this->registerService('IntegrityCodeChecker', function(Server $c) {
680 680
 			// IConfig and IAppManager requires a working database. This code
681 681
 			// might however be called when ownCloud is not yet setup.
682
-			if(\OC::$server->getSystemConfig()->getValue('installed', false)) {
682
+			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
683 683
 				$config = $c->getConfig();
684 684
 				$appManager = $c->getAppManager();
685 685
 			} else {
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
 					$c->getTempManager()
698 698
 			);
699 699
 		});
700
-		$this->registerService(\OCP\IRequest::class, function ($c) {
700
+		$this->registerService(\OCP\IRequest::class, function($c) {
701 701
 			if (isset($this['urlParams'])) {
702 702
 				$urlParams = $this['urlParams'];
703 703
 			} else {
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
 		});
734 734
 		$this->registerAlias('Request', \OCP\IRequest::class);
735 735
 
736
-		$this->registerService(\OCP\Mail\IMailer::class, function (Server $c) {
736
+		$this->registerService(\OCP\Mail\IMailer::class, function(Server $c) {
737 737
 			return new Mailer(
738 738
 				$c->getConfig(),
739 739
 				$c->getLogger(),
@@ -745,14 +745,14 @@  discard block
 block discarded – undo
745 745
 		$this->registerService('LDAPProvider', function(Server $c) {
746 746
 			$config = $c->getConfig();
747 747
 			$factoryClass = $config->getSystemValue('ldapProviderFactory', null);
748
-			if(is_null($factoryClass)) {
748
+			if (is_null($factoryClass)) {
749 749
 				throw new \Exception('ldapProviderFactory not set');
750 750
 			}
751 751
 			/** @var \OCP\LDAP\ILDAPProviderFactory $factory */
752 752
 			$factory = new $factoryClass($this);
753 753
 			return $factory->getLDAPProvider();
754 754
 		});
755
-		$this->registerService('LockingProvider', function (Server $c) {
755
+		$this->registerService('LockingProvider', function(Server $c) {
756 756
 			$ini = $c->getIniWrapper();
757 757
 			$config = $c->getConfig();
758 758
 			$ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time')));
@@ -768,37 +768,37 @@  discard block
 block discarded – undo
768 768
 			return new NoopLockingProvider();
769 769
 		});
770 770
 
771
-		$this->registerService(\OCP\Files\Mount\IMountManager::class, function () {
771
+		$this->registerService(\OCP\Files\Mount\IMountManager::class, function() {
772 772
 			return new \OC\Files\Mount\Manager();
773 773
 		});
774 774
 		$this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class);
775 775
 
776
-		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) {
776
+		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) {
777 777
 			return new \OC\Files\Type\Detection(
778 778
 				$c->getURLGenerator(),
779 779
 				\OC::$configDir,
780
-				\OC::$SERVERROOT . '/resources/config/'
780
+				\OC::$SERVERROOT.'/resources/config/'
781 781
 			);
782 782
 		});
783 783
 		$this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class);
784 784
 
785
-		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) {
785
+		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) {
786 786
 			return new \OC\Files\Type\Loader(
787 787
 				$c->getDatabaseConnection()
788 788
 			);
789 789
 		});
790 790
 		$this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class);
791 791
 
792
-		$this->registerService(\OCP\Notification\IManager::class, function (Server $c) {
792
+		$this->registerService(\OCP\Notification\IManager::class, function(Server $c) {
793 793
 			return new Manager(
794 794
 				$c->query(IValidator::class)
795 795
 			);
796 796
 		});
797 797
 		$this->registerAlias('NotificationManager', \OCP\Notification\IManager::class);
798 798
 
799
-		$this->registerService(\OC\CapabilitiesManager::class, function (Server $c) {
799
+		$this->registerService(\OC\CapabilitiesManager::class, function(Server $c) {
800 800
 			$manager = new \OC\CapabilitiesManager($c->getLogger());
801
-			$manager->registerCapability(function () use ($c) {
801
+			$manager->registerCapability(function() use ($c) {
802 802
 				return new \OC\OCS\CoreCapabilities($c->getConfig());
803 803
 			});
804 804
 			return $manager;
@@ -840,13 +840,13 @@  discard block
 block discarded – undo
840 840
 			}
841 841
 			return new \OC_Defaults();
842 842
 		});
843
-		$this->registerService(EventDispatcher::class, function () {
843
+		$this->registerService(EventDispatcher::class, function() {
844 844
 			return new EventDispatcher();
845 845
 		});
846 846
 		$this->registerAlias('EventDispatcher', EventDispatcher::class);
847 847
 		$this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class);
848 848
 
849
-		$this->registerService('CryptoWrapper', function (Server $c) {
849
+		$this->registerService('CryptoWrapper', function(Server $c) {
850 850
 			// FIXME: Instantiiated here due to cyclic dependency
851 851
 			$request = new Request(
852 852
 				[
@@ -871,7 +871,7 @@  discard block
 block discarded – undo
871 871
 				$request
872 872
 			);
873 873
 		});
874
-		$this->registerService('CsrfTokenManager', function (Server $c) {
874
+		$this->registerService('CsrfTokenManager', function(Server $c) {
875 875
 			$tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom());
876 876
 
877 877
 			return new CsrfTokenManager(
@@ -879,10 +879,10 @@  discard block
 block discarded – undo
879 879
 				$c->query(SessionStorage::class)
880 880
 			);
881 881
 		});
882
-		$this->registerService(SessionStorage::class, function (Server $c) {
882
+		$this->registerService(SessionStorage::class, function(Server $c) {
883 883
 			return new SessionStorage($c->getSession());
884 884
 		});
885
-		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) {
885
+		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) {
886 886
 			return new ContentSecurityPolicyManager();
887 887
 		});
888 888
 		$this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class);
@@ -933,25 +933,25 @@  discard block
 block discarded – undo
933 933
 			);
934 934
 			return $manager;
935 935
 		});
936
-		$this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) {
936
+		$this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) {
937 937
 			return new \OC\Files\AppData\Factory(
938 938
 				$c->getRootFolder(),
939 939
 				$c->getSystemConfig()
940 940
 			);
941 941
 		});
942 942
 
943
-		$this->registerService('LockdownManager', function (Server $c) {
943
+		$this->registerService('LockdownManager', function(Server $c) {
944 944
 			return new LockdownManager(function() use ($c) {
945 945
 				return $c->getSession();
946 946
 			});
947 947
 		});
948 948
 
949
-		$this->registerService(ICloudIdManager::class, function (Server $c) {
949
+		$this->registerService(ICloudIdManager::class, function(Server $c) {
950 950
 			return new CloudIdManager();
951 951
 		});
952 952
 
953 953
 		/* To trick DI since we don't extend the DIContainer here */
954
-		$this->registerService(CleanPreviewsBackgroundJob::class, function (Server $c) {
954
+		$this->registerService(CleanPreviewsBackgroundJob::class, function(Server $c) {
955 955
 			return new CleanPreviewsBackgroundJob(
956 956
 				$c->getRootFolder(),
957 957
 				$c->getLogger(),
@@ -1105,7 +1105,7 @@  discard block
 block discarded – undo
1105 1105
 	 * @deprecated since 9.2.0 use IAppData
1106 1106
 	 */
1107 1107
 	public function getAppFolder() {
1108
-		$dir = '/' . \OC_App::getCurrentApp();
1108
+		$dir = '/'.\OC_App::getCurrentApp();
1109 1109
 		$root = $this->getRootFolder();
1110 1110
 		if (!$root->nodeExists($dir)) {
1111 1111
 			$folder = $root->newFolder($dir);
Please login to merge, or discard this patch.