Completed
Pull Request — master (#9658)
by Christoph
32:35
created
lib/private/Server.php 1 patch
Spacing   +115 added lines, -115 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 		// To find out if we are running from CLI or not
167 167
 		$this->registerParameter('isCLI', \OC::$CLI);
168 168
 
169
-		$this->registerService(\OCP\IServerContainer::class, function (IServerContainer $c) {
169
+		$this->registerService(\OCP\IServerContainer::class, function(IServerContainer $c) {
170 170
 			return $c;
171 171
 		});
172 172
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 		$this->registerAlias(IActionFactory::class, ActionFactory::class);
180 180
 
181 181
 
182
-		$this->registerService(\OCP\IPreview::class, function (Server $c) {
182
+		$this->registerService(\OCP\IPreview::class, function(Server $c) {
183 183
 			return new PreviewManager(
184 184
 				$c->getConfig(),
185 185
 				$c->getRootFolder(),
@@ -190,13 +190,13 @@  discard block
 block discarded – undo
190 190
 		});
191 191
 		$this->registerAlias('PreviewManager', \OCP\IPreview::class);
192 192
 
193
-		$this->registerService(\OC\Preview\Watcher::class, function (Server $c) {
193
+		$this->registerService(\OC\Preview\Watcher::class, function(Server $c) {
194 194
 			return new \OC\Preview\Watcher(
195 195
 				$c->getAppDataDir('preview')
196 196
 			);
197 197
 		});
198 198
 
199
-		$this->registerService('EncryptionManager', function (Server $c) {
199
+		$this->registerService('EncryptionManager', function(Server $c) {
200 200
 			$view = new View();
201 201
 			$util = new Encryption\Util(
202 202
 				$view,
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 			);
215 215
 		});
216 216
 
217
-		$this->registerService('EncryptionFileHelper', function (Server $c) {
217
+		$this->registerService('EncryptionFileHelper', function(Server $c) {
218 218
 			$util = new Encryption\Util(
219 219
 				new View(),
220 220
 				$c->getUserManager(),
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 			);
229 229
 		});
230 230
 
231
-		$this->registerService('EncryptionKeyStorage', function (Server $c) {
231
+		$this->registerService('EncryptionKeyStorage', function(Server $c) {
232 232
 			$view = new View();
233 233
 			$util = new Encryption\Util(
234 234
 				$view,
@@ -239,30 +239,30 @@  discard block
 block discarded – undo
239 239
 
240 240
 			return new Encryption\Keys\Storage($view, $util);
241 241
 		});
242
-		$this->registerService('TagMapper', function (Server $c) {
242
+		$this->registerService('TagMapper', function(Server $c) {
243 243
 			return new TagMapper($c->getDatabaseConnection());
244 244
 		});
245 245
 
246
-		$this->registerService(\OCP\ITagManager::class, function (Server $c) {
246
+		$this->registerService(\OCP\ITagManager::class, function(Server $c) {
247 247
 			$tagMapper = $c->query('TagMapper');
248 248
 			return new TagManager($tagMapper, $c->getUserSession());
249 249
 		});
250 250
 		$this->registerAlias('TagManager', \OCP\ITagManager::class);
251 251
 
252
-		$this->registerService('SystemTagManagerFactory', function (Server $c) {
252
+		$this->registerService('SystemTagManagerFactory', function(Server $c) {
253 253
 			$config = $c->getConfig();
254 254
 			$factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class);
255 255
 			return new $factoryClass($this);
256 256
 		});
257
-		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) {
257
+		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) {
258 258
 			return $c->query('SystemTagManagerFactory')->getManager();
259 259
 		});
260 260
 		$this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class);
261 261
 
262
-		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) {
262
+		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) {
263 263
 			return $c->query('SystemTagManagerFactory')->getObjectMapper();
264 264
 		});
265
-		$this->registerService('RootFolder', function (Server $c) {
265
+		$this->registerService('RootFolder', function(Server $c) {
266 266
 			$manager = \OC\Files\Filesystem::getMountManager(null);
267 267
 			$view = new View();
268 268
 			$root = new Root(
@@ -283,38 +283,38 @@  discard block
 block discarded – undo
283 283
 		});
284 284
 		$this->registerAlias('SystemTagObjectMapper', \OCP\SystemTag\ISystemTagObjectMapper::class);
285 285
 
286
-		$this->registerService(\OCP\Files\IRootFolder::class, function (Server $c) {
287
-			return new LazyRoot(function () use ($c) {
286
+		$this->registerService(\OCP\Files\IRootFolder::class, function(Server $c) {
287
+			return new LazyRoot(function() use ($c) {
288 288
 				return $c->query('RootFolder');
289 289
 			});
290 290
 		});
291 291
 		$this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class);
292 292
 
293
-		$this->registerService(\OC\User\Manager::class, function (Server $c) {
293
+		$this->registerService(\OC\User\Manager::class, function(Server $c) {
294 294
 			$config = $c->getConfig();
295 295
 			return new \OC\User\Manager($config);
296 296
 		});
297 297
 		$this->registerAlias('UserManager', \OC\User\Manager::class);
298 298
 		$this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class);
299 299
 
300
-		$this->registerService(\OCP\IGroupManager::class, function (Server $c) {
300
+		$this->registerService(\OCP\IGroupManager::class, function(Server $c) {
301 301
 			$groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger());
302
-			$groupManager->listen('\OC\Group', 'preCreate', function ($gid) {
302
+			$groupManager->listen('\OC\Group', 'preCreate', function($gid) {
303 303
 				\OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid));
304 304
 			});
305
-			$groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) {
305
+			$groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) {
306 306
 				\OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID()));
307 307
 			});
308
-			$groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) {
308
+			$groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) {
309 309
 				\OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID()));
310 310
 			});
311
-			$groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) {
311
+			$groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) {
312 312
 				\OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID()));
313 313
 			});
314
-			$groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
314
+			$groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
315 315
 				\OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID()));
316 316
 			});
317
-			$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
317
+			$groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
318 318
 				\OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
319 319
 				//Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks
320 320
 				\OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 		});
324 324
 		$this->registerAlias('GroupManager', \OCP\IGroupManager::class);
325 325
 
326
-		$this->registerService(Store::class, function (Server $c) {
326
+		$this->registerService(Store::class, function(Server $c) {
327 327
 			$session = $c->getSession();
328 328
 			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
329 329
 				$tokenProvider = $c->query(IProvider::class);
@@ -334,11 +334,11 @@  discard block
 block discarded – undo
334 334
 			return new Store($session, $logger, $tokenProvider);
335 335
 		});
336 336
 		$this->registerAlias(IStore::class, Store::class);
337
-		$this->registerService(Authentication\Token\DefaultTokenMapper::class, function (Server $c) {
337
+		$this->registerService(Authentication\Token\DefaultTokenMapper::class, function(Server $c) {
338 338
 			$dbConnection = $c->getDatabaseConnection();
339 339
 			return new Authentication\Token\DefaultTokenMapper($dbConnection);
340 340
 		});
341
-		$this->registerService(Authentication\Token\DefaultTokenProvider::class, function (Server $c) {
341
+		$this->registerService(Authentication\Token\DefaultTokenProvider::class, function(Server $c) {
342 342
 			$mapper = $c->query(Authentication\Token\DefaultTokenMapper::class);
343 343
 			$crypto = $c->getCrypto();
344 344
 			$config = $c->getConfig();
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 		});
349 349
 		$this->registerAlias(IProvider::class, Authentication\Token\DefaultTokenProvider::class);
350 350
 
351
-		$this->registerService(\OCP\IUserSession::class, function (Server $c) {
351
+		$this->registerService(\OCP\IUserSession::class, function(Server $c) {
352 352
 			$manager = $c->getUserManager();
353 353
 			$session = new \OC\Session\Memory('');
354 354
 			$timeFactory = $c->query(ITimeFactory::class);
@@ -372,45 +372,45 @@  discard block
 block discarded – undo
372 372
 				$c->getLockdownManager(),
373 373
 				$c->getLogger()
374 374
 			);
375
-			$userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) {
375
+			$userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) {
376 376
 				\OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password));
377 377
 			});
378
-			$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
378
+			$userSession->listen('\OC\User', 'postCreateUser', function($user, $password) {
379 379
 				/** @var $user \OC\User\User */
380 380
 				\OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password));
381 381
 			});
382
-			$userSession->listen('\OC\User', 'preDelete', function ($user) use ($dispatcher) {
382
+			$userSession->listen('\OC\User', 'preDelete', function($user) use ($dispatcher) {
383 383
 				/** @var $user \OC\User\User */
384 384
 				\OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID()));
385 385
 				$dispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user));
386 386
 			});
387
-			$userSession->listen('\OC\User', 'postDelete', function ($user) {
387
+			$userSession->listen('\OC\User', 'postDelete', function($user) {
388 388
 				/** @var $user \OC\User\User */
389 389
 				\OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID()));
390 390
 			});
391
-			$userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) {
391
+			$userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) {
392 392
 				/** @var $user \OC\User\User */
393 393
 				\OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
394 394
 			});
395
-			$userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) {
395
+			$userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) {
396 396
 				/** @var $user \OC\User\User */
397 397
 				\OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
398 398
 			});
399
-			$userSession->listen('\OC\User', 'preLogin', function ($uid, $password) {
399
+			$userSession->listen('\OC\User', 'preLogin', function($uid, $password) {
400 400
 				\OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password));
401 401
 			});
402
-			$userSession->listen('\OC\User', 'postLogin', function ($user, $password) {
402
+			$userSession->listen('\OC\User', 'postLogin', function($user, $password) {
403 403
 				/** @var $user \OC\User\User */
404 404
 				\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
405 405
 			});
406
-			$userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) {
406
+			$userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) {
407 407
 				/** @var $user \OC\User\User */
408 408
 				\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
409 409
 			});
410
-			$userSession->listen('\OC\User', 'logout', function () {
410
+			$userSession->listen('\OC\User', 'logout', function() {
411 411
 				\OC_Hook::emit('OC_User', 'logout', array());
412 412
 			});
413
-			$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) use ($dispatcher) {
413
+			$userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) use ($dispatcher) {
414 414
 				/** @var $user \OC\User\User */
415 415
 				\OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue));
416 416
 				$dispatcher->dispatch('OCP\IUser::changeUser', new GenericEvent($user, ['feature' => $feature, 'oldValue' => $oldValue, 'value' => $value]));
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 		});
420 420
 		$this->registerAlias('UserSession', \OCP\IUserSession::class);
421 421
 
422
-		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function (Server $c) {
422
+		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function(Server $c) {
423 423
 			return new \OC\Authentication\TwoFactorAuth\Manager(
424 424
 				$c->getAppManager(),
425 425
 				$c->getSession(),
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 		$this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class);
436 436
 		$this->registerAlias('NavigationManager', \OCP\INavigationManager::class);
437 437
 
438
-		$this->registerService(\OC\AllConfig::class, function (Server $c) {
438
+		$this->registerService(\OC\AllConfig::class, function(Server $c) {
439 439
 			return new \OC\AllConfig(
440 440
 				$c->getSystemConfig()
441 441
 			);
@@ -443,17 +443,17 @@  discard block
 block discarded – undo
443 443
 		$this->registerAlias('AllConfig', \OC\AllConfig::class);
444 444
 		$this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class);
445 445
 
446
-		$this->registerService('SystemConfig', function ($c) use ($config) {
446
+		$this->registerService('SystemConfig', function($c) use ($config) {
447 447
 			return new \OC\SystemConfig($config);
448 448
 		});
449 449
 
450
-		$this->registerService(\OC\AppConfig::class, function (Server $c) {
450
+		$this->registerService(\OC\AppConfig::class, function(Server $c) {
451 451
 			return new \OC\AppConfig($c->getDatabaseConnection());
452 452
 		});
453 453
 		$this->registerAlias('AppConfig', \OC\AppConfig::class);
454 454
 		$this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class);
455 455
 
456
-		$this->registerService(\OCP\L10N\IFactory::class, function (Server $c) {
456
+		$this->registerService(\OCP\L10N\IFactory::class, function(Server $c) {
457 457
 			return new \OC\L10N\Factory(
458 458
 				$c->getConfig(),
459 459
 				$c->getRequest(),
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 		});
464 464
 		$this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class);
465 465
 
466
-		$this->registerService(\OCP\IURLGenerator::class, function (Server $c) {
466
+		$this->registerService(\OCP\IURLGenerator::class, function(Server $c) {
467 467
 			$config = $c->getConfig();
468 468
 			$cacheFactory = $c->getMemCacheFactory();
469 469
 			$request = $c->getRequest();
@@ -478,12 +478,12 @@  discard block
 block discarded – undo
478 478
 		$this->registerAlias('AppFetcher', AppFetcher::class);
479 479
 		$this->registerAlias('CategoryFetcher', CategoryFetcher::class);
480 480
 
481
-		$this->registerService(\OCP\ICache::class, function ($c) {
481
+		$this->registerService(\OCP\ICache::class, function($c) {
482 482
 			return new Cache\File();
483 483
 		});
484 484
 		$this->registerAlias('UserCache', \OCP\ICache::class);
485 485
 
486
-		$this->registerService(Factory::class, function (Server $c) {
486
+		$this->registerService(Factory::class, function(Server $c) {
487 487
 
488 488
 			$arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(),
489 489
 				ArrayCache::class,
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 				$version = implode(',', $v);
501 501
 				$instanceId = \OC_Util::getInstanceId();
502 502
 				$path = \OC::$SERVERROOT;
503
-				$prefix = md5($instanceId . '-' . $version . '-' . $path);
503
+				$prefix = md5($instanceId.'-'.$version.'-'.$path);
504 504
 				return new \OC\Memcache\Factory($prefix, $c->getLogger(),
505 505
 					$config->getSystemValue('memcache.local', null),
506 506
 					$config->getSystemValue('memcache.distributed', null),
@@ -513,12 +513,12 @@  discard block
 block discarded – undo
513 513
 		$this->registerAlias('MemCacheFactory', Factory::class);
514 514
 		$this->registerAlias(ICacheFactory::class, Factory::class);
515 515
 
516
-		$this->registerService('RedisFactory', function (Server $c) {
516
+		$this->registerService('RedisFactory', function(Server $c) {
517 517
 			$systemConfig = $c->getSystemConfig();
518 518
 			return new RedisFactory($systemConfig);
519 519
 		});
520 520
 
521
-		$this->registerService(\OCP\Activity\IManager::class, function (Server $c) {
521
+		$this->registerService(\OCP\Activity\IManager::class, function(Server $c) {
522 522
 			return new \OC\Activity\Manager(
523 523
 				$c->getRequest(),
524 524
 				$c->getUserSession(),
@@ -528,14 +528,14 @@  discard block
 block discarded – undo
528 528
 		});
529 529
 		$this->registerAlias('ActivityManager', \OCP\Activity\IManager::class);
530 530
 
531
-		$this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) {
531
+		$this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) {
532 532
 			return new \OC\Activity\EventMerger(
533 533
 				$c->getL10N('lib')
534 534
 			);
535 535
 		});
536 536
 		$this->registerAlias(IValidator::class, Validator::class);
537 537
 
538
-		$this->registerService(\OCP\IAvatarManager::class, function (Server $c) {
538
+		$this->registerService(\OCP\IAvatarManager::class, function(Server $c) {
539 539
 			return new AvatarManager(
540 540
 				$c->query(\OC\User\Manager::class),
541 541
 				$c->getAppDataDir('avatar'),
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 
549 549
 		$this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class);
550 550
 
551
-		$this->registerService(\OCP\ILogger::class, function (Server $c) {
551
+		$this->registerService(\OCP\ILogger::class, function(Server $c) {
552 552
 			$logType = $c->query('AllConfig')->getSystemValue('log_type', 'file');
553 553
 			$factory = new LogFactory($c, $this->getSystemConfig());
554 554
 			$logger = $factory->get($logType);
@@ -558,11 +558,11 @@  discard block
 block discarded – undo
558 558
 		});
559 559
 		$this->registerAlias('Logger', \OCP\ILogger::class);
560 560
 
561
-		$this->registerService(ILogFactory::class, function (Server $c) {
561
+		$this->registerService(ILogFactory::class, function(Server $c) {
562 562
 			return new LogFactory($c, $this->getSystemConfig());
563 563
 		});
564 564
 
565
-		$this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) {
565
+		$this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) {
566 566
 			$config = $c->getConfig();
567 567
 			return new \OC\BackgroundJob\JobList(
568 568
 				$c->getDatabaseConnection(),
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
 		});
573 573
 		$this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class);
574 574
 
575
-		$this->registerService(\OCP\Route\IRouter::class, function (Server $c) {
575
+		$this->registerService(\OCP\Route\IRouter::class, function(Server $c) {
576 576
 			$cacheFactory = $c->getMemCacheFactory();
577 577
 			$logger = $c->getLogger();
578 578
 			if ($cacheFactory->isLocalCacheAvailable()) {
@@ -584,12 +584,12 @@  discard block
 block discarded – undo
584 584
 		});
585 585
 		$this->registerAlias('Router', \OCP\Route\IRouter::class);
586 586
 
587
-		$this->registerService(\OCP\ISearch::class, function ($c) {
587
+		$this->registerService(\OCP\ISearch::class, function($c) {
588 588
 			return new Search();
589 589
 		});
590 590
 		$this->registerAlias('Search', \OCP\ISearch::class);
591 591
 
592
-		$this->registerService(\OC\Security\RateLimiting\Limiter::class, function (Server $c) {
592
+		$this->registerService(\OC\Security\RateLimiting\Limiter::class, function(Server $c) {
593 593
 			return new \OC\Security\RateLimiting\Limiter(
594 594
 				$this->getUserSession(),
595 595
 				$this->getRequest(),
@@ -597,34 +597,34 @@  discard block
 block discarded – undo
597 597
 				$c->query(\OC\Security\RateLimiting\Backend\IBackend::class)
598 598
 			);
599 599
 		});
600
-		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function (Server $c) {
600
+		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function(Server $c) {
601 601
 			return new \OC\Security\RateLimiting\Backend\MemoryCache(
602 602
 				$this->getMemCacheFactory(),
603 603
 				$c->query(ITimeFactory::class)
604 604
 			);
605 605
 		});
606 606
 
607
-		$this->registerService(\OCP\Security\ISecureRandom::class, function ($c) {
607
+		$this->registerService(\OCP\Security\ISecureRandom::class, function($c) {
608 608
 			return new SecureRandom();
609 609
 		});
610 610
 		$this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class);
611 611
 
612
-		$this->registerService(\OCP\Security\ICrypto::class, function (Server $c) {
612
+		$this->registerService(\OCP\Security\ICrypto::class, function(Server $c) {
613 613
 			return new Crypto($c->getConfig(), $c->getSecureRandom());
614 614
 		});
615 615
 		$this->registerAlias('Crypto', \OCP\Security\ICrypto::class);
616 616
 
617
-		$this->registerService(\OCP\Security\IHasher::class, function (Server $c) {
617
+		$this->registerService(\OCP\Security\IHasher::class, function(Server $c) {
618 618
 			return new Hasher($c->getConfig());
619 619
 		});
620 620
 		$this->registerAlias('Hasher', \OCP\Security\IHasher::class);
621 621
 
622
-		$this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) {
622
+		$this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) {
623 623
 			return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection());
624 624
 		});
625 625
 		$this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class);
626 626
 
627
-		$this->registerService(IDBConnection::class, function (Server $c) {
627
+		$this->registerService(IDBConnection::class, function(Server $c) {
628 628
 			$systemConfig = $c->getSystemConfig();
629 629
 			$factory = new \OC\DB\ConnectionFactory($systemConfig);
630 630
 			$type = $systemConfig->getValue('dbtype', 'sqlite');
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
 		$this->registerAlias('DatabaseConnection', IDBConnection::class);
640 640
 
641 641
 
642
-		$this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) {
642
+		$this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) {
643 643
 			$user = \OC_User::getUser();
644 644
 			$uid = $user ? $user : null;
645 645
 			return new ClientService(
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
 			);
655 655
 		});
656 656
 		$this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class);
657
-		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) {
657
+		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) {
658 658
 			$eventLogger = new EventLogger();
659 659
 			if ($c->getSystemConfig()->getValue('debug', false)) {
660 660
 				// In debug mode, module is being activated by default
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 		});
665 665
 		$this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class);
666 666
 
667
-		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) {
667
+		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) {
668 668
 			$queryLogger = new QueryLogger();
669 669
 			if ($c->getSystemConfig()->getValue('debug', false)) {
670 670
 				// In debug mode, module is being activated by default
@@ -674,7 +674,7 @@  discard block
 block discarded – undo
674 674
 		});
675 675
 		$this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class);
676 676
 
677
-		$this->registerService(TempManager::class, function (Server $c) {
677
+		$this->registerService(TempManager::class, function(Server $c) {
678 678
 			return new TempManager(
679 679
 				$c->getLogger(),
680 680
 				$c->getConfig()
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
 		$this->registerAlias('TempManager', TempManager::class);
684 684
 		$this->registerAlias(ITempManager::class, TempManager::class);
685 685
 
686
-		$this->registerService(AppManager::class, function (Server $c) {
686
+		$this->registerService(AppManager::class, function(Server $c) {
687 687
 			return new \OC\App\AppManager(
688 688
 				$c->getUserSession(),
689 689
 				$c->query(\OC\AppConfig::class),
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 		$this->registerAlias('AppManager', AppManager::class);
696 696
 		$this->registerAlias(IAppManager::class, AppManager::class);
697 697
 
698
-		$this->registerService(\OCP\IDateTimeZone::class, function (Server $c) {
698
+		$this->registerService(\OCP\IDateTimeZone::class, function(Server $c) {
699 699
 			return new DateTimeZone(
700 700
 				$c->getConfig(),
701 701
 				$c->getSession()
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
 		});
704 704
 		$this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class);
705 705
 
706
-		$this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) {
706
+		$this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) {
707 707
 			$language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null);
708 708
 
709 709
 			return new DateTimeFormatter(
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
 		});
714 714
 		$this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class);
715 715
 
716
-		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) {
716
+		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) {
717 717
 			$mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger());
718 718
 			$listener = new UserMountCacheListener($mountCache);
719 719
 			$listener->listen($c->getUserManager());
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
 		});
722 722
 		$this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class);
723 723
 
724
-		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) {
724
+		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) {
725 725
 			$loader = \OC\Files\Filesystem::getLoader();
726 726
 			$mountCache = $c->query('UserMountCache');
727 727
 			$manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache);
@@ -737,10 +737,10 @@  discard block
 block discarded – undo
737 737
 		});
738 738
 		$this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class);
739 739
 
740
-		$this->registerService('IniWrapper', function ($c) {
740
+		$this->registerService('IniWrapper', function($c) {
741 741
 			return new IniGetWrapper();
742 742
 		});
743
-		$this->registerService('AsyncCommandBus', function (Server $c) {
743
+		$this->registerService('AsyncCommandBus', function(Server $c) {
744 744
 			$busClass = $c->getConfig()->getSystemValue('commandbus');
745 745
 			if ($busClass) {
746 746
 				list($app, $class) = explode('::', $busClass, 2);
@@ -755,10 +755,10 @@  discard block
 block discarded – undo
755 755
 				return new CronBus($jobList);
756 756
 			}
757 757
 		});
758
-		$this->registerService('TrustedDomainHelper', function ($c) {
758
+		$this->registerService('TrustedDomainHelper', function($c) {
759 759
 			return new TrustedDomainHelper($this->getConfig());
760 760
 		});
761
-		$this->registerService('Throttler', function (Server $c) {
761
+		$this->registerService('Throttler', function(Server $c) {
762 762
 			return new Throttler(
763 763
 				$c->getDatabaseConnection(),
764 764
 				$c->query(ITimeFactory::class),
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
 				$c->getConfig()
767 767
 			);
768 768
 		});
769
-		$this->registerService('IntegrityCodeChecker', function (Server $c) {
769
+		$this->registerService('IntegrityCodeChecker', function(Server $c) {
770 770
 			// IConfig and IAppManager requires a working database. This code
771 771
 			// might however be called when ownCloud is not yet setup.
772 772
 			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
 				$c->getTempManager()
788 788
 			);
789 789
 		});
790
-		$this->registerService(\OCP\IRequest::class, function ($c) {
790
+		$this->registerService(\OCP\IRequest::class, function($c) {
791 791
 			if (isset($this['urlParams'])) {
792 792
 				$urlParams = $this['urlParams'];
793 793
 			} else {
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
 		});
824 824
 		$this->registerAlias('Request', \OCP\IRequest::class);
825 825
 
826
-		$this->registerService(\OCP\Mail\IMailer::class, function (Server $c) {
826
+		$this->registerService(\OCP\Mail\IMailer::class, function(Server $c) {
827 827
 			return new Mailer(
828 828
 				$c->getConfig(),
829 829
 				$c->getLogger(),
@@ -834,7 +834,7 @@  discard block
 block discarded – undo
834 834
 		});
835 835
 		$this->registerAlias('Mailer', \OCP\Mail\IMailer::class);
836 836
 
837
-		$this->registerService('LDAPProvider', function (Server $c) {
837
+		$this->registerService('LDAPProvider', function(Server $c) {
838 838
 			$config = $c->getConfig();
839 839
 			$factoryClass = $config->getSystemValue('ldapProviderFactory', null);
840 840
 			if (is_null($factoryClass)) {
@@ -844,7 +844,7 @@  discard block
 block discarded – undo
844 844
 			$factory = new $factoryClass($this);
845 845
 			return $factory->getLDAPProvider();
846 846
 		});
847
-		$this->registerService(ILockingProvider::class, function (Server $c) {
847
+		$this->registerService(ILockingProvider::class, function(Server $c) {
848 848
 			$ini = $c->getIniWrapper();
849 849
 			$config = $c->getConfig();
850 850
 			$ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time')));
@@ -867,49 +867,49 @@  discard block
 block discarded – undo
867 867
 		});
868 868
 		$this->registerAlias('LockingProvider', ILockingProvider::class);
869 869
 
870
-		$this->registerService(\OCP\Files\Mount\IMountManager::class, function () {
870
+		$this->registerService(\OCP\Files\Mount\IMountManager::class, function() {
871 871
 			return new \OC\Files\Mount\Manager();
872 872
 		});
873 873
 		$this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class);
874 874
 
875
-		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) {
875
+		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) {
876 876
 			return new \OC\Files\Type\Detection(
877 877
 				$c->getURLGenerator(),
878 878
 				\OC::$configDir,
879
-				\OC::$SERVERROOT . '/resources/config/'
879
+				\OC::$SERVERROOT.'/resources/config/'
880 880
 			);
881 881
 		});
882 882
 		$this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class);
883 883
 
884
-		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) {
884
+		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) {
885 885
 			return new \OC\Files\Type\Loader(
886 886
 				$c->getDatabaseConnection()
887 887
 			);
888 888
 		});
889 889
 		$this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class);
890
-		$this->registerService(BundleFetcher::class, function () {
890
+		$this->registerService(BundleFetcher::class, function() {
891 891
 			return new BundleFetcher($this->getL10N('lib'));
892 892
 		});
893
-		$this->registerService(\OCP\Notification\IManager::class, function (Server $c) {
893
+		$this->registerService(\OCP\Notification\IManager::class, function(Server $c) {
894 894
 			return new Manager(
895 895
 				$c->query(IValidator::class)
896 896
 			);
897 897
 		});
898 898
 		$this->registerAlias('NotificationManager', \OCP\Notification\IManager::class);
899 899
 
900
-		$this->registerService(\OC\CapabilitiesManager::class, function (Server $c) {
900
+		$this->registerService(\OC\CapabilitiesManager::class, function(Server $c) {
901 901
 			$manager = new \OC\CapabilitiesManager($c->getLogger());
902
-			$manager->registerCapability(function () use ($c) {
902
+			$manager->registerCapability(function() use ($c) {
903 903
 				return new \OC\OCS\CoreCapabilities($c->getConfig());
904 904
 			});
905
-			$manager->registerCapability(function () use ($c) {
905
+			$manager->registerCapability(function() use ($c) {
906 906
 				return $c->query(\OC\Security\Bruteforce\Capabilities::class);
907 907
 			});
908 908
 			return $manager;
909 909
 		});
910 910
 		$this->registerAlias('CapabilitiesManager', \OC\CapabilitiesManager::class);
911 911
 
912
-		$this->registerService(\OCP\Comments\ICommentsManager::class, function (Server $c) {
912
+		$this->registerService(\OCP\Comments\ICommentsManager::class, function(Server $c) {
913 913
 			$config = $c->getConfig();
914 914
 			$factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class);
915 915
 			/** @var \OCP\Comments\ICommentsManagerFactory $factory */
@@ -919,7 +919,7 @@  discard block
 block discarded – undo
919 919
 			$manager->registerDisplayNameResolver('user', function($id) use ($c) {
920 920
 				$manager = $c->getUserManager();
921 921
 				$user = $manager->get($id);
922
-				if(is_null($user)) {
922
+				if (is_null($user)) {
923 923
 					$l = $c->getL10N('core');
924 924
 					$displayName = $l->t('Unknown user');
925 925
 				} else {
@@ -932,7 +932,7 @@  discard block
 block discarded – undo
932 932
 		});
933 933
 		$this->registerAlias('CommentsManager', \OCP\Comments\ICommentsManager::class);
934 934
 
935
-		$this->registerService('ThemingDefaults', function (Server $c) {
935
+		$this->registerService('ThemingDefaults', function(Server $c) {
936 936
 			/*
937 937
 			 * Dark magic for autoloader.
938 938
 			 * If we do a class_exists it will try to load the class which will
@@ -959,7 +959,7 @@  discard block
 block discarded – undo
959 959
 			}
960 960
 			return new \OC_Defaults();
961 961
 		});
962
-		$this->registerService(SCSSCacher::class, function (Server $c) {
962
+		$this->registerService(SCSSCacher::class, function(Server $c) {
963 963
 			/** @var Factory $cacheFactory */
964 964
 			$cacheFactory = $c->query(Factory::class);
965 965
 			return new SCSSCacher(
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
 				$this->getMemCacheFactory()
973 973
 			);
974 974
 		});
975
-		$this->registerService(JSCombiner::class, function (Server $c) {
975
+		$this->registerService(JSCombiner::class, function(Server $c) {
976 976
 			/** @var Factory $cacheFactory */
977 977
 			$cacheFactory = $c->query(Factory::class);
978 978
 			return new JSCombiner(
@@ -983,13 +983,13 @@  discard block
 block discarded – undo
983 983
 				$c->getLogger()
984 984
 			);
985 985
 		});
986
-		$this->registerService(EventDispatcher::class, function () {
986
+		$this->registerService(EventDispatcher::class, function() {
987 987
 			return new EventDispatcher();
988 988
 		});
989 989
 		$this->registerAlias('EventDispatcher', EventDispatcher::class);
990 990
 		$this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class);
991 991
 
992
-		$this->registerService('CryptoWrapper', function (Server $c) {
992
+		$this->registerService('CryptoWrapper', function(Server $c) {
993 993
 			// FIXME: Instantiiated here due to cyclic dependency
994 994
 			$request = new Request(
995 995
 				[
@@ -1014,7 +1014,7 @@  discard block
 block discarded – undo
1014 1014
 				$request
1015 1015
 			);
1016 1016
 		});
1017
-		$this->registerService('CsrfTokenManager', function (Server $c) {
1017
+		$this->registerService('CsrfTokenManager', function(Server $c) {
1018 1018
 			$tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom());
1019 1019
 
1020 1020
 			return new CsrfTokenManager(
@@ -1022,22 +1022,22 @@  discard block
 block discarded – undo
1022 1022
 				$c->query(SessionStorage::class)
1023 1023
 			);
1024 1024
 		});
1025
-		$this->registerService(SessionStorage::class, function (Server $c) {
1025
+		$this->registerService(SessionStorage::class, function(Server $c) {
1026 1026
 			return new SessionStorage($c->getSession());
1027 1027
 		});
1028
-		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) {
1028
+		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) {
1029 1029
 			return new ContentSecurityPolicyManager();
1030 1030
 		});
1031 1031
 		$this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class);
1032 1032
 
1033
-		$this->registerService('ContentSecurityPolicyNonceManager', function (Server $c) {
1033
+		$this->registerService('ContentSecurityPolicyNonceManager', function(Server $c) {
1034 1034
 			return new ContentSecurityPolicyNonceManager(
1035 1035
 				$c->getCsrfTokenManager(),
1036 1036
 				$c->getRequest()
1037 1037
 			);
1038 1038
 		});
1039 1039
 
1040
-		$this->registerService(\OCP\Share\IManager::class, function (Server $c) {
1040
+		$this->registerService(\OCP\Share\IManager::class, function(Server $c) {
1041 1041
 			$config = $c->getConfig();
1042 1042
 			$factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class);
1043 1043
 			/** @var \OCP\Share\IProviderFactory $factory */
@@ -1080,7 +1080,7 @@  discard block
 block discarded – undo
1080 1080
 
1081 1081
 		$this->registerAlias(\OCP\Collaboration\AutoComplete\IManager::class, \OC\Collaboration\AutoComplete\Manager::class);
1082 1082
 
1083
-		$this->registerService('SettingsManager', function (Server $c) {
1083
+		$this->registerService('SettingsManager', function(Server $c) {
1084 1084
 			$manager = new \OC\Settings\Manager(
1085 1085
 				$c->getLogger(),
1086 1086
 				$c->getDatabaseConnection(),
@@ -1098,31 +1098,31 @@  discard block
 block discarded – undo
1098 1098
 			);
1099 1099
 			return $manager;
1100 1100
 		});
1101
-		$this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) {
1101
+		$this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) {
1102 1102
 			return new \OC\Files\AppData\Factory(
1103 1103
 				$c->getRootFolder(),
1104 1104
 				$c->getSystemConfig()
1105 1105
 			);
1106 1106
 		});
1107 1107
 
1108
-		$this->registerService('LockdownManager', function (Server $c) {
1109
-			return new LockdownManager(function () use ($c) {
1108
+		$this->registerService('LockdownManager', function(Server $c) {
1109
+			return new LockdownManager(function() use ($c) {
1110 1110
 				return $c->getSession();
1111 1111
 			});
1112 1112
 		});
1113 1113
 
1114
-		$this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) {
1114
+		$this->registerService(\OCP\OCS\IDiscoveryService::class, function(Server $c) {
1115 1115
 			return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService());
1116 1116
 		});
1117 1117
 
1118
-		$this->registerService(ICloudIdManager::class, function (Server $c) {
1118
+		$this->registerService(ICloudIdManager::class, function(Server $c) {
1119 1119
 			return new CloudIdManager();
1120 1120
 		});
1121 1121
 
1122 1122
 		$this->registerAlias(\OCP\AppFramework\Utility\IControllerMethodReflector::class, \OC\AppFramework\Utility\ControllerMethodReflector::class);
1123 1123
 		$this->registerAlias('ControllerMethodReflector', \OCP\AppFramework\Utility\IControllerMethodReflector::class);
1124 1124
 
1125
-		$this->registerService(\OCP\AppFramework\Utility\ITimeFactory::class, function (Server $c) {
1125
+		$this->registerService(\OCP\AppFramework\Utility\ITimeFactory::class, function(Server $c) {
1126 1126
 			return new class implements ITimeFactory {
1127 1127
 				public function getTime(): int {
1128 1128
 					return \time();
@@ -1131,18 +1131,18 @@  discard block
 block discarded – undo
1131 1131
 		});
1132 1132
 		$this->registerAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class);
1133 1133
 
1134
-		$this->registerService(Defaults::class, function (Server $c) {
1134
+		$this->registerService(Defaults::class, function(Server $c) {
1135 1135
 			return new Defaults(
1136 1136
 				$c->getThemingDefaults()
1137 1137
 			);
1138 1138
 		});
1139 1139
 		$this->registerAlias('Defaults', \OCP\Defaults::class);
1140 1140
 
1141
-		$this->registerService(\OCP\ISession::class, function (SimpleContainer $c) {
1141
+		$this->registerService(\OCP\ISession::class, function(SimpleContainer $c) {
1142 1142
 			return $c->query(\OCP\IUserSession::class)->getSession();
1143 1143
 		});
1144 1144
 
1145
-		$this->registerService(IShareHelper::class, function (Server $c) {
1145
+		$this->registerService(IShareHelper::class, function(Server $c) {
1146 1146
 			return new ShareHelper(
1147 1147
 				$c->query(\OCP\Share\IManager::class)
1148 1148
 			);
@@ -1204,11 +1204,11 @@  discard block
 block discarded – undo
1204 1204
 				// no avatar to remove
1205 1205
 			} catch (\Exception $e) {
1206 1206
 				// Ignore exceptions
1207
-				$logger->info('Could not cleanup avatar of ' . $user->getUID());
1207
+				$logger->info('Could not cleanup avatar of '.$user->getUID());
1208 1208
 			}
1209 1209
 		});
1210 1210
 
1211
-		$dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) {
1211
+		$dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) {
1212 1212
 			$manager = $this->getAvatarManager();
1213 1213
 			/** @var IUser $user */
1214 1214
 			$user = $e->getSubject();
@@ -1359,7 +1359,7 @@  discard block
 block discarded – undo
1359 1359
 	 * @deprecated since 9.2.0 use IAppData
1360 1360
 	 */
1361 1361
 	public function getAppFolder() {
1362
-		$dir = '/' . \OC_App::getCurrentApp();
1362
+		$dir = '/'.\OC_App::getCurrentApp();
1363 1363
 		$root = $this->getRootFolder();
1364 1364
 		if (!$root->nodeExists($dir)) {
1365 1365
 			$folder = $root->newFolder($dir);
@@ -1934,7 +1934,7 @@  discard block
 block discarded – undo
1934 1934
 	/**
1935 1935
 	 * @return \OCP\Collaboration\AutoComplete\IManager
1936 1936
 	 */
1937
-	public function getAutoCompleteManager(){
1937
+	public function getAutoCompleteManager() {
1938 1938
 		return $this->query(IManager::class);
1939 1939
 	}
1940 1940
 
Please login to merge, or discard this patch.