Completed
Pull Request — master (#3233)
by Christoph
57:05 queued 37:22
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.
lib/private/Server.php 1 patch
Spacing   +97 added lines, -97 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
 
146 146
 
147
-		$this->registerService(\OCP\IPreview::class, function (Server $c) {
147
+		$this->registerService(\OCP\IPreview::class, function(Server $c) {
148 148
 			return new PreviewManager(
149 149
 				$c->getConfig(),
150 150
 				$c->getRootFolder(),
@@ -155,13 +155,13 @@  discard block
 block discarded – undo
155 155
 		});
156 156
 		$this->registerAlias('PreviewManager', \OCP\IPreview::class);
157 157
 
158
-		$this->registerService(\OC\Preview\Watcher::class, function (Server $c) {
158
+		$this->registerService(\OC\Preview\Watcher::class, function(Server $c) {
159 159
 			return new \OC\Preview\Watcher(
160 160
 				$c->getAppDataDir('preview')
161 161
 			);
162 162
 		});
163 163
 
164
-		$this->registerService('EncryptionManager', function (Server $c) {
164
+		$this->registerService('EncryptionManager', function(Server $c) {
165 165
 			$view = new View();
166 166
 			$util = new Encryption\Util(
167 167
 				$view,
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 			);
180 180
 		});
181 181
 
182
-		$this->registerService('EncryptionFileHelper', function (Server $c) {
182
+		$this->registerService('EncryptionFileHelper', function(Server $c) {
183 183
 			$util = new Encryption\Util(
184 184
 				new View(),
185 185
 				$c->getUserManager(),
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 			);
194 194
 		});
195 195
 
196
-		$this->registerService('EncryptionKeyStorage', function (Server $c) {
196
+		$this->registerService('EncryptionKeyStorage', function(Server $c) {
197 197
 			$view = new View();
198 198
 			$util = new Encryption\Util(
199 199
 				$view,
@@ -204,32 +204,32 @@  discard block
 block discarded – undo
204 204
 
205 205
 			return new Encryption\Keys\Storage($view, $util);
206 206
 		});
207
-		$this->registerService('TagMapper', function (Server $c) {
207
+		$this->registerService('TagMapper', function(Server $c) {
208 208
 			return new TagMapper($c->getDatabaseConnection());
209 209
 		});
210 210
 
211
-		$this->registerService(\OCP\ITagManager::class, function (Server $c) {
211
+		$this->registerService(\OCP\ITagManager::class, function(Server $c) {
212 212
 			$tagMapper = $c->query('TagMapper');
213 213
 			return new TagManager($tagMapper, $c->getUserSession());
214 214
 		});
215 215
 		$this->registerAlias('TagManager', \OCP\ITagManager::class);
216 216
 
217
-		$this->registerService('SystemTagManagerFactory', function (Server $c) {
217
+		$this->registerService('SystemTagManagerFactory', function(Server $c) {
218 218
 			$config = $c->getConfig();
219 219
 			$factoryClass = $config->getSystemValue('systemtags.managerFactory', '\OC\SystemTag\ManagerFactory');
220 220
 			/** @var \OC\SystemTag\ManagerFactory $factory */
221 221
 			$factory = new $factoryClass($this);
222 222
 			return $factory;
223 223
 		});
224
-		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) {
224
+		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) {
225 225
 			return $c->query('SystemTagManagerFactory')->getManager();
226 226
 		});
227 227
 		$this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class);
228 228
 
229
-		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) {
229
+		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) {
230 230
 			return $c->query('SystemTagManagerFactory')->getObjectMapper();
231 231
 		});
232
-		$this->registerService('RootFolder', function (Server $c) {
232
+		$this->registerService('RootFolder', function(Server $c) {
233 233
 			$manager = \OC\Files\Filesystem::getMountManager(null);
234 234
 			$view = new View();
235 235
 			$root = new Root(
@@ -257,30 +257,30 @@  discard block
 block discarded – undo
257 257
 		});
258 258
 		$this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class);
259 259
 
260
-		$this->registerService(\OCP\IUserManager::class, function (Server $c) {
260
+		$this->registerService(\OCP\IUserManager::class, function(Server $c) {
261 261
 			$config = $c->getConfig();
262 262
 			return new \OC\User\Manager($config);
263 263
 		});
264 264
 		$this->registerAlias('UserManager', \OCP\IUserManager::class);
265 265
 
266
-		$this->registerService(\OCP\IGroupManager::class, function (Server $c) {
266
+		$this->registerService(\OCP\IGroupManager::class, function(Server $c) {
267 267
 			$groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger());
268
-			$groupManager->listen('\OC\Group', 'preCreate', function ($gid) {
268
+			$groupManager->listen('\OC\Group', 'preCreate', function($gid) {
269 269
 				\OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid));
270 270
 			});
271
-			$groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) {
271
+			$groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) {
272 272
 				\OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID()));
273 273
 			});
274
-			$groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) {
274
+			$groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) {
275 275
 				\OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID()));
276 276
 			});
277
-			$groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) {
277
+			$groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) {
278 278
 				\OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID()));
279 279
 			});
280
-			$groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
280
+			$groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
281 281
 				\OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID()));
282 282
 			});
283
-			$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
283
+			$groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
284 284
 				\OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
285 285
 				//Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks
286 286
 				\OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
@@ -300,11 +300,11 @@  discard block
 block discarded – undo
300 300
 			return new Store($session, $logger, $tokenProvider);
301 301
 		});
302 302
 		$this->registerAlias(IStore::class, Store::class);
303
-		$this->registerService('OC\Authentication\Token\DefaultTokenMapper', function (Server $c) {
303
+		$this->registerService('OC\Authentication\Token\DefaultTokenMapper', function(Server $c) {
304 304
 			$dbConnection = $c->getDatabaseConnection();
305 305
 			return new Authentication\Token\DefaultTokenMapper($dbConnection);
306 306
 		});
307
-		$this->registerService('OC\Authentication\Token\DefaultTokenProvider', function (Server $c) {
307
+		$this->registerService('OC\Authentication\Token\DefaultTokenProvider', function(Server $c) {
308 308
 			$mapper = $c->query('OC\Authentication\Token\DefaultTokenMapper');
309 309
 			$crypto = $c->getCrypto();
310 310
 			$config = $c->getConfig();
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 		});
315 315
 		$this->registerAlias('OC\Authentication\Token\IProvider', 'OC\Authentication\Token\DefaultTokenProvider');
316 316
 
317
-		$this->registerService(\OCP\IUserSession::class, function (Server $c) {
317
+		$this->registerService(\OCP\IUserSession::class, function(Server $c) {
318 318
 			$manager = $c->getUserManager();
319 319
 			$session = new \OC\Session\Memory('');
320 320
 			$timeFactory = new TimeFactory();
@@ -327,40 +327,40 @@  discard block
 block discarded – undo
327 327
 			}
328 328
 
329 329
 			$userSession = new \OC\User\Session($manager, $session, $timeFactory, $defaultTokenProvider, $c->getConfig(), $c->getSecureRandom(), $c->getLockdownManager());
330
-			$userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) {
330
+			$userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) {
331 331
 				\OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password));
332 332
 			});
333
-			$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
333
+			$userSession->listen('\OC\User', 'postCreateUser', function($user, $password) {
334 334
 				/** @var $user \OC\User\User */
335 335
 				\OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password));
336 336
 			});
337
-			$userSession->listen('\OC\User', 'preDelete', function ($user) {
337
+			$userSession->listen('\OC\User', 'preDelete', function($user) {
338 338
 				/** @var $user \OC\User\User */
339 339
 				\OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID()));
340 340
 			});
341
-			$userSession->listen('\OC\User', 'postDelete', function ($user) {
341
+			$userSession->listen('\OC\User', 'postDelete', function($user) {
342 342
 				/** @var $user \OC\User\User */
343 343
 				\OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID()));
344 344
 			});
345
-			$userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) {
345
+			$userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) {
346 346
 				/** @var $user \OC\User\User */
347 347
 				\OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
348 348
 			});
349
-			$userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) {
349
+			$userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) {
350 350
 				/** @var $user \OC\User\User */
351 351
 				\OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
352 352
 			});
