Completed
Push — master ( b8492c...7ef722 )
by Blizzz
158:19 queued 134:06
created
lib/private/Server.php 1 patch
Spacing   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 		// To find out if we are running from CLI or not
168 168
 		$this->registerParameter('isCLI', \OC::$CLI);
169 169
 
170
-		$this->registerService(\OCP\IServerContainer::class, function (IServerContainer $c) {
170
+		$this->registerService(\OCP\IServerContainer::class, function(IServerContainer $c) {
171 171
 			return $c;
172 172
 		});
173 173
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 		$this->registerAlias(IActionFactory::class, ActionFactory::class);
181 181
 
182 182
 
183
-		$this->registerService(\OCP\IPreview::class, function (Server $c) {
183
+		$this->registerService(\OCP\IPreview::class, function(Server $c) {
184 184
 			return new PreviewManager(
185 185
 				$c->getConfig(),
186 186
 				$c->getRootFolder(),
@@ -191,13 +191,13 @@  discard block
 block discarded – undo
191 191
 		});
192 192
 		$this->registerAlias('PreviewManager', \OCP\IPreview::class);
193 193
 
194
-		$this->registerService(\OC\Preview\Watcher::class, function (Server $c) {
194
+		$this->registerService(\OC\Preview\Watcher::class, function(Server $c) {
195 195
 			return new \OC\Preview\Watcher(
196 196
 				$c->getAppDataDir('preview')
197 197
 			);
198 198
 		});
199 199
 
200
-		$this->registerService('EncryptionManager', function (Server $c) {
200
+		$this->registerService('EncryptionManager', function(Server $c) {
201 201
 			$view = new View();
202 202
 			$util = new Encryption\Util(
203 203
 				$view,
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 			);
216 216
 		});
217 217
 
218
-		$this->registerService('EncryptionFileHelper', function (Server $c) {
218
+		$this->registerService('EncryptionFileHelper', function(Server $c) {
219 219
 			$util = new Encryption\Util(
220 220
 				new View(),
221 221
 				$c->getUserManager(),
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 			);
230 230
 		});
231 231
 
232
-		$this->registerService('EncryptionKeyStorage', function (Server $c) {
232
+		$this->registerService('EncryptionKeyStorage', function(Server $c) {
233 233
 			$view = new View();
234 234
 			$util = new Encryption\Util(
235 235
 				$view,
@@ -240,30 +240,30 @@  discard block
 block discarded – undo
240 240
 
241 241
 			return new Encryption\Keys\Storage($view, $util);
242 242
 		});
243
-		$this->registerService('TagMapper', function (Server $c) {
243
+		$this->registerService('TagMapper', function(Server $c) {
244 244
 			return new TagMapper($c->getDatabaseConnection());
245 245
 		});
246 246
 
247
-		$this->registerService(\OCP\ITagManager::class, function (Server $c) {
247
+		$this->registerService(\OCP\ITagManager::class, function(Server $c) {
248 248
 			$tagMapper = $c->query('TagMapper');
249 249
 			return new TagManager($tagMapper, $c->getUserSession());
250 250
 		});
251 251
 		$this->registerAlias('TagManager', \OCP\ITagManager::class);
252 252
 
253
-		$this->registerService('SystemTagManagerFactory', function (Server $c) {
253
+		$this->registerService('SystemTagManagerFactory', function(Server $c) {
254 254
 			$config = $c->getConfig();
255 255
 			$factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class);
256 256
 			return new $factoryClass($this);
257 257
 		});
258
-		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) {
258
+		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) {
259 259
 			return $c->query('SystemTagManagerFactory')->getManager();
260 260
 		});
261 261
 		$this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class);
262 262
 
263
-		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) {
263
+		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) {
264 264
 			return $c->query('SystemTagManagerFactory')->getObjectMapper();
265 265
 		});
266
-		$this->registerService('RootFolder', function (Server $c) {
266
+		$this->registerService('RootFolder', function(Server $c) {
267 267
 			$manager = \OC\Files\Filesystem::getMountManager(null);
268 268
 			$view = new View();
269 269
 			$root = new Root(
@@ -284,38 +284,38 @@  discard block
 block discarded – undo
284 284
 		});
285 285
 		$this->registerAlias('SystemTagObjectMapper', \OCP\SystemTag\ISystemTagObjectMapper::class);
286 286
 
287
-		$this->registerService(\OCP\Files\IRootFolder::class, function (Server $c) {
288
-			return new LazyRoot(function () use ($c) {
287
+		$this->registerService(\OCP\Files\IRootFolder::class, function(Server $c) {
288
+			return new LazyRoot(function() use ($c) {
289 289
 				return $c->query('RootFolder');
290 290
 			});
291 291
 		});
292 292
 		$this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class);
293 293
 
294
-		$this->registerService(\OC\User\Manager::class, function (Server $c) {
294
+		$this->registerService(\OC\User\Manager::class, function(Server $c) {
295 295
 			$config = $c->getConfig();
296 296
 			return new \OC\User\Manager($config);
297 297
 		});
298 298
 		$this->registerAlias('UserManager', \OC\User\Manager::class);
299 299
 		$this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class);
300 300
 
301
-		$this->registerService(\OCP\IGroupManager::class, function (Server $c) {
301
+		$this->registerService(\OCP\IGroupManager::class, function(Server $c) {
302 302
 			$groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger());
303
-			$groupManager->listen('\OC\Group', 'preCreate', function ($gid) {
303
+			$groupManager->listen('\OC\Group', 'preCreate', function($gid) {
304 304
 				\OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid));
305 305
 			});
306
-			$groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) {
306
+			$groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) {
307 307
 				\OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID()));
308 308
 			});
309
-			$groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) {
309
+			$groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) {
310 310
 				\OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID()));
311 311
 			});
312
-			$groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) {
312
+			$groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) {
313 313
 				\OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID()));
314 314
 			});
315
-			$groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
315
+			$groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
316 316
 				\OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID()));
317 317
 			});
318
-			$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
318
+			$groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
319 319
 				\OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
320 320
 				//Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks
321 321
 				\OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 		});
325 325
 		$this->registerAlias('GroupManager', \OCP\IGroupManager::class);
326 326
 
327
-		$this->registerService(Store::class, function (Server $c) {
327
+		$this->registerService(Store::class, function(Server $c) {
328 328
 			$session = $c->getSession();
329 329
 			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
330 330
 				$tokenProvider = $c->query(IProvider::class);
@@ -335,13 +335,13 @@  discard block
 block discarded – undo
335 335
 			return new Store($session, $logger, $tokenProvider);
336 336
 		});
337 337
 		$this->registerAlias(IStore::class, Store::class);
338
-		$this->registerService(Authentication\Token\DefaultTokenMapper::class, function (Server $c) {
338
+		$this->registerService(Authentication\Token\DefaultTokenMapper::class, function(Server $c) {
339 339
 			$dbConnection = $c->getDatabaseConnection();
340 340
 			return new Authentication\Token\DefaultTokenMapper($dbConnection);
341 341
 		});
342 342
 		$this->registerAlias(IProvider::class, Authentication\Token\Manager::class);
343 343
 
344
-		$this->registerService(\OCP\IUserSession::class, function (Server $c) {
344
+		$this->registerService(\OCP\IUserSession::class, function(Server $c) {
345 345
 			$manager = $c->getUserManager();
346 346
 			$session = new \OC\Session\Memory('');
347 347
 			$timeFactory = new TimeFactory();
@@ -365,45 +365,45 @@  discard block
 block discarded – undo
365 365
 				$c->getLockdownManager(),
366 366
 				$c->getLogger()
367 367
 			);
368
-			$userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) {
368
+			$userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) {
369 369
 				\OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password));
370 370
 			});
371
-			$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
371
+			$userSession->listen('\OC\User', 'postCreateUser', function($user, $password) {
372 372
 				/** @var $user \OC\User\User */
373 373
 				\OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password));
374 374
 			});
375
-			$userSession->listen('\OC\User', 'preDelete', function ($user) use ($dispatcher) {
375
+			$userSession->listen('\OC\User', 'preDelete', function($user) use ($dispatcher) {
376 376
 				/** @var $user \OC\User\User */
377 377
 				\OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID()));
378 378
 				$dispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user));
379 379
 			});
380
-			$userSession->listen('\OC\User', 'postDelete', function ($user) {
380
+			$userSession->listen('\OC\User', 'postDelete', function($user) {
381 381
 				/** @var $user \OC\User\User */
382 382
 				\OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID()));
383 383
 			});
384
-			$userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) {
384
+			$userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) {
385 385
 				/** @var $user \OC\User\User */
386 386
 				\OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
387 387
 			});
388
-			$userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) {
388
+			$userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) {
389 389
 				/** @var $user \OC\User\User */
390 390
 				\OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
391 391
 			});
392
-			$userSession->listen('\OC\User', 'preLogin', function ($uid, $password) {
392
+			$userSession->listen('\OC\User', 'preLogin', function($uid, $password) {
393 393
 				\OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password));
394 394
 			});
395
-			$userSession->listen('\OC\User', 'postLogin', function ($user, $password) {
395
+			$userSession->listen('\OC\User', 'postLogin', function($user, $password) {
396 396
 				/** @var $user \OC\User\User */
397 397
 				\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
398 398
 			});
399
-			$userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) {
399
+			$userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) {
400 400
 				/** @var $user \OC\User\User */
401 401
 				\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
402 402
 			});
403
-			$userSession->listen('\OC\User', 'logout', function () {
403
+			$userSession->listen('\OC\User', 'logout', function() {
404 404
 				\OC_Hook::emit('OC_User', 'logout', array());
405 405
 			});
406
-			$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) use ($dispatcher) {
406
+			$userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) use ($dispatcher) {
407 407
 				/** @var $user \OC\User\User */
408 408
 				\OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue));
409 409
 				$dispatcher->dispatch('OCP\IUser::changeUser', new GenericEvent($user, ['feature' => $feature, 'oldValue' => $oldValue, 'value' => $value]));
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 		});
413 413
 		$this->registerAlias('UserSession', \OCP\IUserSession::class);
