Completed
Pull Request — master (#3233)
by Jan-Christoph
48:24 queued 36:20
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   +95 added lines, -95 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
 		$this->registerAlias(IActionFactory::class, ActionFactory::class);
136 136
 
137
-		$this->registerService(\OCP\IPreview::class, function (Server $c) {
137
+		$this->registerService(\OCP\IPreview::class, function(Server $c) {
138 138
 			return new PreviewManager(
139 139
 				$c->getConfig(),
140 140
 				$c->getRootFolder(),
@@ -145,13 +145,13 @@  discard block
 block discarded – undo
145 145
 		});
146 146
 		$this->registerAlias('PreviewManager', \OCP\IPreview::class);
147 147
 
148
-		$this->registerService(\OC\Preview\Watcher::class, function (Server $c) {
148
+		$this->registerService(\OC\Preview\Watcher::class, function(Server $c) {
149 149
 			return new \OC\Preview\Watcher(
150 150
 				$c->getAppDataDir('preview')
151 151
 			);
152 152
 		});
153 153
 
154
-		$this->registerService('EncryptionManager', function (Server $c) {
154
+		$this->registerService('EncryptionManager', function(Server $c) {
155 155
 			$view = new View();
156 156
 			$util = new Encryption\Util(
157 157
 				$view,
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 			);
170 170
 		});
171 171
 
172
-		$this->registerService('EncryptionFileHelper', function (Server $c) {
172
+		$this->registerService('EncryptionFileHelper', function(Server $c) {
173 173
 			$util = new Encryption\Util(
174 174
 				new View(),
175 175
 				$c->getUserManager(),
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 			return new Encryption\File($util);
180 180
 		});
181 181
 
182
-		$this->registerService('EncryptionKeyStorage', function (Server $c) {
182
+		$this->registerService('EncryptionKeyStorage', function(Server $c) {
183 183
 			$view = new View();
184 184
 			$util = new Encryption\Util(
185 185
 				$view,
@@ -190,32 +190,32 @@  discard block
 block discarded – undo
190 190
 
191 191
 			return new Encryption\Keys\Storage($view, $util);
192 192
 		});
193
-		$this->registerService('TagMapper', function (Server $c) {
193
+		$this->registerService('TagMapper', function(Server $c) {
194 194
 			return new TagMapper($c->getDatabaseConnection());
195 195
 		});
196 196
 
197
-		$this->registerService(\OCP\ITagManager::class, function (Server $c) {
197
+		$this->registerService(\OCP\ITagManager::class, function(Server $c) {
198 198
 			$tagMapper = $c->query('TagMapper');
199 199
 			return new TagManager($tagMapper, $c->getUserSession());
200 200
 		});
201 201
 		$this->registerAlias('TagManager', \OCP\ITagManager::class);
202 202
 
203
-		$this->registerService('SystemTagManagerFactory', function (Server $c) {
203
+		$this->registerService('SystemTagManagerFactory', function(Server $c) {
204 204
 			$config = $c->getConfig();
205 205
 			$factoryClass = $config->getSystemValue('systemtags.managerFactory', '\OC\SystemTag\ManagerFactory');
206 206
 			/** @var \OC\SystemTag\ManagerFactory $factory */
207 207
 			$factory = new $factoryClass($this);
208 208
 			return $factory;
209 209
 		});
210
-		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) {
210
+		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) {
211 211
 			return $c->query('SystemTagManagerFactory')->getManager();
212 212
 		});
213 213
 		$this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class);
214 214
 
215
-		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) {
215
+		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) {
216 216
 			return $c->query('SystemTagManagerFactory')->getObjectMapper();
217 217
 		});
218
-		$this->registerService('RootFolder', function (Server $c) {
218
+		$this->registerService('RootFolder', function(Server $c) {
219 219
 			$manager = \OC\Files\Filesystem::getMountManager(null);
220 220
 			$view = new View();
221 221
 			$root = new Root(
@@ -243,30 +243,30 @@  discard block
 block discarded – undo
243 243
 		});
244 244
 		$this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class);
245 245
 
246
-		$this->registerService(\OCP\IUserManager::class, function (Server $c) {
246
+		$this->registerService(\OCP\IUserManager::class, function(Server $c) {
247 247
 			$config = $c->getConfig();
248 248
 			return new \OC\User\Manager($config);
249 249
 		});
250 250
 		$this->registerAlias('UserManager', \OCP\IUserManager::class);
251 251
 
252
-		$this->registerService(\OCP\IGroupManager::class, function (Server $c) {
252
+		$this->registerService(\OCP\IGroupManager::class, function(Server $c) {
253 253
 			$groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger());
254
-			$groupManager->listen('\OC\Group', 'preCreate', function ($gid) {
254
+			$groupManager->listen('\OC\Group', 'preCreate', function($gid) {
255 255
 				\OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid));
256 256
 			});
257
-			$groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) {
257
+			$groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) {
258 258
 				\OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID()));
259 259
 			});
260
-			$groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) {
260
+			$groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) {
261 261
 				\OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID()));
262 262
 			});
263
-			$groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) {
263
+			$groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) {
264 264
 				\OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID()));
265 265
 			});
266
-			$groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
266
+			$groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
267 267
 				\OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID()));
268 268
 			});
269
-			$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
269
+			$groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
270 270
 				\OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
271 271
 				//Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks
272 272
 				\OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
@@ -286,11 +286,11 @@  discard block
 block discarded – undo
286 286
 			return new Store($session, $logger, $tokenProvider);
287 287
 		});
288 288
 		$this->registerAlias(IStore::class, Store::class);
289
-		$this->registerService('OC\Authentication\Token\DefaultTokenMapper', function (Server $c) {
289
+		$this->registerService('OC\Authentication\Token\DefaultTokenMapper', function(Server $c) {
290 290
 			$dbConnection = $c->getDatabaseConnection();
291 291
 			return new Authentication\Token\DefaultTokenMapper($dbConnection);
292 292
 		});
293
-		$this->registerService('OC\Authentication\Token\DefaultTokenProvider', function (Server $c) {
293
+		$this->registerService('OC\Authentication\Token\DefaultTokenProvider', function(Server $c) {
294 294
 			$mapper = $c->query('OC\Authentication\Token\DefaultTokenMapper');
295 295
 			$crypto = $c->getCrypto();
296 296
 			$config = $c->getConfig();
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 		});
301 301
 		$this->registerAlias('OC\Authentication\Token\IProvider', 'OC\Authentication\Token\DefaultTokenProvider');
302 302
 
303
-		$this->registerService(\OCP\IUserSession::class, function (Server $c) {
303
+		$this->registerService(\OCP\IUserSession::class, function(Server $c) {
304 304
 			$manager = $c->getUserManager();
305 305
 			$session = new \OC\Session\Memory('');
306 306
 			$timeFactory = new TimeFactory();
@@ -313,40 +313,40 @@  discard block
 block discarded – undo
313 313
 			}
314 314
 
315 315
 			$userSession = new \OC\User\Session($manager, $session, $timeFactory, $defaultTokenProvider, $c->getConfig(), $c->getSecureRandom());
316
-			$userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) {
316
+			$userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) {
317 317
 				\OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password));
318 318
 			});
319
-			$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
319
+			$userSession->listen('\OC\User', 'postCreateUser', function($user, $password) {
320 320
 				/** @var $user \OC\User\User */
321 321
 				\OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password));
322 322
 			});
323
-			$userSession->listen('\OC\User', 'preDelete', function ($user) {
323
+			$userSession->listen('\OC\User', 'preDelete', function($user) {
324 324
 				/** @var $user \OC\User\User */
325 325
 				\OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID()));
326 326
 			});
327
-			$userSession->listen('\OC\User', 'postDelete', function ($user) {
327
+			$userSession->listen('\OC\User', 'postDelete', function($user) {
328 328
 				/** @var $user \OC\User\User */
329 329
 				\OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID()));
330 330
 			});
331
-			$userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) {
331
+			$userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) {
332 332
 				/** @var $user \OC\User\User */
333 333
 				\OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
334 334
 			});
335
-			$userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) {
335
+			$userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) {
336 336
 				/** @var $user \OC\User\User */
337 337
 				\OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
338 338
 			});
339
-			$userSession->listen('\OC\User', 'preLogin', function ($uid, $password) {
339
+			$userSession->listen('\OC\User', 'preLogin', function($uid, $password) {
340 340
 				\OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password));
341 341
 			});
342
-			$userSession->listen('\OC\User', 'postLogin', function ($user, $password) {
342
+			$userSession->listen('\OC\User', 'postLogin', function($user, $password) {
343 343
 				/** @var $user \OC\User\User */
344 344
 				\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
345 345
 			});
346
-			$userSession->listen('\OC\User', 'logout', function () {
346
+			$userSession->listen('\OC\User', 'logout', function() {
347 347
 				\OC_Hook::emit('OC_User', 'logout', array());
348 348
 			});
349
-			$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value) {
349
+			$userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value) {
350 350
 				/** @var $user \OC\User\User */
351 351
 				\OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value));
352 352
 			});
@@ -354,14 +354,14 @@  discard block
 block discarded – undo
354 354
 		});