353
-			$userSession->listen('\OC\User', 'preLogin', function ($uid, $password) {
353
+			$userSession->listen('\OC\User', 'preLogin', function($uid, $password) {
354 354
 				\OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password));
355 355
 			});
356
-			$userSession->listen('\OC\User', 'postLogin', function ($user, $password) {
356
+			$userSession->listen('\OC\User', 'postLogin', function($user, $password) {
357 357
 				/** @var $user \OC\User\User */
358 358
 				\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
359 359
 			});
360
-			$userSession->listen('\OC\User', 'logout', function () {
360
+			$userSession->listen('\OC\User', 'logout', function() {
361 361
 				\OC_Hook::emit('OC_User', 'logout', array());
362 362
 			});
363
-			$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) {
363
+			$userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) {
364 364
 				/** @var $user \OC\User\User */
365 365
 				\OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue));
366 366
 			});
@@ -368,14 +368,14 @@  discard block
 block discarded – undo
368 368
 		});
369 369
 		$this->registerAlias('UserSession', \OCP\IUserSession::class);
370 370
 
371
-		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function (Server $c) {
371
+		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function(Server $c) {
372 372
 			return new \OC\Authentication\TwoFactorAuth\Manager($c->getAppManager(), $c->getSession(), $c->getConfig(), $c->getActivityManager(), $c->getLogger());
373 373
 		});