414 414
 
415
-		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function (Server $c) {
415
+		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function(Server $c) {
416 416
 			return new \OC\Authentication\TwoFactorAuth\Manager(
417 417
 				$c->getAppManager(),
418 418
 				$c->getSession(),
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 		$this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class);
429 429
 		$this->registerAlias('NavigationManager', \OCP\INavigationManager::class);
430 430
 
431
-		$this->registerService(\OC\AllConfig::class, function (Server $c) {
431
+		$this->registerService(\OC\AllConfig::class, function(Server $c) {
432 432
 			return new \OC\AllConfig(
433 433
 				$c->getSystemConfig()
434 434
 			);
@@ -436,17 +436,17 @@  discard block
 block discarded – undo
436 436
 		$this->registerAlias('AllConfig', \OC\AllConfig::class);
437 437
 		$this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class);
438 438
 
439
-		$this->registerService('SystemConfig', function ($c) use ($config) {
439
+		$this->registerService('SystemConfig', function($c) use ($config) {
440 440
 			return new \OC\SystemConfig($config);
441 441
 		});
442 442
 
443
-		$this->registerService(\OC\AppConfig::class, function (Server $c) {
443
+		$this->registerService(\OC\AppConfig::class, function(Server $c) {
444 444
 			return new \OC\AppConfig($c->getDatabaseConnection());
445 445
 		});
446 446
 		$this->registerAlias('AppConfig', \OC\AppConfig::class);
447 447
 		$this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class);
448 448
 
449
-		$this->registerService(\OCP\L10N\IFactory::class, function (Server $c) {
449
+		$this->registerService(\OCP\L10N\IFactory::class, function(Server $c) {
450 450
 			return new \OC\L10N\Factory(
451 451
 				$c->getConfig(),
452 452
 				$c->getRequest(),
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
 		});
457 457
 		$this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class);
458 458
 
459
-		$this->registerService(\OCP\IURLGenerator::class, function (Server $c) {
459
+		$this->registerService(\OCP\IURLGenerator::class, function(Server $c) {
460 460
 			$config = $c->getConfig();
461 461
 			$cacheFactory = $c->getMemCacheFactory();
462 462
 			$request = $c->getRequest();
@@ -471,12 +471,12 @@  discard block
 block discarded – undo
471 471
 		$this->registerAlias('AppFetcher', AppFetcher::class);
472 472
 		$this->registerAlias('CategoryFetcher', CategoryFetcher::class);
473 473
 
474
-		$this->registerService(\OCP\ICache::class, function ($c) {
474
+		$this->registerService(\OCP\ICache::class, function($c) {
475 475
 			return new Cache\File();
476 476
 		});
477 477
 		$this->registerAlias('UserCache', \OCP\ICache::class);
478 478
 
479
-		$this->registerService(Factory::class, function (Server $c) {
479
+		$this->registerService(Factory::class, function(Server $c) {
480 480
 
481 481
 			$arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(),
482 482
 				ArrayCache::class,
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 				$version = implode(',', $v);
494 494
 				$instanceId = \OC_Util::getInstanceId();
495 495
 				$path = \OC::$SERVERROOT;
496
-				$prefix = md5($instanceId . '-' . $version . '-' . $path);
496
+				$prefix = md5($instanceId.'-'.$version.'-'.$path);
497 497
 				return new \OC\Memcache\Factory($prefix, $c->getLogger(),
498 498
 					$config->getSystemValue('memcache.local', null),
499 499
 					$config->getSystemValue('memcache.distributed', null),
@@ -506,12 +506,12 @@  discard block
 block discarded – undo
506 506
 		$this->registerAlias('MemCacheFactory', Factory::class);
507 507
 		$this->registerAlias(ICacheFactory::class, Factory::class);
508 508
 
509
-		$this->registerService('RedisFactory', function (Server $c) {
509
+		$this->registerService('RedisFactory', function(Server $c) {
510 510
 			$systemConfig = $c->getSystemConfig();
511 511
 			return new RedisFactory($systemConfig);
512 512
 		});
513 513
 
514
-		$this->registerService(\OCP\Activity\IManager::class, function (Server $c) {
514
+		$this->registerService(\OCP\Activity\IManager::class, function(Server $c) {
515 515
 			return new \OC\Activity\Manager(
516 516
 				$c->getRequest(),
517 517
 				$c->getUserSession(),
@@ -521,14 +521,14 @@  discard block
 block discarded – undo
521 521
 		});
522 522
 		$this->registerAlias('ActivityManager', \OCP\Activity\IManager::class);
523 523
 
524
-		$this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) {
524
+		$this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) {
525 525
 			return new \OC\Activity\EventMerger(
526 526
 				$c->getL10N('lib')
527 527
 			);
528 528
 		});
529 529
 		$this->registerAlias(IValidator::class, Validator::class);
530 530
 
531
-		$this->registerService(\OCP\IAvatarManager::class, function (Server $c) {
531
+		$this->registerService(\OCP\IAvatarManager::class, function(Server $c) {
532 532
 			return new AvatarManager(
533 533
 				$c->query(\OC\User\Manager::class),
534 534
 				$c->getAppDataDir('avatar'),
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
 
542 542
 		$this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class);
543 543
 
544
-		$this->registerService(\OCP\ILogger::class, function (Server $c) {
544
+		$this->registerService(\OCP\ILogger::class, function(Server $c) {
545 545
 			$logType = $c->query('AllConfig')->getSystemValue('log_type', 'file');
546 546
 			$factory = new LogFactory($c, $this->getSystemConfig());
547 547
 			$logger = $factory->get($logType);
@@ -551,11 +551,11 @@  discard block
 block discarded – undo
551 551
 		});
552 552
 		$this->registerAlias('Logger', \OCP\ILogger::class);
553 553
 
554
-		$this->registerService(ILogFactory::class, function (Server $c) {
554
+		$this->registerService(ILogFactory::class, function(Server $c) {
555 555
 			return new LogFactory($c, $this->getSystemConfig());
556 556
 		});
557 557
 
558
-		$this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) {
558
+		$this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) {
559 559
 			$config = $c->getConfig();
560 560
 			return new \OC\BackgroundJob\JobList(
561 561
 				$c->getDatabaseConnection(),
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
 		});
566 566
 		$this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class);
567 567
 
568
-		$this->registerService(\OCP\Route\IRouter::class, function (Server $c) {
568
+		$this->registerService(\OCP\Route\IRouter::class, function(Server $c) {
569 569
 			$cacheFactory = $c->getMemCacheFactory();
570 570
 			$logger = $c->getLogger();
571 571
 			if ($cacheFactory->isLocalCacheAvailable()) {
@@ -577,12 +577,12 @@  discard block
 block discarded – undo
577 577
 		});
578 578
 		$this->registerAlias('Router', \OCP\Route\IRouter::class);
579 579
 
580
-		$this->registerService(\OCP\ISearch::class, function ($c) {
580
+		$this->registerService(\OCP\ISearch::class, function($c) {
581 581
 			return new Search();
582 582
 		});
583 583
 		$this->registerAlias('Search', \OCP\ISearch::class);
584 584
 
585
-		$this->registerService(\OC\Security\RateLimiting\Limiter::class, function (Server $c) {
585
+		$this->registerService(\OC\Security\RateLimiting\Limiter::class, function(Server $c) {
586 586
 			return new \OC\Security\RateLimiting\Limiter(
587 587
 				$this->getUserSession(),
588 588
 				$this->getRequest(),
@@ -590,34 +590,34 @@  discard block
 block discarded – undo
590 590
 				$c->query(\OC\Security\RateLimiting\Backend\IBackend::class)
591 591
 			);
592 592
 		});
593
-		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) {
593
+		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) {
594 594
 			return new \OC\Security\RateLimiting\Backend\MemoryCache(
595 595
 				$this->getMemCacheFactory(),
596 596
 				new \OC\AppFramework\Utility\TimeFactory()
597 597
 			);
598 598
 		});
599 599
 
600
-		$this->registerService(\OCP\Security\ISecureRandom::class, function ($c) {
600
+		$this->registerService(\OCP\Security\ISecureRandom::class, function($c) {
601 601
 			return new SecureRandom();
602 602
 		});
603 603
 		$this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class);
604 604
 
605
-		$this->registerService(\OCP\Security\ICrypto::class, function (Server $c) {
605
+		$this->registerService(\OCP\Security\ICrypto::class, function(Server $c) {
606 606
 			return new Crypto($c->getConfig(), $c->getSecureRandom());
607 607
 		});
608 608
 		$this->registerAlias('Crypto', \OCP\Security\ICrypto::class);
609 609
 
610
-		$this->registerService(\OCP\Security\IHasher::class, function (Server $c) {
610
+		$this->registerService(\OCP\Security\IHasher::class, function(Server $c) {
611 611
 			return new Hasher($c->getConfig());
612 612
 		});
613 613
 		$this->registerAlias('Hasher', \OCP\Security\IHasher::class);
614 614
 
615
-		$this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) {
615
+		$this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) {
616 616
 			return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection());
617 617
 		});
618 618
 		$this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class);
619 619
 
620
-		$this->registerService(IDBConnection::class, function (Server $c) {
620
+		$this->registerService(IDBConnection::class, function(Server $c) {
621 621
 			$systemConfig = $c->getSystemConfig();
622 622
 			$factory = new \OC\DB\ConnectionFactory($systemConfig);
623 623
 			$type = $systemConfig->getValue('dbtype', 'sqlite');
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
 		$this->registerAlias('DatabaseConnection', IDBConnection::class);
633 633
 
634 634
 
635
-		$this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) {
635
+		$this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) {
636 636
 			$user = \OC_User::getUser();
637 637
 			$uid = $user ? $user : null;
638 638
 			return new ClientService(
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
 			);
648 648
 		});
649 649
 		$this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class);
650
-		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) {
650
+		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) {
651 651
 			$eventLogger = new EventLogger();
652 652
 			if ($c->getSystemConfig()->getValue('debug', false)) {
653 653
 				// In debug mode, module is being activated by default
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
 		});
658 658
 		$this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class);
659 659
 
660
-		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) {
660
+		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) {
661 661
 			$queryLogger = new QueryLogger();
662 662
 			if ($c->getSystemConfig()->getValue('debug', false)) {
663 663
 				// In debug mode, module is being activated by default
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 		});
668 668
 		$this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class);
669 669
 
670
-		$this->registerService(TempManager::class, function (Server $c) {
670
+		$this->registerService(TempManager::class, function(Server $c) {
671 671
 			return new TempManager(
672 672
 				$c->getLogger(),
673 673
 				$c->getConfig()
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
 		$this->registerAlias('TempManager', TempManager::class);
677 677
 		$this->registerAlias(ITempManager::class, TempManager::class);
678 678
 
679
-		$this->registerService(AppManager::class, function (Server $c) {
679
+		$this->registerService(AppManager::class, function(Server $c) {
680 680
 			return new \OC\App\AppManager(
681 681
 				$c->getUserSession(),
682 682
 				$c->query(\OC\AppConfig::class),
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
 		$this->registerAlias('AppManager', AppManager::class);
689 689
 		$this->registerAlias(IAppManager::class, AppManager::class);
690 690
 
691
-		$this->registerService(\OCP\IDateTimeZone::class, function (Server $c) {
691
+		$this->registerService(\OCP\IDateTimeZone::class, function(Server $c) {
692 692
 			return new DateTimeZone(
693 693
 				$c->getConfig(),
694 694
 				$c->getSession()
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
 		});
697 697
 		$this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class);
698 698
 
699
-		$this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) {
699
+		$this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) {
700 700
 			$language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null);
701 701
 
702 702
 			return new DateTimeFormatter(
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
 		});
707 707
 		$this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class);
708 708
 
709
-		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) {
709
+		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) {
710 710
 			$mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger());
711 711
 			$listener = new UserMountCacheListener($mountCache);
712 712
 			$listener->listen($c->getUserManager());
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
 		});
715 715
 		$this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class);
716 716
 
717
-		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) {
717
+		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) {
718 718
 			$loader = \OC\Files\Filesystem::getLoader();
719 719
 			$mountCache = $c->query('UserMountCache');
720 720
 			$manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache);
@@ -730,10 +730,10 @@  discard block
 block discarded – undo
730 730
 		});
731 731
 		$this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class);
732 732
 
733
-		$this->registerService('IniWrapper', function ($c) {
733
+		$this->registerService('IniWrapper', function($c) {
734 734
 			return new IniGetWrapper();
735 735
 		});
736
-		$this->registerService('AsyncCommandBus', function (Server $c) {
736
+		$this->registerService('AsyncCommandBus', function(Server $c) {
737 737
 			$busClass = $c->getConfig()->getSystemValue('commandbus');
738 738
 			if ($busClass) {
739 739
 				list($app, $class) = explode('::', $busClass, 2);
@@ -748,10 +748,10 @@  discard block
 block discarded – undo
748 748
 				return new CronBus($jobList);
749 749
 			}
750 750
 		});
751
-		$this->registerService('TrustedDomainHelper', function ($c) {
751
+		$this->registerService('TrustedDomainHelper', function($c) {
752 752
 			return new TrustedDomainHelper($this->getConfig());
753 753
 		});
754
-		$this->registerService('Throttler', function (Server $c) {
754
+		$this->registerService('Throttler', function(Server $c) {
755 755
 			return new Throttler(
756 756
 				$c->getDatabaseConnection(),
757 757
 				new TimeFactory(),
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
 				$c->getConfig()
760 760
 			);
761 761
 		});
762
-		$this->registerService('IntegrityCodeChecker', function (Server $c) {
762
+		$this->registerService('IntegrityCodeChecker', function(Server $c) {
763 763
 			// IConfig and IAppManager requires a working database. This code
764 764
 			// might however be called when ownCloud is not yet setup.
765 765
 			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
 				$c->getTempManager()
781 781
 			);
782 782
 		});
783
-		$this->registerService(\OCP\IRequest::class, function ($c) {
783
+		$this->registerService(\OCP\IRequest::class, function($c) {
784 784
 			if (isset($this['urlParams'])) {
785 785
 				$urlParams = $this['urlParams'];
786 786
 			} else {
@@ -816,7 +816,7 @@  discard block
 block discarded – undo
816 816
 		});
817 817
 		$this->registerAlias('Request', \OCP\IRequest::class);
818 818
 
819
-		$this->registerService(\OCP\Mail\IMailer::class, function (Server $c) {
819
+		$this->registerService(\OCP\Mail\IMailer::class, function(Server $c) {
820 820
 			return new Mailer(
821 821
 				$c->getConfig(),
822 822
 				$c->getLogger(),
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
 		});
828 828
 		$this->registerAlias('Mailer', \OCP\Mail\IMailer::class);
829 829
 
830
-		$this->registerService('LDAPProvider', function (Server $c) {
830
+		$this->registerService('LDAPProvider', function(Server $c) {
831 831
 			$config = $c->getConfig();
832 832
 			$factoryClass = $config->getSystemValue('ldapProviderFactory', null);
833 833
 			if (is_null($factoryClass)) {
@@ -837,7 +837,7 @@  discard block
 block discarded – undo
837 837
 			$factory = new $factoryClass($this);
838 838
 			return $factory->getLDAPProvider();
839 839
 		});
840
-		$this->registerService(ILockingProvider::class, function (Server $c) {
840
+		$this->registerService(ILockingProvider::class, function(Server $c) {
841 841
 			$ini = $c->getIniWrapper();
842 842
 			$config = $c->getConfig();
843 843
 			$ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time')));
@@ -860,49 +860,49 @@  discard block
 block discarded – undo
860 860
 		});
861 861
 		$this->registerAlias('LockingProvider', ILockingProvider::class);
862 862
 
863
-		$this->registerService(\OCP\Files\Mount\IMountManager::class, function () {
863
+		$this->registerService(\OCP\Files\Mount\IMountManager::class, function() {
864 864
 			return new \OC\Files\Mount\Manager();
865 865
 		});
866 866
 		$this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class);
867 867
 
868
-		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) {
868
+		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) {
869 869
 			return new \OC\Files\Type\Detection(
870 870
 				$c->getURLGenerator(),
871 871
 				\OC::$configDir,
872
-				\OC::$SERVERROOT . '/resources/config/'
872
+				\OC::$SERVERROOT.'/resources/config/'
873 873
 			);
874 874
 		});
875 875
 		$this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class);
876 876
 
877
-		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) {
877
+		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) {
878 878
 			return new \OC\Files\Type\Loader(
879 879
 				$c->getDatabaseConnection()
880 880
 			);
881 881
 		});
882 882
 		$this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class);
883
-		$this->registerService(BundleFetcher::class, function () {
883
+		$this->registerService(BundleFetcher::class, function() {
884 884
 			return new BundleFetcher($this->getL10N('lib'));
885 885
 		});
886
-		$this->registerService(\OCP\Notification\IManager::class, function (Server $c) {
886
+		$this->registerService(\OCP\Notification\IManager::class, function(Server $c) {
887 887
 			return new Manager(
888 888
 				$c->query(IValidator::class)
889 889
 			);
890 890
 		});
891 891
 		$this->registerAlias('NotificationManager', \OCP\Notification\IManager::class);
892 892
 
893
-		$this->registerService(\OC\CapabilitiesManager::class, function (Server $c) {
893
+		$this->registerService(\OC\CapabilitiesManager::class, function(Server $c) {
894 894
 			$manager = new \OC\CapabilitiesManager($c->getLogger());
895
-			$manager->registerCapability(function () use ($c) {
895
+			$manager->registerCapability(function() use ($c) {
896 896
 				return new \OC\OCS\CoreCapabilities($c->getConfig());
897 897
 			});
898
-			$manager->registerCapability(function () use ($c) {
898
+			$manager->registerCapability(function() use ($c) {
899 899
 				return $c->query(\OC\Security\Bruteforce\Capabilities::class);
900 900
 			});
901 901
 			return $manager;
902 902
 		});
903 903
 		$this->registerAlias('CapabilitiesManager', \OC\CapabilitiesManager::class);
904 904
 
905
-		$this->registerService(\OCP\Comments\ICommentsManager::class, function (Server $c) {
905
+		$this->registerService(\OCP\Comments\ICommentsManager::class, function(Server $c) {
906 906
 			$config = $c->getConfig();
907 907
 			$factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class);
908 908
 			/** @var \OCP\Comments\ICommentsManagerFactory $factory */
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
 			$manager->registerDisplayNameResolver('user', function($id) use ($c) {
913 913
 				$manager = $c->getUserManager();
914 914
 				$user = $manager->get($id);
915
-				if(is_null($user)) {
915
+				if (is_null($user)) {
916 916
 					$l = $c->getL10N('core');
917 917
 					$displayName = $l->t('Unknown user');
918 918
 				} else {
@@ -925,7 +925,7 @@  discard block
 block discarded – undo
925 925
 		});
926 926
 		$this->registerAlias('CommentsManager', \OCP\Comments\ICommentsManager::class);
927 927
 
928
-		$this->registerService('ThemingDefaults', function (Server $c) {
928
+		$this->registerService('ThemingDefaults', function(Server $c) {
929 929
 			/*
930 930
 			 * Dark magic for autoloader.
931 931
 			 * If we do a class_exists it will try to load the class which will
@@ -952,7 +952,7 @@  discard block
 block discarded – undo
952 952
 			}
953 953
 			return new \OC_Defaults();
954 954
 		});
955
-		$this->registerService(SCSSCacher::class, function (Server $c) {
955
+		$this->registerService(SCSSCacher::class, function(Server $c) {
956 956
 			/** @var Factory $cacheFactory */
957 957
 			$cacheFactory = $c->query(Factory::class);
958 958
 			return new SCSSCacher(
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
 				$this->getMemCacheFactory()
966 966
 			);
967 967
 		});
968
-		$this->registerService(JSCombiner::class, function (Server $c) {
968
+		$this->registerService(JSCombiner::class, function(Server $c) {
969 969
 			/** @var Factory $cacheFactory */
970 970
 			$cacheFactory = $c->query(Factory::class);
971 971
 			return new JSCombiner(
@@ -976,13 +976,13 @@  discard block
 block discarded – undo
976 976
 				$c->getLogger()
977 977
 			);
978 978
 		});
979
-		$this->registerService(EventDispatcher::class, function () {
979
+		$this->registerService(EventDispatcher::class, function() {
980 980
 			return new EventDispatcher();
981 981
 		});
982 982
 		$this->registerAlias('EventDispatcher', EventDispatcher::class);
983 983
 		$this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class);
984 984
 
985
-		$this->registerService('CryptoWrapper', function (Server $c) {
985
+		$this->registerService('CryptoWrapper', function(Server $c) {
986 986
 			// FIXME: Instantiiated here due to cyclic dependency
987 987
 			$request = new Request(
988 988
 				[
@@ -1007,7 +1007,7 @@  discard block
 block discarded – undo
1007 1007
 				$request
1008 1008
 			);
1009 1009
 		});
1010
-		$this->registerService('CsrfTokenManager', function (Server $c) {
1010
+		$this->registerService('CsrfTokenManager', function(Server $c) {
1011 1011
 			$tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom());
1012 1012
 
1013 1013
 			return new CsrfTokenManager(
@@ -1015,22 +1015,22 @@  discard block
 block discarded – undo
1015 1015
 				$c->query(SessionStorage::class)
1016 1016
 			);
1017 1017
 		});
1018
-		$this->registerService(SessionStorage::class, function (Server $c) {
1018
+		$this->registerService(SessionStorage::class, function(Server $c) {
1019 1019
 			return new SessionStorage($c->getSession());
1020 1020
 		});
1021
-		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) {
1021
+		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) {
1022 1022
 			return new ContentSecurityPolicyManager();
1023 1023
 		});
1024 1024
 		$this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class);
1025 1025
 
1026
-		$this->registerService('ContentSecurityPolicyNonceManager', function (Server $c) {
1026
+		$this->registerService('ContentSecurityPolicyNonceManager', function(Server $c) {
1027 1027
 			return new ContentSecurityPolicyNonceManager(
1028 1028
 				$c->getCsrfTokenManager(),
1029 1029
 				$c->getRequest()
1030 1030
 			);
1031 1031
 		});
1032 1032
 
1033
-		$this->registerService(\OCP\Share\IManager::class, function (Server $c) {
1033
+		$this->registerService(\OCP\Share\IManager::class, function(Server $c) {
1034 1034
 			$config = $c->getConfig();
1035 1035
 			$factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class);
1036 1036
 			/** @var \OCP\Share\IProviderFactory $factory */
@@ -1073,7 +1073,7 @@  discard block
 block discarded – undo
1073 1073
 
1074 1074
 		$this->registerAlias(\OCP\Collaboration\AutoComplete\IManager::class, \OC\Collaboration\AutoComplete\Manager::class);
1075 1075
 
1076
-		$this->registerService('SettingsManager', function (Server $c) {
1076
+		$this->registerService('SettingsManager', function(Server $c) {
1077 1077
 			$manager = new \OC\Settings\Manager(
1078 1078
 				$c->getLogger(),
1079 1079
 				$c->getDatabaseConnection(),
@@ -1091,24 +1091,24 @@  discard block
 block discarded – undo
1091 1091
 			);
1092 1092
 			return $manager;
1093 1093
 		});
1094
-		$this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) {
1094
+		$this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) {
1095 1095
 			return new \OC\Files\AppData\Factory(
1096 1096
 				$c->getRootFolder(),
1097 1097
 				$c->getSystemConfig()
1098 1098
 			);
1099 1099
 		});
1100 1100
 
1101
-		$this->registerService('LockdownManager', function (Server $c) {
1102
-			return new LockdownManager(function () use ($c) {
1101
+		$this->registerService('LockdownManager', function(Server $c) {
1102
+			return new LockdownManager(function() use ($c) {
1103 1103
 				return $c->getSession();
1104 1104
 			});
1105 1105
 		});
1106 1106
 
1107
-		$this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) {
1107
+		$this->registerService(\OCP\OCS\IDiscoveryService::class, function(Server $c) {
1108 1108
 			return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService());
1109 1109
 		});
1110 1110
 
1111
-		$this->registerService(ICloudIdManager::class, function (Server $c) {
1111
+		$this->registerService(ICloudIdManager::class, function(Server $c) {
1112 1112
 			return new CloudIdManager();
1113 1113
 		});
1114 1114
 
@@ -1118,18 +1118,18 @@  discard block
 block discarded – undo
1118 1118
 		$this->registerAlias(\OCP\AppFramework\Utility\ITimeFactory::class, \OC\AppFramework\Utility\TimeFactory::class);
1119 1119
 		$this->registerAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class);
1120 1120
 
1121
-		$this->registerService(Defaults::class, function (Server $c) {
1121
+		$this->registerService(Defaults::class, function(Server $c) {
1122 1122
 			return new Defaults(
1123 1123
 				$c->getThemingDefaults()
1124 1124
 			);
1125 1125
 		});
1126 1126
 		$this->registerAlias('Defaults', \OCP\Defaults::class);
1127 1127
 
1128
-		$this->registerService(\OCP\ISession::class, function (SimpleContainer $c) {
1128
+		$this->registerService(\OCP\ISession::class, function(SimpleContainer $c) {
1129 1129
 			return $c->query(\OCP\IUserSession::class)->getSession();
1130 1130
 		});
1131 1131
 
1132
-		$this->registerService(IShareHelper::class, function (Server $c) {
1132
+		$this->registerService(IShareHelper::class, function(Server $c) {
1133 1133
 			return new ShareHelper(
1134 1134
 				$c->query(\OCP\Share\IManager::class)
1135 1135
 			);
@@ -1191,11 +1191,11 @@  discard block
 block discarded – undo
1191 1191
 				// no avatar to remove
1192 1192
 			} catch (\Exception $e) {
1193 1193
 				// Ignore exceptions
1194
-				$logger->info('Could not cleanup avatar of ' . $user->getUID());
1194
+				$logger->info('Could not cleanup avatar of '.$user->getUID());
1195 1195
 			}
1196 1196
 		});
1197 1197
 
1198
-		$dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) {
1198
+		$dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) {
1199 1199
 			$manager = $this->getAvatarManager();
1200 1200
 			/** @var IUser $user */
1201 1201
 			$user = $e->getSubject();
@@ -1346,7 +1346,7 @@  discard block
 block discarded – undo
1346 1346
 	 * @deprecated since 9.2.0 use IAppData
1347 1347
 	 */
1348 1348
 	public function getAppFolder() {
1349
-		$dir = '/' . \OC_App::getCurrentApp();
1349
+		$dir = '/'.\OC_App::getCurrentApp();
1350 1350
 		$root = $this->getRootFolder();
1351 1351
 		if (!$root->nodeExists($dir)) {
1352 1352
 			$folder = $root->newFolder($dir);
@@ -1921,7 +1921,7 @@  discard block
 block discarded – undo
1921 1921
 	/**
1922 1922
 	 * @return \OCP\Collaboration\AutoComplete\IManager
1923 1923
 	 */
1924
-	public function getAutoCompleteManager(){
1924
+	public function getAutoCompleteManager() {
1925 1925
 		return $this->query(IManager::class);
1926 1926
 	}
1927 1927
 
Please login to merge, or discard this patch.
lib/private/Authentication/Token/PublicKeyTokenMapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
 		$data = $result->fetchAll();
130 130
 		$result->closeCursor();
131 131
 
132
-		$entities = array_map(function ($row) {
132
+		$entities = array_map(function($row) {
133 133
 			return PublicKeyToken::fromRow($row);
134 134
 		}, $data);
135 135
 
Please login to merge, or discard this patch.
lib/private/Authentication/Token/PublicKeyTokenProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -138,10 +138,10 @@  discard block
 block discarded – undo
138 138
 
139 139
 	public function invalidateOldTokens() {
140 140
 		$olderThan = $this->time->getTime() - (int) $this->config->getSystemValue('session_lifetime', 60 * 60 * 24);
141
-		$this->logger->debug('Invalidating session tokens older than ' . date('c', $olderThan), ['app' => 'cron']);
141
+		$this->logger->debug('Invalidating session tokens older than '.date('c', $olderThan), ['app' => 'cron']);
142 142
 		$this->mapper->invalidateOld($olderThan, IToken::DO_NOT_REMEMBER);
143 143
 		$rememberThreshold = $this->time->getTime() - (int) $this->config->getSystemValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15);
144
-		$this->logger->debug('Invalidating remembered session tokens older than ' . date('c', $rememberThreshold), ['app' => 'cron']);
144
+		$this->logger->debug('Invalidating remembered session tokens older than '.date('c', $rememberThreshold), ['app' => 'cron']);
145 145
 		$this->mapper->invalidateOld($rememberThreshold, IToken::REMEMBER);
146 146
 	}
147 147
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 
221 221
 	private function encrypt(string $plaintext, string $token): string {
222 222
 		$secret = $this->config->getSystemValue('secret');
223
-		return $this->crypto->encrypt($plaintext, $token . $secret);
223
+		return $this->crypto->encrypt($plaintext, $token.$secret);
224 224
 	}
225 225
 
226 226
 	/**
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	private function decrypt(string $cipherText, string $token): string {
230 230
 		$secret = $this->config->getSystemValue('secret');
231 231
 		try {
232
-			return $this->crypto->decrypt($cipherText, $token . $secret);
232
+			return $this->crypto->decrypt($cipherText, $token.$secret);
233 233
 		} catch (\Exception $ex) {
234 234
 			// Delete the invalid token
235 235
 			$this->invalidateToken($token);
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 
254 254
 	private function hashToken(string $token): string {
255 255
 		$secret = $this->config->getSystemValue('secret');
256
-		return hash('sha512', $token . $secret);
256
+		return hash('sha512', $token.$secret);
257 257
 	}
258 258
 
259 259
 	/**
Please login to merge, or discard this patch.
lib/private/Authentication/Token/PublicKeyToken.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
184 184
 		if (is_array($scope)) {
185 185
 			parent::setScope(json_encode($scope));
186 186
 		} else {
187
-			parent::setScope((string)$scope);
187
+			parent::setScope((string) $scope);
188 188
 		}
189 189
 	}
190 190
 
Please login to merge, or discard this patch.
lib/private/Authentication/Token/DefaultTokenProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 			throw new InvalidTokenException();
163 163
 		}
164 164
 
165
-		if ((int)$token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) {
165
+		if ((int) $token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) {
166 166
 			throw new ExpiredTokenException($token);
167 167
 		}
168 168
 
@@ -265,10 +265,10 @@  discard block
 block discarded – undo
265 265
 	 */
266 266
 	public function invalidateOldTokens() {
267 267
 		$olderThan = $this->time->getTime() - (int) $this->config->getSystemValue('session_lifetime', 60 * 60 * 24);
268
-		$this->logger->debug('Invalidating session tokens older than ' . date('c', $olderThan), ['app' => 'cron']);
268
+		$this->logger->debug('Invalidating session tokens older than '.date('c', $olderThan), ['app' => 'cron']);
269 269
 		$this->mapper->invalidateOld($olderThan, IToken::DO_NOT_REMEMBER);
270 270
 		$rememberThreshold = $this->time->getTime() - (int) $this->config->getSystemValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15);
271
-		$this->logger->debug('Invalidating remembered session tokens older than ' . date('c', $rememberThreshold), ['app' => 'cron']);
271
+		$this->logger->debug('Invalidating remembered session tokens older than '.date('c', $rememberThreshold), ['app' => 'cron']);
272 272
 		$this->mapper->invalidateOld($rememberThreshold, IToken::REMEMBER);
273 273
 	}
274 274
 
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 	 */
301 301
 	private function hashToken(string $token): string {
302 302
 		$secret = $this->config->getSystemValue('secret');
303
-		return hash('sha512', $token . $secret);
303
+		return hash('sha512', $token.$secret);
304 304
 	}
305 305
 
306 306
 	/**
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 	 */
315 315
 	private function encryptPassword(string $password, string $token): string {
316 316
 		$secret = $this->config->getSystemValue('secret');
317
-		return $this->crypto->encrypt($password, $token . $secret);
317
+		return $this->crypto->encrypt($password, $token.$secret);
318 318
 	}
319 319
 
320 320
 	/**
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 	private function decryptPassword(string $password, string $token): string {
331 331
 		$secret = $this->config->getSystemValue('secret');
332 332
 		try {
333
-			return $this->crypto->decrypt($password, $token . $secret);
333
+			return $this->crypto->decrypt($password, $token.$secret);
334 334
 		} catch (Exception $ex) {
335 335
 			// Delete the invalid token
336 336
 			$this->invalidateToken($token);
Please login to merge, or discard this patch.