355 355
 		$this->registerAlias('UserSession', \OCP\IUserSession::class);
356 356
 
357
-		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function (Server $c) {
357
+		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function(Server $c) {
358 358
 			return new \OC\Authentication\TwoFactorAuth\Manager($c->getAppManager(), $c->getSession(), $c->getConfig(), $c->getActivityManager(), $c->getLogger());
359 359
 		});
360 360
 
361 361
 		$this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class);
362 362
 		$this->registerAlias('NavigationManager', \OCP\INavigationManager::class);
363 363
 
364
-		$this->registerService(\OC\AllConfig::class, function (Server $c) {
364
+		$this->registerService(\OC\AllConfig::class, function(Server $c) {
365 365
 			return new \OC\AllConfig(
366 366
 				$c->getSystemConfig()
367 367
 			);
@@ -369,17 +369,17 @@  discard block
 block discarded – undo
369 369
 		$this->registerAlias('AllConfig', \OC\AllConfig::class);
370 370
 		$this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class);
371 371
 
372
-		$this->registerService('SystemConfig', function ($c) use ($config) {
372
+		$this->registerService('SystemConfig', function($c) use ($config) {
373 373
 			return new \OC\SystemConfig($config);
374 374
 		});
375 375
 
376
-		$this->registerService(\OC\AppConfig::class, function (Server $c) {
376
+		$this->registerService(\OC\AppConfig::class, function(Server $c) {
377 377
 			return new \OC\AppConfig($c->getDatabaseConnection());
378 378
 		});
379 379
 		$this->registerAlias('AppConfig', \OC\AppConfig::class);
380 380
 		$this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class);
381 381
 
382
-		$this->registerService(\OCP\L10N\IFactory::class, function (Server $c) {
382
+		$this->registerService(\OCP\L10N\IFactory::class, function(Server $c) {
383 383
 			return new \OC\L10N\Factory(
384 384
 				$c->getConfig(),
385 385
 				$c->getRequest(),
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 		});
390 390
 		$this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class);
391 391
 
392
-		$this->registerService(\OCP\IURLGenerator::class, function (Server $c) {
392
+		$this->registerService(\OCP\IURLGenerator::class, function(Server $c) {
393 393
 			$config = $c->getConfig();
394 394
 			$cacheFactory = $c->getMemCacheFactory();
395 395
 			return new \OC\URLGenerator(
@@ -399,10 +399,10 @@  discard block
 block discarded – undo
399 399
 		});
400 400
 		$this->registerAlias('URLGenerator', \OCP\IURLGenerator::class);
401 401
 
402
-		$this->registerService('AppHelper', function ($c) {
402
+		$this->registerService('AppHelper', function($c) {
403 403
 			return new \OC\AppHelper();
404 404
 		});
405
-		$this->registerService('AppFetcher', function ($c) {
405
+		$this->registerService('AppFetcher', function($c) {
406 406
 			return new AppFetcher(
407 407
 				$this->getAppDataDir('appstore'),
408 408
 				$this->getHTTPClientService(),
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 				$this->getConfig()
411 411
 			);
412 412
 		});
413
-		$this->registerService('CategoryFetcher', function ($c) {
413
+		$this->registerService('CategoryFetcher', function($c) {
414 414
 			return new CategoryFetcher(
415 415
 				$this->getAppDataDir('appstore'),
416 416
 				$this->getHTTPClientService(),
@@ -419,21 +419,21 @@  discard block
 block discarded – undo
419 419
 			);
420 420
 		});
421 421
 
422
-		$this->registerService(\OCP\ICache::class, function ($c) {
422
+		$this->registerService(\OCP\ICache::class, function($c) {
423 423
 			return new Cache\File();
424 424
 		});
425 425
 		$this->registerAlias('UserCache', \OCP\ICache::class);
426 426
 
427
-		$this->registerService(Factory::class, function (Server $c) {
427
+		$this->registerService(Factory::class, function(Server $c) {
428 428
 			$config = $c->getConfig();
429 429
 
430 430
 			if ($config->getSystemValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) {
431 431
 				$v = \OC_App::getAppVersions();
432
-				$v['core'] = md5(file_get_contents(\OC::$SERVERROOT . '/version.php'));
432
+				$v['core'] = md5(file_get_contents(\OC::$SERVERROOT.'/version.php'));
433 433
 				$version = implode(',', $v);
434 434
 				$instanceId = \OC_Util::getInstanceId();
435 435
 				$path = \OC::$SERVERROOT;
436
-				$prefix = md5($instanceId . '-' . $version . '-' . $path . '-' . \OC::$WEBROOT);
436
+				$prefix = md5($instanceId.'-'.$version.'-'.$path.'-'.\OC::$WEBROOT);
437 437
 				return new \OC\Memcache\Factory($prefix, $c->getLogger(),
438 438
 					$config->getSystemValue('memcache.local', null),
439 439
 					$config->getSystemValue('memcache.distributed', null),
@@ -450,12 +450,12 @@  discard block
 block discarded – undo
450 450
 		$this->registerAlias('MemCacheFactory', Factory::class);
451 451
 		$this->registerAlias(ICacheFactory::class, Factory::class);
452 452
 
453
-		$this->registerService('RedisFactory', function (Server $c) {
453
+		$this->registerService('RedisFactory', function(Server $c) {
454 454
 			$systemConfig = $c->getSystemConfig();
455 455
 			return new RedisFactory($systemConfig);
456 456
 		});
457 457
 
458
-		$this->registerService(\OCP\Activity\IManager::class, function (Server $c) {
458
+		$this->registerService(\OCP\Activity\IManager::class, function(Server $c) {
459 459
 			return new \OC\Activity\Manager(
460 460
 				$c->getRequest(),
461 461
 				$c->getUserSession(),
@@ -465,14 +465,14 @@  discard block
 block discarded – undo
465 465
 		});
466 466
 		$this->registerAlias('ActivityManager', \OCP\Activity\IManager::class);
467 467
 
468
-		$this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) {
468
+		$this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) {
469 469
 			return new \OC\Activity\EventMerger(
470 470
 				$c->getL10N('lib')
471 471
 			);
472 472
 		});
473 473
 		$this->registerAlias(IValidator::class, Validator::class);
474 474
 
475
-		$this->registerService(\OCP\IAvatarManager::class, function (Server $c) {
475
+		$this->registerService(\OCP\IAvatarManager::class, function(Server $c) {
476 476
 			return new AvatarManager(
477 477
 				$c->getUserManager(),
478 478
 				$c->getAppDataDir('avatar'),
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
 		});
484 484
 		$this->registerAlias('AvatarManager', \OCP\IAvatarManager::class);
485 485
 
486
-		$this->registerService(\OCP\ILogger::class, function (Server $c) {
486
+		$this->registerService(\OCP\ILogger::class, function(Server $c) {
487 487
 			$logType = $c->query('AllConfig')->getSystemValue('log_type', 'file');
488 488
 			$logger = Log::getLogClass($logType);
489 489
 			call_user_func(array($logger, 'init'));
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 		});
493 493
 		$this->registerAlias('Logger', \OCP\ILogger::class);
494 494
 
495
-		$this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) {
495
+		$this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) {
496 496
 			$config = $c->getConfig();
497 497
 			return new \OC\BackgroundJob\JobList(
498 498
 				$c->getDatabaseConnection(),
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
 		});
503 503
 		$this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class);
504 504
 
505
-		$this->registerService(\OCP\Route\IRouter::class, function (Server $c) {
505
+		$this->registerService(\OCP\Route\IRouter::class, function(Server $c) {
506 506
 			$cacheFactory = $c->getMemCacheFactory();
507 507
 			$logger = $c->getLogger();
508 508
 			if ($cacheFactory->isAvailable()) {
@@ -514,32 +514,32 @@  discard block
 block discarded – undo
514 514
 		});
515 515
 		$this->registerAlias('Router', \OCP\Route\IRouter::class);
516 516
 
517
-		$this->registerService(\OCP\ISearch::class, function ($c) {
517
+		$this->registerService(\OCP\ISearch::class, function($c) {
518 518
 			return new Search();
519 519
 		});
520 520
 		$this->registerAlias('Search', \OCP\ISearch::class);
521 521
 
522
-		$this->registerService(\OCP\Security\ISecureRandom::class, function ($c) {
522
+		$this->registerService(\OCP\Security\ISecureRandom::class, function($c) {
523 523
 			return new SecureRandom();
524 524
 		});
525 525
 		$this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class);
526 526
 
527
-		$this->registerService(\OCP\Security\ICrypto::class, function (Server $c) {
527
+		$this->registerService(\OCP\Security\ICrypto::class, function(Server $c) {
528 528
 			return new Crypto($c->getConfig(), $c->getSecureRandom());
529 529
 		});
530 530
 		$this->registerAlias('Crypto', \OCP\Security\ICrypto::class);
531 531
 
532
-		$this->registerService(\OCP\Security\IHasher::class, function (Server $c) {
532
+		$this->registerService(\OCP\Security\IHasher::class, function(Server $c) {
533 533
 			return new Hasher($c->getConfig());
534 534
 		});
535 535
 		$this->registerAlias('Hasher', \OCP\Security\IHasher::class);
536 536
 
537
-		$this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) {
537
+		$this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) {
538 538
 			return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection());
539 539
 		});
540 540
 		$this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class);
541 541
 
542
-		$this->registerService(IDBConnection::class, function (Server $c) {
542
+		$this->registerService(IDBConnection::class, function(Server $c) {
543 543
 			$systemConfig = $c->getSystemConfig();
544 544
 			$factory = new \OC\DB\ConnectionFactory($systemConfig);
545 545
 			$type = $systemConfig->getValue('dbtype', 'sqlite');
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
 		});
554 554
 		$this->registerAlias('DatabaseConnection', IDBConnection::class);
555 555
 
556
-		$this->registerService('HTTPHelper', function (Server $c) {
556
+		$this->registerService('HTTPHelper', function(Server $c) {
557 557
 			$config = $c->getConfig();
558 558
 			return new HTTPHelper(
559 559
 				$config,
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
 			);
562 562
 		});
563 563
 
564
-		$this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) {
564
+		$this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) {
565 565
 			$user = \OC_User::getUser();
566 566
 			$uid = $user ? $user : null;
567 567
 			return new ClientService(
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
 		});
572 572
 		$this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class);
573 573
 
574
-		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) {
574
+		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) {
575 575
 			if ($c->getSystemConfig()->getValue('debug', false)) {
576 576
 				return new EventLogger();
577 577
 			} else {
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
 		});
581 581
 		$this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class);
582 582
 
583
-		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) {
583
+		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) {
584 584
 			if ($c->getSystemConfig()->getValue('debug', false)) {
585 585
 				return new QueryLogger();
586 586
 			} else {
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
 		});
590 590
 		$this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class);
591 591
 
592
-		$this->registerService(TempManager::class, function (Server $c) {
592
+		$this->registerService(TempManager::class, function(Server $c) {
593 593
 			return new TempManager(
594 594
 				$c->getLogger(),
595 595
 				$c->getConfig()
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
 		$this->registerAlias('TempManager', TempManager::class);
599 599
 		$this->registerAlias(ITempManager::class, TempManager::class);
600 600
 
601
-		$this->registerService(AppManager::class, function (Server $c) {
601
+		$this->registerService(AppManager::class, function(Server $c) {
602 602
 			return new \OC\App\AppManager(
603 603
 				$c->getUserSession(),
604 604
 				$c->getAppConfig(),
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
 		$this->registerAlias('AppManager', AppManager::class);
611 611
 		$this->registerAlias(IAppManager::class, AppManager::class);
612 612
 
613
-		$this->registerService(\OCP\IDateTimeZone::class, function (Server $c) {
613
+		$this->registerService(\OCP\IDateTimeZone::class, function(Server $c) {
614 614
 			return new DateTimeZone(
615 615
 				$c->getConfig(),
616 616
 				$c->getSession()
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
 		});
619 619
 		$this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class);
620 620
 
621
-		$this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) {
621
+		$this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) {
622 622
 			$language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null);
623 623
 
624 624
 			return new DateTimeFormatter(
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
 		});
629 629
 		$this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class);
630 630
 
631
-		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) {
631
+		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) {
632 632
 			$mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger());
633 633
 			$listener = new UserMountCacheListener($mountCache);
634 634
 			$listener->listen($c->getUserManager());
@@ -636,10 +636,10 @@  discard block
 block discarded – undo
636 636
 		});
637 637
 		$this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class);
638 638
 
639
-		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) {
639
+		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) {
640 640
 			$loader = \OC\Files\Filesystem::getLoader();
641 641
 			$mountCache = $c->query('UserMountCache');
642
-			$manager =  new \OC\Files\Config\MountProviderCollection($loader, $mountCache);
642
+			$manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache);
643 643
 
644 644
 			// builtin providers
645 645
 
@@ -652,14 +652,14 @@  discard block
 block discarded – undo
652 652
 		});
653 653
 		$this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class);
654 654
 
655
-		$this->registerService('IniWrapper', function ($c) {
655
+		$this->registerService('IniWrapper', function($c) {
656 656
 			return new IniGetWrapper();
657 657
 		});
658
-		$this->registerService('AsyncCommandBus', function (Server $c) {
658
+		$this->registerService('AsyncCommandBus', function(Server $c) {
659 659
 			$jobList = $c->getJobList();
660 660
 			return new AsyncBus($jobList);
661 661
 		});
662
-		$this->registerService('TrustedDomainHelper', function ($c) {
662
+		$this->registerService('TrustedDomainHelper', function($c) {
663 663
 			return new TrustedDomainHelper($this->getConfig());
664 664
 		});
665 665
 		$this->registerService('Throttler', function(Server $c) {
@@ -670,10 +670,10 @@  discard block
 block discarded – undo
670 670
 				$c->getConfig()
671 671
 			);
672 672
 		});
673
-		$this->registerService('IntegrityCodeChecker', function (Server $c) {
673
+		$this->registerService('IntegrityCodeChecker', function(Server $c) {
674 674
 			// IConfig and IAppManager requires a working database. This code
675 675
 			// might however be called when ownCloud is not yet setup.
676
-			if(\OC::$server->getSystemConfig()->getValue('installed', false)) {
676
+			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
677 677
 				$config = $c->getConfig();
678 678
 				$appManager = $c->getAppManager();
679 679
 			} else {
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
 					$c->getTempManager()
692 692
 			);
693 693
 		});
694
-		$this->registerService(\OCP\IRequest::class, function ($c) {
694
+		$this->registerService(\OCP\IRequest::class, function($c) {
695 695
 			if (isset($this['urlParams'])) {
696 696
 				$urlParams = $this['urlParams'];
697 697
 			} else {
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
 		});
728 728
 		$this->registerAlias('Request', \OCP\IRequest::class);
729 729
 
730
-		$this->registerService(\OCP\Mail\IMailer::class, function (Server $c) {
730
+		$this->registerService(\OCP\Mail\IMailer::class, function(Server $c) {
731 731
 			return new Mailer(
732 732
 				$c->getConfig(),
733 733
 				$c->getLogger(),
@@ -739,14 +739,14 @@  discard block
 block discarded – undo
739 739
 		$this->registerService('LDAPProvider', function(Server $c) {
740 740
 			$config = $c->getConfig();
741 741
 			$factoryClass = $config->getSystemValue('ldapProviderFactory', null);
742
-			if(is_null($factoryClass)) {
742
+			if (is_null($factoryClass)) {
743 743
 				throw new \Exception('ldapProviderFactory not set');
744 744
 			}
745 745
 			/** @var \OCP\LDAP\ILDAPProviderFactory $factory */
746 746
 			$factory = new $factoryClass($this);
747 747
 			return $factory->getLDAPProvider();
748 748
 		});
749
-		$this->registerService('LockingProvider', function (Server $c) {
749
+		$this->registerService('LockingProvider', function(Server $c) {
750 750
 			$ini = $c->getIniWrapper();
751 751
 			$config = $c->getConfig();
752 752
 			$ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time')));
@@ -762,37 +762,37 @@  discard block
 block discarded – undo
762 762
 			return new NoopLockingProvider();
763 763
 		});
764 764
 
765
-		$this->registerService(\OCP\Files\Mount\IMountManager::class, function () {
765
+		$this->registerService(\OCP\Files\Mount\IMountManager::class, function() {
766 766
 			return new \OC\Files\Mount\Manager();
767 767
 		});
768 768
 		$this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class);
769 769
 
770
-		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) {
770
+		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) {
771 771
 			return new \OC\Files\Type\Detection(
772 772
 				$c->getURLGenerator(),
773 773
 				\OC::$configDir,
774
-				\OC::$SERVERROOT . '/resources/config/'
774
+				\OC::$SERVERROOT.'/resources/config/'
775 775
 			);
776 776
 		});
777 777
 		$this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class);
778 778
 
779
-		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) {
779
+		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) {
780 780
 			return new \OC\Files\Type\Loader(
781 781
 				$c->getDatabaseConnection()
782 782
 			);
783 783
 		});
784 784
 		$this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class);
785 785
 
786
-		$this->registerService(\OCP\Notification\IManager::class, function (Server $c) {
786
+		$this->registerService(\OCP\Notification\IManager::class, function(Server $c) {
787 787
 			return new Manager(
788 788
 				$c->query(IValidator::class)
789 789
 			);
790 790
 		});
791 791
 		$this->registerAlias('NotificationManager', \OCP\Notification\IManager::class);
792 792
 
793
-		$this->registerService(\OC\CapabilitiesManager::class, function (Server $c) {
793
+		$this->registerService(\OC\CapabilitiesManager::class, function(Server $c) {
794 794
 			$manager = new \OC\CapabilitiesManager($c->getLogger());
795
-			$manager->registerCapability(function () use ($c) {
795
+			$manager->registerCapability(function() use ($c) {
796 796
 				return new \OC\OCS\CoreCapabilities($c->getConfig());
797 797
 			});
798 798
 			return $manager;
@@ -834,13 +834,13 @@  discard block
 block discarded – undo
834 834
 			}
835 835
 			return new \OC_Defaults();
836 836
 		});
837
-		$this->registerService(EventDispatcher::class, function () {
837
+		$this->registerService(EventDispatcher::class, function() {
838 838
 			return new EventDispatcher();
839 839
 		});
840 840
 		$this->registerAlias('EventDispatcher', EventDispatcher::class);
841 841
 		$this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class);
842 842
 
843
-		$this->registerService('CryptoWrapper', function (Server $c) {
843
+		$this->registerService('CryptoWrapper', function(Server $c) {
844 844
 			// FIXME: Instantiiated here due to cyclic dependency
845 845
 			$request = new Request(
846 846
 				[
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
 				$request
866 866
 			);
867 867
 		});
868
-		$this->registerService('CsrfTokenManager', function (Server $c) {
868
+		$this->registerService('CsrfTokenManager', function(Server $c) {
869 869
 			$tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom());
870 870
 
871 871
 			return new CsrfTokenManager(
@@ -873,10 +873,10 @@  discard block
 block discarded – undo
873 873
 				$c->query(SessionStorage::class)
874 874
 			);
875 875
 		});
876
-		$this->registerService(SessionStorage::class, function (Server $c) {
876
+		$this->registerService(SessionStorage::class, function(Server $c) {
877 877
 			return new SessionStorage($c->getSession());
878 878
 		});
879
-		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) {
879
+		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) {
880 880
 			return new ContentSecurityPolicyManager();
881 881
 		});
882 882
 		$this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class);
@@ -927,23 +927,23 @@  discard block
 block discarded – undo
927 927
 			);
928 928
 			return $manager;
929 929
 		});
930
-		$this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) {
930
+		$this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) {
931 931
 			return new \OC\Files\AppData\Factory(
932 932
 				$c->getRootFolder(),
933 933
 				$c->getSystemConfig()
934 934
 			);
935 935
 		});
936 936
 
937
-		$this->registerService('LockdownManager', function (Server $c) {
937
+		$this->registerService('LockdownManager', function(Server $c) {
938 938
 			return new LockdownManager();
939 939
 		});
940 940
 
941
-		$this->registerService(ICloudIdManager::class, function (Server $c) {
941
+		$this->registerService(ICloudIdManager::class, function(Server $c) {
942 942
 			return new CloudIdManager();
943 943
 		});
944 944
 
945 945
 		/* To trick DI since we don't extend the DIContainer here */
946
-		$this->registerService(CleanPreviewsBackgroundJob::class, function (Server $c) {
946
+		$this->registerService(CleanPreviewsBackgroundJob::class, function(Server $c) {
947 947
 			return new CleanPreviewsBackgroundJob(
948 948
 				$c->getRootFolder(),
949 949
 				$c->getLogger(),
@@ -1097,7 +1097,7 @@  discard block
 block discarded – undo
1097 1097
 	 * @deprecated since 9.2.0 use IAppData
1098 1098
 	 */
1099 1099
 	public function getAppFolder() {
1100
-		$dir = '/' . \OC_App::getCurrentApp();
1100
+		$dir = '/'.\OC_App::getCurrentApp();
1101 1101
 		$root = $this->getRootFolder();
1102 1102
 		if (!$root->nodeExists($dir)) {
1103 1103
 			$folder = $root->newFolder($dir);
Please login to merge, or discard this patch.