374 374
 
375 375
 		$this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class);
376 376
 		$this->registerAlias('NavigationManager', \OCP\INavigationManager::class);
377 377
 
378
-		$this->registerService(\OC\AllConfig::class, function (Server $c) {
378
+		$this->registerService(\OC\AllConfig::class, function(Server $c) {
379 379
 			return new \OC\AllConfig(
380 380
 				$c->getSystemConfig()
381 381
 			);
@@ -383,17 +383,17 @@  discard block
 block discarded – undo
383 383
 		$this->registerAlias('AllConfig', \OC\AllConfig::class);
384 384
 		$this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class);
385 385
 
386
-		$this->registerService('SystemConfig', function ($c) use ($config) {
386
+		$this->registerService('SystemConfig', function($c) use ($config) {
387 387
 			return new \OC\SystemConfig($config);
388 388
 		});
389 389
 
390
-		$this->registerService(\OC\AppConfig::class, function (Server $c) {
390
+		$this->registerService(\OC\AppConfig::class, function(Server $c) {
391 391
 			return new \OC\AppConfig($c->getDatabaseConnection());
392 392
 		});
393 393
 		$this->registerAlias('AppConfig', \OC\AppConfig::class);
394 394
 		$this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class);
395 395
 
396
-		$this->registerService(\OCP\L10N\IFactory::class, function (Server $c) {
396
+		$this->registerService(\OCP\L10N\IFactory::class, function(Server $c) {
397 397
 			return new \OC\L10N\Factory(
398 398
 				$c->getConfig(),
399 399
 				$c->getRequest(),
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 		});
404 404
 		$this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class);
405 405
 
406
-		$this->registerService(\OCP\IURLGenerator::class, function (Server $c) {
406
+		$this->registerService(\OCP\IURLGenerator::class, function(Server $c) {
407 407
 			$config = $c->getConfig();
408 408
 			$cacheFactory = $c->getMemCacheFactory();
409 409
 			return new \OC\URLGenerator(
@@ -413,10 +413,10 @@  discard block
 block discarded – undo
413 413
 		});
414 414
 		$this->registerAlias('URLGenerator', \OCP\IURLGenerator::class);
415 415
 
416
-		$this->registerService('AppHelper', function ($c) {
416
+		$this->registerService('AppHelper', function($c) {
417 417
 			return new \OC\AppHelper();
418 418
 		});
419
-		$this->registerService('AppFetcher', function ($c) {
419
+		$this->registerService('AppFetcher', function($c) {
420 420
 			return new AppFetcher(
421 421
 				$this->getAppDataDir('appstore'),
422 422
 				$this->getHTTPClientService(),
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
 				$this->getConfig()
425 425
 			);
426 426
 		});
427
-		$this->registerService('CategoryFetcher', function ($c) {
427
+		$this->registerService('CategoryFetcher', function($c) {
428 428
 			return new CategoryFetcher(
429 429
 				$this->getAppDataDir('appstore'),
430 430
 				$this->getHTTPClientService(),
@@ -433,21 +433,21 @@  discard block
 block discarded – undo
433 433
 			);
434 434
 		});
435 435
 
436
-		$this->registerService(\OCP\ICache::class, function ($c) {
436
+		$this->registerService(\OCP\ICache::class, function($c) {
437 437
 			return new Cache\File();
438 438
 		});
439 439
 		$this->registerAlias('UserCache', \OCP\ICache::class);
440 440
 
441
-		$this->registerService(Factory::class, function (Server $c) {
441
+		$this->registerService(Factory::class, function(Server $c) {
442 442
 			$config = $c->getConfig();
443 443
 
444 444
 			if ($config->getSystemValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) {
445 445
 				$v = \OC_App::getAppVersions();
446
-				$v['core'] = md5(file_get_contents(\OC::$SERVERROOT . '/version.php'));
446
+				$v['core'] = md5(file_get_contents(\OC::$SERVERROOT.'/version.php'));
447 447
 				$version = implode(',', $v);
448 448
 				$instanceId = \OC_Util::getInstanceId();
449 449
 				$path = \OC::$SERVERROOT;
450
-				$prefix = md5($instanceId . '-' . $version . '-' . $path . '-' . \OC::$WEBROOT);
450
+				$prefix = md5($instanceId.'-'.$version.'-'.$path.'-'.\OC::$WEBROOT);
451 451
 				return new \OC\Memcache\Factory($prefix, $c->getLogger(),
452 452
 					$config->getSystemValue('memcache.local', null),
453 453
 					$config->getSystemValue('memcache.distributed', null),
@@ -464,12 +464,12 @@  discard block
 block discarded – undo
464 464
 		$this->registerAlias('MemCacheFactory', Factory::class);
465 465
 		$this->registerAlias(ICacheFactory::class, Factory::class);
466 466
 
467
-		$this->registerService('RedisFactory', function (Server $c) {
467
+		$this->registerService('RedisFactory', function(Server $c) {
468 468
 			$systemConfig = $c->getSystemConfig();
469 469
 			return new RedisFactory($systemConfig);
470 470
 		});
471 471
 
472
-		$this->registerService(\OCP\Activity\IManager::class, function (Server $c) {
472
+		$this->registerService(\OCP\Activity\IManager::class, function(Server $c) {
473 473
 			return new \OC\Activity\Manager(
474 474
 				$c->getRequest(),
475 475
 				$c->getUserSession(),
@@ -479,14 +479,14 @@  discard block
 block discarded – undo
479 479
 		});
480 480
 		$this->registerAlias('ActivityManager', \OCP\Activity\IManager::class);
481 481
 
482
-		$this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) {
482
+		$this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) {
483 483
 			return new \OC\Activity\EventMerger(
484 484
 				$c->getL10N('lib')
485 485
 			);
486 486
 		});
487 487
 		$this->registerAlias(IValidator::class, Validator::class);
488 488
 
489
-		$this->registerService(\OCP\IAvatarManager::class, function (Server $c) {
489
+		$this->registerService(\OCP\IAvatarManager::class, function(Server $c) {
490 490
 			return new AvatarManager(
491 491
 				$c->getUserManager(),
492 492
 				$c->getAppDataDir('avatar'),
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
 		});
498 498
 		$this->registerAlias('AvatarManager', \OCP\IAvatarManager::class);
499 499
 
500
-		$this->registerService(\OCP\ILogger::class, function (Server $c) {
500
+		$this->registerService(\OCP\ILogger::class, function(Server $c) {
501 501
 			$logType = $c->query('AllConfig')->getSystemValue('log_type', 'file');
502 502
 			$logger = Log::getLogClass($logType);
503 503
 			call_user_func(array($logger, 'init'));
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
 		});
507 507
 		$this->registerAlias('Logger', \OCP\ILogger::class);
508 508
 
509
-		$this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) {
509
+		$this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) {
510 510
 			$config = $c->getConfig();
511 511
 			return new \OC\BackgroundJob\JobList(
512 512
 				$c->getDatabaseConnection(),
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
 		});
517 517
 		$this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class);
518 518
 
519
-		$this->registerService(\OCP\Route\IRouter::class, function (Server $c) {
519
+		$this->registerService(\OCP\Route\IRouter::class, function(Server $c) {
520 520
 			$cacheFactory = $c->getMemCacheFactory();
521 521
 			$logger = $c->getLogger();
522 522
 			if ($cacheFactory->isAvailable()) {
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
 		});
529 529
 		$this->registerAlias('Router', \OCP\Route\IRouter::class);
530 530
 
531
-		$this->registerService(\OCP\ISearch::class, function ($c) {
531
+		$this->registerService(\OCP\ISearch::class, function($c) {
532 532
 			return new Search();
533 533
 		});
534 534
 		$this->registerAlias('Search', \OCP\ISearch::class);
@@ -548,27 +548,27 @@  discard block
 block discarded – undo
548 548
 			);
549 549
 		});
550 550
 
551
-		$this->registerService(\OCP\Security\ISecureRandom::class, function ($c) {
551
+		$this->registerService(\OCP\Security\ISecureRandom::class, function($c) {
552 552
 			return new SecureRandom();
553 553
 		});
554 554
 		$this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class);
555 555
 
556
-		$this->registerService(\OCP\Security\ICrypto::class, function (Server $c) {
556
+		$this->registerService(\OCP\Security\ICrypto::class, function(Server $c) {
557 557
 			return new Crypto($c->getConfig(), $c->getSecureRandom());
558 558
 		});
559 559
 		$this->registerAlias('Crypto', \OCP\Security\ICrypto::class);
560 560
 
561
-		$this->registerService(\OCP\Security\IHasher::class, function (Server $c) {
561
+		$this->registerService(\OCP\Security\IHasher::class, function(Server $c) {
562 562
 			return new Hasher($c->getConfig());
563 563
 		});
564 564
 		$this->registerAlias('Hasher', \OCP\Security\IHasher::class);
565 565
 
566
-		$this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) {
566
+		$this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) {
567 567
 			return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection());
568 568
 		});
569 569
 		$this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class);
570 570
 
571
-		$this->registerService(IDBConnection::class, function (Server $c) {
571
+		$this->registerService(IDBConnection::class, function(Server $c) {
572 572
 			$systemConfig = $c->getSystemConfig();
573 573
 			$factory = new \OC\DB\ConnectionFactory($systemConfig);
574 574
 			$type = $systemConfig->getValue('dbtype', 'sqlite');
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
 		});
583 583
 		$this->registerAlias('DatabaseConnection', IDBConnection::class);
584 584
 
585
-		$this->registerService('HTTPHelper', function (Server $c) {
585
+		$this->registerService('HTTPHelper', function(Server $c) {
586 586
 			$config = $c->getConfig();
587 587
 			return new HTTPHelper(
588 588
 				$config,
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
 			);
591 591
 		});
592 592
 
593
-		$this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) {
593
+		$this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) {
594 594
 			$user = \OC_User::getUser();
595 595
 			$uid = $user ? $user : null;
596 596
 			return new ClientService(
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
 		});
601 601
 		$this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class);
602 602
 
603
-		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) {
603
+		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) {
604 604
 			if ($c->getSystemConfig()->getValue('debug', false)) {
605 605
 				return new EventLogger();
606 606
 			} else {
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
 		});
610 610
 		$this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class);
611 611
 
612
-		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) {
612
+		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) {
613 613
 			if ($c->getSystemConfig()->getValue('debug', false)) {
614 614
 				return new QueryLogger();
615 615
 			} else {
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
 		});
619 619
 		$this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class);
620 620
 
621
-		$this->registerService(TempManager::class, function (Server $c) {
621
+		$this->registerService(TempManager::class, function(Server $c) {
622 622
 			return new TempManager(
623 623
 				$c->getLogger(),
624 624
 				$c->getConfig()
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
 		$this->registerAlias('TempManager', TempManager::class);
628 628
 		$this->registerAlias(ITempManager::class, TempManager::class);
629 629
 
630
-		$this->registerService(AppManager::class, function (Server $c) {
630
+		$this->registerService(AppManager::class, function(Server $c) {
631 631
 			return new \OC\App\AppManager(
632 632
 				$c->getUserSession(),
633 633
 				$c->getAppConfig(),
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
 		$this->registerAlias('AppManager', AppManager::class);
640 640
 		$this->registerAlias(IAppManager::class, AppManager::class);
641 641
 
642
-		$this->registerService(\OCP\IDateTimeZone::class, function (Server $c) {
642
+		$this->registerService(\OCP\IDateTimeZone::class, function(Server $c) {
643 643
 			return new DateTimeZone(
644 644
 				$c->getConfig(),
645 645
 				$c->getSession()
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
 		});
648 648
 		$this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class);
649 649
 
650
-		$this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) {
650
+		$this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) {
651 651
 			$language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null);
652 652
 
653 653
 			return new DateTimeFormatter(
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
 		});
658 658
 		$this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class);
659 659
 
660
-		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) {
660
+		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) {
661 661
 			$mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger());
662 662
 			$listener = new UserMountCacheListener($mountCache);
663 663
 			$listener->listen($c->getUserManager());
@@ -665,10 +665,10 @@  discard block
 block discarded – undo
665 665
 		});
666 666
 		$this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class);
667 667
 
668
-		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) {
668
+		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) {
669 669
 			$loader = \OC\Files\Filesystem::getLoader();
670 670
 			$mountCache = $c->query('UserMountCache');
671
-			$manager =  new \OC\Files\Config\MountProviderCollection($loader, $mountCache);
671
+			$manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache);
672 672
 
673 673
 			// builtin providers
674 674
 
@@ -681,14 +681,14 @@  discard block
 block discarded – undo
681 681
 		});
682 682
 		$this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class);
683 683
 
684
-		$this->registerService('IniWrapper', function ($c) {
684
+		$this->registerService('IniWrapper', function($c) {
685 685
 			return new IniGetWrapper();
686 686
 		});
687
-		$this->registerService('AsyncCommandBus', function (Server $c) {
687
+		$this->registerService('AsyncCommandBus', function(Server $c) {
688 688
 			$jobList = $c->getJobList();
689 689
 			return new AsyncBus($jobList);
690 690
 		});
691
-		$this->registerService('TrustedDomainHelper', function ($c) {
691
+		$this->registerService('TrustedDomainHelper', function($c) {
692 692
 			return new TrustedDomainHelper($this->getConfig());
693 693
 		});
694 694
 		$this->registerService('Throttler', function(Server $c) {
@@ -699,10 +699,10 @@  discard block
 block discarded – undo
699 699
 				$c->getConfig()
700 700
 			);
701 701
 		});
702
-		$this->registerService('IntegrityCodeChecker', function (Server $c) {
702
+		$this->registerService('IntegrityCodeChecker', function(Server $c) {
703 703
 			// IConfig and IAppManager requires a working database. This code
704 704
 			// might however be called when ownCloud is not yet setup.
705
-			if(\OC::$server->getSystemConfig()->getValue('installed', false)) {
705
+			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
706 706
 				$config = $c->getConfig();
707 707
 				$appManager = $c->getAppManager();
708 708
 			} else {
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
 					$c->getTempManager()
721 721
 			);
722 722
 		});
723
-		$this->registerService(\OCP\IRequest::class, function ($c) {
723
+		$this->registerService(\OCP\IRequest::class, function($c) {
724 724
 			if (isset($this['urlParams'])) {
725 725
 				$urlParams = $this['urlParams'];
726 726
 			} else {
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
 		});
757 757
 		$this->registerAlias('Request', \OCP\IRequest::class);
758 758
 
759
-		$this->registerService(\OCP\Mail\IMailer::class, function (Server $c) {
759
+		$this->registerService(\OCP\Mail\IMailer::class, function(Server $c) {
760 760
 			return new Mailer(
761 761
 				$c->getConfig(),
762 762
 				$c->getLogger(),
@@ -770,14 +770,14 @@  discard block
 block discarded – undo
770 770
 		$this->registerService('LDAPProvider', function(Server $c) {
771 771
 			$config = $c->getConfig();
772 772
 			$factoryClass = $config->getSystemValue('ldapProviderFactory', null);
773
-			if(is_null($factoryClass)) {
773
+			if (is_null($factoryClass)) {
774 774
 				throw new \Exception('ldapProviderFactory not set');
775 775
 			}
776 776
 			/** @var \OCP\LDAP\ILDAPProviderFactory $factory */
777 777
 			$factory = new $factoryClass($this);
778 778
 			return $factory->getLDAPProvider();
779 779
 		});
780
-		$this->registerService('LockingProvider', function (Server $c) {
780
+		$this->registerService('LockingProvider', function(Server $c) {
781 781
 			$ini = $c->getIniWrapper();
782 782
 			$config = $c->getConfig();
783 783
 			$ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time')));
@@ -793,37 +793,37 @@  discard block
 block discarded – undo
793 793
 			return new NoopLockingProvider();
794 794
 		});
795 795
 
796
-		$this->registerService(\OCP\Files\Mount\IMountManager::class, function () {
796
+		$this->registerService(\OCP\Files\Mount\IMountManager::class, function() {
797 797
 			return new \OC\Files\Mount\Manager();
798 798
 		});
799 799
 		$this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class);
800 800
 
801
-		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) {
801
+		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) {
802 802
 			return new \OC\Files\Type\Detection(
803 803
 				$c->getURLGenerator(),
804 804
 				\OC::$configDir,
805
-				\OC::$SERVERROOT . '/resources/config/'
805
+				\OC::$SERVERROOT.'/resources/config/'
806 806
 			);
807 807
 		});
808 808
 		$this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class);
809 809
 
810
-		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) {
810
+		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) {
811 811
 			return new \OC\Files\Type\Loader(
812 812
 				$c->getDatabaseConnection()
813 813
 			);
814 814
 		});
815 815
 		$this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class);
816 816
 
817
-		$this->registerService(\OCP\Notification\IManager::class, function (Server $c) {
817
+		$this->registerService(\OCP\Notification\IManager::class, function(Server $c) {
818 818
 			return new Manager(
819 819
 				$c->query(IValidator::class)
820 820
 			);
821 821
 		});
822 822
 		$this->registerAlias('NotificationManager', \OCP\Notification\IManager::class);
823 823
 
824
-		$this->registerService(\OC\CapabilitiesManager::class, function (Server $c) {
824
+		$this->registerService(\OC\CapabilitiesManager::class, function(Server $c) {
825 825
 			$manager = new \OC\CapabilitiesManager($c->getLogger());
826
-			$manager->registerCapability(function () use ($c) {
826
+			$manager->registerCapability(function() use ($c) {
827 827
 				return new \OC\OCS\CoreCapabilities($c->getConfig());
828 828
 			});
829 829
 			return $manager;
@@ -865,13 +865,13 @@  discard block
 block discarded – undo
865 865
 			}
866 866
 			return new \OC_Defaults();
867 867
 		});
868
-		$this->registerService(EventDispatcher::class, function () {
868
+		$this->registerService(EventDispatcher::class, function() {
869 869
 			return new EventDispatcher();
870 870
 		});
871 871
 		$this->registerAlias('EventDispatcher', EventDispatcher::class);
872 872
 		$this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class);
873 873
 
874
-		$this->registerService('CryptoWrapper', function (Server $c) {
874
+		$this->registerService('CryptoWrapper', function(Server $c) {
875 875
 			// FIXME: Instantiiated here due to cyclic dependency
876 876
 			$request = new Request(
877 877
 				[
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
 				$request
897 897
 			);
898 898
 		});
899
-		$this->registerService('CsrfTokenManager', function (Server $c) {
899
+		$this->registerService('CsrfTokenManager', function(Server $c) {
900 900
 			$tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom());
901 901
 
902 902
 			return new CsrfTokenManager(
@@ -904,10 +904,10 @@  discard block
 block discarded – undo
904 904
 				$c->query(SessionStorage::class)
905 905
 			);
906 906
 		});
907
-		$this->registerService(SessionStorage::class, function (Server $c) {
907
+		$this->registerService(SessionStorage::class, function(Server $c) {
908 908
 			return new SessionStorage($c->getSession());
909 909
 		});
910
-		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) {
910
+		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) {
911 911
 			return new ContentSecurityPolicyManager();
912 912
 		});
913 913
 		$this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class);
@@ -958,29 +958,29 @@  discard block
 block discarded – undo
958 958
 			);
959 959
 			return $manager;
960 960
 		});
961
-		$this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) {
961
+		$this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) {
962 962
 			return new \OC\Files\AppData\Factory(
963 963
 				$c->getRootFolder(),
964 964
 				$c->getSystemConfig()
965 965
 			);
966 966
 		});
967 967
 
968
-		$this->registerService('LockdownManager', function (Server $c) {
968
+		$this->registerService('LockdownManager', function(Server $c) {
969 969
 			return new LockdownManager(function() use ($c) {
970 970
 				return $c->getSession();
971 971
 			});
972 972
 		});
973 973
 
974
-		$this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) {
974
+		$this->registerService(\OCP\OCS\IDiscoveryService::class, function(Server $c) {
975 975
 			return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService());
976 976
 		});
977 977
 
978
-		$this->registerService(ICloudIdManager::class, function (Server $c) {
978
+		$this->registerService(ICloudIdManager::class, function(Server $c) {
979 979
 			return new CloudIdManager();
980 980
 		});
981 981
 
982 982
 		/* To trick DI since we don't extend the DIContainer here */
983
-		$this->registerService(CleanPreviewsBackgroundJob::class, function (Server $c) {
983
+		$this->registerService(CleanPreviewsBackgroundJob::class, function(Server $c) {
984 984
 			return new CleanPreviewsBackgroundJob(
985 985
 				$c->getRootFolder(),
986 986
 				$c->getLogger(),
@@ -995,7 +995,7 @@  discard block
 block discarded – undo
995 995
 		$this->registerAlias(\OCP\AppFramework\Utility\ITimeFactory::class, \OC\AppFramework\Utility\TimeFactory::class);
996 996
 		$this->registerAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class);
997 997
 
998
-		$this->registerService(Defaults::class, function (Server $c) {
998
+		$this->registerService(Defaults::class, function(Server $c) {
999 999
 			return new Defaults(
1000 1000
 				$c->getThemingDefaults()
1001 1001
 			);
@@ -1147,7 +1147,7 @@  discard block
 block discarded – undo
1147 1147
 	 * @deprecated since 9.2.0 use IAppData
1148 1148
 	 */
1149 1149
 	public function getAppFolder() {
1150
-		$dir = '/' . \OC_App::getCurrentApp();
1150
+		$dir = '/'.\OC_App::getCurrentApp();
1151 1151
 		$root = $this->getRootFolder();
1152 1152
 		if (!$root->nodeExists($dir)) {
1153 1153
 			$folder = $root->newFolder($dir);
Please login to merge, or discard this patch.