@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | // To find out if we are running from CLI or not |
185 | 185 | $this->registerParameter('isCLI', \OC::$CLI); |
186 | 186 | |
187 | - $this->registerService(\OCP\IServerContainer::class, function (IServerContainer $c) { |
|
187 | + $this->registerService(\OCP\IServerContainer::class, function(IServerContainer $c) { |
|
188 | 188 | return $c; |
189 | 189 | }); |
190 | 190 | |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | $this->registerAlias(IActionFactory::class, ActionFactory::class); |
204 | 204 | |
205 | 205 | |
206 | - $this->registerService(\OCP\IPreview::class, function (Server $c) { |
|
206 | + $this->registerService(\OCP\IPreview::class, function(Server $c) { |
|
207 | 207 | return new PreviewManager( |
208 | 208 | $c->getConfig(), |
209 | 209 | $c->getRootFolder(), |
@@ -214,13 +214,13 @@ discard block |
||
214 | 214 | }); |
215 | 215 | $this->registerAlias('PreviewManager', \OCP\IPreview::class); |
216 | 216 | |
217 | - $this->registerService(\OC\Preview\Watcher::class, function (Server $c) { |
|
217 | + $this->registerService(\OC\Preview\Watcher::class, function(Server $c) { |
|
218 | 218 | return new \OC\Preview\Watcher( |
219 | 219 | $c->getAppDataDir('preview') |
220 | 220 | ); |
221 | 221 | }); |
222 | 222 | |
223 | - $this->registerService(\OCP\Encryption\IManager::class, function (Server $c) { |
|
223 | + $this->registerService(\OCP\Encryption\IManager::class, function(Server $c) { |
|
224 | 224 | $view = new View(); |
225 | 225 | $util = new Encryption\Util( |
226 | 226 | $view, |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | }); |
240 | 240 | $this->registerAlias('EncryptionManager', \OCP\Encryption\IManager::class); |
241 | 241 | |
242 | - $this->registerService('EncryptionFileHelper', function (Server $c) { |
|
242 | + $this->registerService('EncryptionFileHelper', function(Server $c) { |
|
243 | 243 | $util = new Encryption\Util( |
244 | 244 | new View(), |
245 | 245 | $c->getUserManager(), |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | ); |
254 | 254 | }); |
255 | 255 | |
256 | - $this->registerService('EncryptionKeyStorage', function (Server $c) { |
|
256 | + $this->registerService('EncryptionKeyStorage', function(Server $c) { |
|
257 | 257 | $view = new View(); |
258 | 258 | $util = new Encryption\Util( |
259 | 259 | $view, |
@@ -264,30 +264,30 @@ discard block |
||
264 | 264 | |
265 | 265 | return new Encryption\Keys\Storage($view, $util); |
266 | 266 | }); |
267 | - $this->registerService('TagMapper', function (Server $c) { |
|
267 | + $this->registerService('TagMapper', function(Server $c) { |
|
268 | 268 | return new TagMapper($c->getDatabaseConnection()); |
269 | 269 | }); |
270 | 270 | |
271 | - $this->registerService(\OCP\ITagManager::class, function (Server $c) { |
|
271 | + $this->registerService(\OCP\ITagManager::class, function(Server $c) { |
|
272 | 272 | $tagMapper = $c->query('TagMapper'); |
273 | 273 | return new TagManager($tagMapper, $c->getUserSession()); |
274 | 274 | }); |
275 | 275 | $this->registerAlias('TagManager', \OCP\ITagManager::class); |
276 | 276 | |
277 | - $this->registerService('SystemTagManagerFactory', function (Server $c) { |
|
277 | + $this->registerService('SystemTagManagerFactory', function(Server $c) { |
|
278 | 278 | $config = $c->getConfig(); |
279 | 279 | $factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class); |
280 | 280 | return new $factoryClass($this); |
281 | 281 | }); |
282 | - $this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) { |
|
282 | + $this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) { |
|
283 | 283 | return $c->query('SystemTagManagerFactory')->getManager(); |
284 | 284 | }); |
285 | 285 | $this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class); |
286 | 286 | |
287 | - $this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) { |
|
287 | + $this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) { |
|
288 | 288 | return $c->query('SystemTagManagerFactory')->getObjectMapper(); |
289 | 289 | }); |
290 | - $this->registerService('RootFolder', function (Server $c) { |
|
290 | + $this->registerService('RootFolder', function(Server $c) { |
|
291 | 291 | $manager = \OC\Files\Filesystem::getMountManager(null); |
292 | 292 | $view = new View(); |
293 | 293 | $root = new Root( |
@@ -308,37 +308,37 @@ discard block |
||
308 | 308 | }); |
309 | 309 | $this->registerAlias('SystemTagObjectMapper', \OCP\SystemTag\ISystemTagObjectMapper::class); |
310 | 310 | |
311 | - $this->registerService(\OCP\Files\IRootFolder::class, function (Server $c) { |
|
312 | - return new LazyRoot(function () use ($c) { |
|
311 | + $this->registerService(\OCP\Files\IRootFolder::class, function(Server $c) { |
|
312 | + return new LazyRoot(function() use ($c) { |
|
313 | 313 | return $c->query('RootFolder'); |
314 | 314 | }); |
315 | 315 | }); |
316 | 316 | $this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class); |
317 | 317 | |
318 | - $this->registerService(\OC\User\Manager::class, function (Server $c) { |
|
318 | + $this->registerService(\OC\User\Manager::class, function(Server $c) { |
|
319 | 319 | return new \OC\User\Manager($c->getConfig(), $c->getEventDispatcher()); |
320 | 320 | }); |
321 | 321 | $this->registerAlias('UserManager', \OC\User\Manager::class); |
322 | 322 | $this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class); |
323 | 323 | |
324 | - $this->registerService(\OCP\IGroupManager::class, function (Server $c) { |
|
324 | + $this->registerService(\OCP\IGroupManager::class, function(Server $c) { |
|
325 | 325 | $groupManager = new \OC\Group\Manager($this->getUserManager(), $c->getEventDispatcher(), $this->getLogger()); |
326 | - $groupManager->listen('\OC\Group', 'preCreate', function ($gid) { |
|
326 | + $groupManager->listen('\OC\Group', 'preCreate', function($gid) { |
|
327 | 327 | \OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid)); |
328 | 328 | }); |
329 | - $groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) { |
|
329 | + $groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) { |
|
330 | 330 | \OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID())); |
331 | 331 | }); |
332 | - $groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { |
|
332 | + $groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) { |
|
333 | 333 | \OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID())); |
334 | 334 | }); |
335 | - $groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { |
|
335 | + $groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) { |
|
336 | 336 | \OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID())); |
337 | 337 | }); |
338 | - $groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
338 | + $groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
339 | 339 | \OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID())); |
340 | 340 | }); |
341 | - $groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
341 | + $groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
342 | 342 | \OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
343 | 343 | //Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks |
344 | 344 | \OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | }); |
348 | 348 | $this->registerAlias('GroupManager', \OCP\IGroupManager::class); |
349 | 349 | |
350 | - $this->registerService(Store::class, function (Server $c) { |
|
350 | + $this->registerService(Store::class, function(Server $c) { |
|
351 | 351 | $session = $c->getSession(); |
352 | 352 | if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
353 | 353 | $tokenProvider = $c->query(IProvider::class); |
@@ -358,13 +358,13 @@ discard block |
||
358 | 358 | return new Store($session, $logger, $tokenProvider); |
359 | 359 | }); |
360 | 360 | $this->registerAlias(IStore::class, Store::class); |
361 | - $this->registerService(Authentication\Token\DefaultTokenMapper::class, function (Server $c) { |
|
361 | + $this->registerService(Authentication\Token\DefaultTokenMapper::class, function(Server $c) { |
|
362 | 362 | $dbConnection = $c->getDatabaseConnection(); |
363 | 363 | return new Authentication\Token\DefaultTokenMapper($dbConnection); |
364 | 364 | }); |
365 | 365 | $this->registerAlias(IProvider::class, Authentication\Token\Manager::class); |
366 | 366 | |
367 | - $this->registerService(\OC\User\Session::class, function (Server $c) { |
|
367 | + $this->registerService(\OC\User\Session::class, function(Server $c) { |
|
368 | 368 | $manager = $c->getUserManager(); |
369 | 369 | $session = new \OC\Session\Memory(''); |
370 | 370 | $timeFactory = new TimeFactory(); |
@@ -388,45 +388,45 @@ discard block |
||
388 | 388 | $c->getLockdownManager(), |
389 | 389 | $c->getLogger() |
390 | 390 | ); |
391 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
391 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
392 | 392 | \OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password)); |
393 | 393 | }); |
394 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
394 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
395 | 395 | /** @var $user \OC\User\User */ |
396 | 396 | \OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password)); |
397 | 397 | }); |
398 | - $userSession->listen('\OC\User', 'preDelete', function ($user) use ($dispatcher) { |
|
398 | + $userSession->listen('\OC\User', 'preDelete', function($user) use ($dispatcher) { |
|
399 | 399 | /** @var $user \OC\User\User */ |
400 | 400 | \OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID())); |
401 | 401 | $dispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user)); |
402 | 402 | }); |
403 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
403 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
404 | 404 | /** @var $user \OC\User\User */ |
405 | 405 | \OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID())); |
406 | 406 | }); |
407 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
407 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
408 | 408 | /** @var $user \OC\User\User */ |
409 | 409 | \OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
410 | 410 | }); |
411 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
411 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
412 | 412 | /** @var $user \OC\User\User */ |
413 | 413 | \OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
414 | 414 | }); |
415 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
415 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
416 | 416 | \OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password)); |
417 | 417 | }); |
418 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $password, $isTokenLogin) { |
|
418 | + $userSession->listen('\OC\User', 'postLogin', function($user, $password, $isTokenLogin) { |
|
419 | 419 | /** @var $user \OC\User\User */ |
420 | 420 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'isTokenLogin' => $isTokenLogin)); |
421 | 421 | }); |
422 | - $userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) { |
|
422 | + $userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) { |
|
423 | 423 | /** @var $user \OC\User\User */ |
424 | 424 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
425 | 425 | }); |
426 | - $userSession->listen('\OC\User', 'logout', function () { |
|
426 | + $userSession->listen('\OC\User', 'logout', function() { |
|
427 | 427 | \OC_Hook::emit('OC_User', 'logout', array()); |
428 | 428 | }); |
429 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) { |
|
429 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) { |
|
430 | 430 | /** @var $user \OC\User\User */ |
431 | 431 | \OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue)); |
432 | 432 | }); |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | $this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class); |
441 | 441 | $this->registerAlias('NavigationManager', \OCP\INavigationManager::class); |
442 | 442 | |
443 | - $this->registerService(\OC\AllConfig::class, function (Server $c) { |
|
443 | + $this->registerService(\OC\AllConfig::class, function(Server $c) { |
|
444 | 444 | return new \OC\AllConfig( |
445 | 445 | $c->getSystemConfig() |
446 | 446 | ); |
@@ -448,17 +448,17 @@ discard block |
||
448 | 448 | $this->registerAlias('AllConfig', \OC\AllConfig::class); |
449 | 449 | $this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class); |
450 | 450 | |
451 | - $this->registerService('SystemConfig', function ($c) use ($config) { |
|
451 | + $this->registerService('SystemConfig', function($c) use ($config) { |
|
452 | 452 | return new \OC\SystemConfig($config); |
453 | 453 | }); |
454 | 454 | |
455 | - $this->registerService(\OC\AppConfig::class, function (Server $c) { |
|
455 | + $this->registerService(\OC\AppConfig::class, function(Server $c) { |
|
456 | 456 | return new \OC\AppConfig($c->getDatabaseConnection()); |
457 | 457 | }); |
458 | 458 | $this->registerAlias('AppConfig', \OC\AppConfig::class); |
459 | 459 | $this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class); |
460 | 460 | |
461 | - $this->registerService(\OCP\L10N\IFactory::class, function (Server $c) { |
|
461 | + $this->registerService(\OCP\L10N\IFactory::class, function(Server $c) { |
|
462 | 462 | return new \OC\L10N\Factory( |
463 | 463 | $c->getConfig(), |
464 | 464 | $c->getRequest(), |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | }); |
469 | 469 | $this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class); |
470 | 470 | |
471 | - $this->registerService(\OCP\IURLGenerator::class, function (Server $c) { |
|
471 | + $this->registerService(\OCP\IURLGenerator::class, function(Server $c) { |
|
472 | 472 | $config = $c->getConfig(); |
473 | 473 | $cacheFactory = $c->getMemCacheFactory(); |
474 | 474 | $request = $c->getRequest(); |
@@ -483,12 +483,12 @@ discard block |
||
483 | 483 | $this->registerAlias('AppFetcher', AppFetcher::class); |
484 | 484 | $this->registerAlias('CategoryFetcher', CategoryFetcher::class); |
485 | 485 | |
486 | - $this->registerService(\OCP\ICache::class, function ($c) { |
|
486 | + $this->registerService(\OCP\ICache::class, function($c) { |
|
487 | 487 | return new Cache\File(); |
488 | 488 | }); |
489 | 489 | $this->registerAlias('UserCache', \OCP\ICache::class); |
490 | 490 | |
491 | - $this->registerService(Factory::class, function (Server $c) { |
|
491 | + $this->registerService(Factory::class, function(Server $c) { |
|
492 | 492 | |
493 | 493 | $arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(), |
494 | 494 | ArrayCache::class, |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | $version = implode(',', $v); |
504 | 504 | $instanceId = \OC_Util::getInstanceId(); |
505 | 505 | $path = \OC::$SERVERROOT; |
506 | - $prefix = md5($instanceId . '-' . $version . '-' . $path); |
|
506 | + $prefix = md5($instanceId.'-'.$version.'-'.$path); |
|
507 | 507 | return new \OC\Memcache\Factory($prefix, $c->getLogger(), |
508 | 508 | $config->getSystemValue('memcache.local', null), |
509 | 509 | $config->getSystemValue('memcache.distributed', null), |
@@ -516,12 +516,12 @@ discard block |
||
516 | 516 | $this->registerAlias('MemCacheFactory', Factory::class); |
517 | 517 | $this->registerAlias(ICacheFactory::class, Factory::class); |
518 | 518 | |
519 | - $this->registerService('RedisFactory', function (Server $c) { |
|
519 | + $this->registerService('RedisFactory', function(Server $c) { |
|
520 | 520 | $systemConfig = $c->getSystemConfig(); |
521 | 521 | return new RedisFactory($systemConfig); |
522 | 522 | }); |
523 | 523 | |
524 | - $this->registerService(\OCP\Activity\IManager::class, function (Server $c) { |
|
524 | + $this->registerService(\OCP\Activity\IManager::class, function(Server $c) { |
|
525 | 525 | return new \OC\Activity\Manager( |
526 | 526 | $c->getRequest(), |
527 | 527 | $c->getUserSession(), |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | }); |
532 | 532 | $this->registerAlias('ActivityManager', \OCP\Activity\IManager::class); |
533 | 533 | |
534 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
534 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
535 | 535 | return new \OC\Activity\EventMerger( |
536 | 536 | $c->getL10N('lib') |
537 | 537 | ); |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | |
553 | 553 | $this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class); |
554 | 554 | |
555 | - $this->registerService(\OC\Log::class, function (Server $c) { |
|
555 | + $this->registerService(\OC\Log::class, function(Server $c) { |
|
556 | 556 | $logType = $c->query('AllConfig')->getSystemValue('log_type', 'file'); |
557 | 557 | $factory = new LogFactory($c, $this->getSystemConfig()); |
558 | 558 | $logger = $factory->get($logType); |
@@ -563,11 +563,11 @@ discard block |
||
563 | 563 | $this->registerAlias(\OCP\ILogger::class, \OC\Log::class); |
564 | 564 | $this->registerAlias('Logger', \OC\Log::class); |
565 | 565 | |
566 | - $this->registerService(ILogFactory::class, function (Server $c) { |
|
566 | + $this->registerService(ILogFactory::class, function(Server $c) { |
|
567 | 567 | return new LogFactory($c, $this->getSystemConfig()); |
568 | 568 | }); |
569 | 569 | |
570 | - $this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) { |
|
570 | + $this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) { |
|
571 | 571 | $config = $c->getConfig(); |
572 | 572 | return new \OC\BackgroundJob\JobList( |
573 | 573 | $c->getDatabaseConnection(), |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | }); |
578 | 578 | $this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class); |
579 | 579 | |
580 | - $this->registerService(\OCP\Route\IRouter::class, function (Server $c) { |
|
580 | + $this->registerService(\OCP\Route\IRouter::class, function(Server $c) { |
|
581 | 581 | $cacheFactory = $c->getMemCacheFactory(); |
582 | 582 | $logger = $c->getLogger(); |
583 | 583 | if ($cacheFactory->isLocalCacheAvailable()) { |
@@ -589,12 +589,12 @@ discard block |
||
589 | 589 | }); |
590 | 590 | $this->registerAlias('Router', \OCP\Route\IRouter::class); |
591 | 591 | |
592 | - $this->registerService(\OCP\ISearch::class, function ($c) { |
|
592 | + $this->registerService(\OCP\ISearch::class, function($c) { |
|
593 | 593 | return new Search(); |
594 | 594 | }); |
595 | 595 | $this->registerAlias('Search', \OCP\ISearch::class); |
596 | 596 | |
597 | - $this->registerService(\OC\Security\RateLimiting\Limiter::class, function (Server $c) { |
|
597 | + $this->registerService(\OC\Security\RateLimiting\Limiter::class, function(Server $c) { |
|
598 | 598 | return new \OC\Security\RateLimiting\Limiter( |
599 | 599 | $this->getUserSession(), |
600 | 600 | $this->getRequest(), |
@@ -602,34 +602,34 @@ discard block |
||
602 | 602 | $c->query(\OC\Security\RateLimiting\Backend\IBackend::class) |
603 | 603 | ); |
604 | 604 | }); |
605 | - $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) { |
|
605 | + $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) { |
|
606 | 606 | return new \OC\Security\RateLimiting\Backend\MemoryCache( |
607 | 607 | $this->getMemCacheFactory(), |
608 | 608 | new \OC\AppFramework\Utility\TimeFactory() |
609 | 609 | ); |
610 | 610 | }); |
611 | 611 | |
612 | - $this->registerService(\OCP\Security\ISecureRandom::class, function ($c) { |
|
612 | + $this->registerService(\OCP\Security\ISecureRandom::class, function($c) { |
|
613 | 613 | return new SecureRandom(); |
614 | 614 | }); |
615 | 615 | $this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class); |
616 | 616 | |
617 | - $this->registerService(\OCP\Security\ICrypto::class, function (Server $c) { |
|
617 | + $this->registerService(\OCP\Security\ICrypto::class, function(Server $c) { |
|
618 | 618 | return new Crypto($c->getConfig(), $c->getSecureRandom()); |
619 | 619 | }); |
620 | 620 | $this->registerAlias('Crypto', \OCP\Security\ICrypto::class); |
621 | 621 | |
622 | - $this->registerService(\OCP\Security\IHasher::class, function (Server $c) { |
|
622 | + $this->registerService(\OCP\Security\IHasher::class, function(Server $c) { |
|
623 | 623 | return new Hasher($c->getConfig()); |
624 | 624 | }); |
625 | 625 | $this->registerAlias('Hasher', \OCP\Security\IHasher::class); |
626 | 626 | |
627 | - $this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) { |
|
627 | + $this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) { |
|
628 | 628 | return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection()); |
629 | 629 | }); |
630 | 630 | $this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class); |
631 | 631 | |
632 | - $this->registerService(IDBConnection::class, function (Server $c) { |
|
632 | + $this->registerService(IDBConnection::class, function(Server $c) { |
|
633 | 633 | $systemConfig = $c->getSystemConfig(); |
634 | 634 | $factory = new \OC\DB\ConnectionFactory($systemConfig); |
635 | 635 | $type = $systemConfig->getValue('dbtype', 'sqlite'); |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | $this->registerAlias('DatabaseConnection', IDBConnection::class); |
645 | 645 | |
646 | 646 | |
647 | - $this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) { |
|
647 | + $this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) { |
|
648 | 648 | $user = \OC_User::getUser(); |
649 | 649 | $uid = $user ? $user : null; |
650 | 650 | return new ClientService( |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | ); |
660 | 660 | }); |
661 | 661 | $this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class); |
662 | - $this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) { |
|
662 | + $this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) { |
|
663 | 663 | $eventLogger = new EventLogger(); |
664 | 664 | if ($c->getSystemConfig()->getValue('debug', false)) { |
665 | 665 | // In debug mode, module is being activated by default |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | }); |
670 | 670 | $this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class); |
671 | 671 | |
672 | - $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) { |
|
672 | + $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) { |
|
673 | 673 | $queryLogger = new QueryLogger(); |
674 | 674 | if ($c->getSystemConfig()->getValue('debug', false)) { |
675 | 675 | // In debug mode, module is being activated by default |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | }); |
680 | 680 | $this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class); |
681 | 681 | |
682 | - $this->registerService(TempManager::class, function (Server $c) { |
|
682 | + $this->registerService(TempManager::class, function(Server $c) { |
|
683 | 683 | return new TempManager( |
684 | 684 | $c->getLogger(), |
685 | 685 | $c->getConfig() |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | $this->registerAlias('TempManager', TempManager::class); |
689 | 689 | $this->registerAlias(ITempManager::class, TempManager::class); |
690 | 690 | |
691 | - $this->registerService(AppManager::class, function (Server $c) { |
|
691 | + $this->registerService(AppManager::class, function(Server $c) { |
|
692 | 692 | return new \OC\App\AppManager( |
693 | 693 | $c->getUserSession(), |
694 | 694 | $c->query(\OC\AppConfig::class), |
@@ -700,7 +700,7 @@ discard block |
||
700 | 700 | $this->registerAlias('AppManager', AppManager::class); |
701 | 701 | $this->registerAlias(IAppManager::class, AppManager::class); |
702 | 702 | |
703 | - $this->registerService(\OCP\IDateTimeZone::class, function (Server $c) { |
|
703 | + $this->registerService(\OCP\IDateTimeZone::class, function(Server $c) { |
|
704 | 704 | return new DateTimeZone( |
705 | 705 | $c->getConfig(), |
706 | 706 | $c->getSession() |
@@ -708,7 +708,7 @@ discard block |
||
708 | 708 | }); |
709 | 709 | $this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class); |
710 | 710 | |
711 | - $this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) { |
|
711 | + $this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) { |
|
712 | 712 | $language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null); |
713 | 713 | |
714 | 714 | return new DateTimeFormatter( |
@@ -718,7 +718,7 @@ discard block |
||
718 | 718 | }); |
719 | 719 | $this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class); |
720 | 720 | |
721 | - $this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) { |
|
721 | + $this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) { |
|
722 | 722 | $mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger()); |
723 | 723 | $listener = new UserMountCacheListener($mountCache); |
724 | 724 | $listener->listen($c->getUserManager()); |
@@ -726,7 +726,7 @@ discard block |
||
726 | 726 | }); |
727 | 727 | $this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class); |
728 | 728 | |
729 | - $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) { |
|
729 | + $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) { |
|
730 | 730 | $loader = \OC\Files\Filesystem::getLoader(); |
731 | 731 | $mountCache = $c->query('UserMountCache'); |
732 | 732 | $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
@@ -742,10 +742,10 @@ discard block |
||
742 | 742 | }); |
743 | 743 | $this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class); |
744 | 744 | |
745 | - $this->registerService('IniWrapper', function ($c) { |
|
745 | + $this->registerService('IniWrapper', function($c) { |
|
746 | 746 | return new IniGetWrapper(); |
747 | 747 | }); |
748 | - $this->registerService('AsyncCommandBus', function (Server $c) { |
|
748 | + $this->registerService('AsyncCommandBus', function(Server $c) { |
|
749 | 749 | $busClass = $c->getConfig()->getSystemValue('commandbus'); |
750 | 750 | if ($busClass) { |
751 | 751 | list($app, $class) = explode('::', $busClass, 2); |
@@ -760,10 +760,10 @@ discard block |
||
760 | 760 | return new CronBus($jobList); |
761 | 761 | } |
762 | 762 | }); |
763 | - $this->registerService('TrustedDomainHelper', function ($c) { |
|
763 | + $this->registerService('TrustedDomainHelper', function($c) { |
|
764 | 764 | return new TrustedDomainHelper($this->getConfig()); |
765 | 765 | }); |
766 | - $this->registerService(Throttler::class, function (Server $c) { |
|
766 | + $this->registerService(Throttler::class, function(Server $c) { |
|
767 | 767 | return new Throttler( |
768 | 768 | $c->getDatabaseConnection(), |
769 | 769 | new TimeFactory(), |
@@ -772,7 +772,7 @@ discard block |
||
772 | 772 | ); |
773 | 773 | }); |
774 | 774 | $this->registerAlias('Throttler', Throttler::class); |
775 | - $this->registerService('IntegrityCodeChecker', function (Server $c) { |
|
775 | + $this->registerService('IntegrityCodeChecker', function(Server $c) { |
|
776 | 776 | // IConfig and IAppManager requires a working database. This code |
777 | 777 | // might however be called when ownCloud is not yet setup. |
778 | 778 | if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | $c->getTempManager() |
794 | 794 | ); |
795 | 795 | }); |
796 | - $this->registerService(\OCP\IRequest::class, function ($c) { |
|
796 | + $this->registerService(\OCP\IRequest::class, function($c) { |
|
797 | 797 | if (isset($this['urlParams'])) { |
798 | 798 | $urlParams = $this['urlParams']; |
799 | 799 | } else { |
@@ -829,7 +829,7 @@ discard block |
||
829 | 829 | }); |
830 | 830 | $this->registerAlias('Request', \OCP\IRequest::class); |
831 | 831 | |
832 | - $this->registerService(\OCP\Mail\IMailer::class, function (Server $c) { |
|
832 | + $this->registerService(\OCP\Mail\IMailer::class, function(Server $c) { |
|
833 | 833 | return new Mailer( |
834 | 834 | $c->getConfig(), |
835 | 835 | $c->getLogger(), |
@@ -840,7 +840,7 @@ discard block |
||
840 | 840 | }); |
841 | 841 | $this->registerAlias('Mailer', \OCP\Mail\IMailer::class); |
842 | 842 | |
843 | - $this->registerService('LDAPProvider', function (Server $c) { |
|
843 | + $this->registerService('LDAPProvider', function(Server $c) { |
|
844 | 844 | $config = $c->getConfig(); |
845 | 845 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
846 | 846 | if (is_null($factoryClass)) { |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | $factory = new $factoryClass($this); |
851 | 851 | return $factory->getLDAPProvider(); |
852 | 852 | }); |
853 | - $this->registerService(ILockingProvider::class, function (Server $c) { |
|
853 | + $this->registerService(ILockingProvider::class, function(Server $c) { |
|
854 | 854 | $ini = $c->getIniWrapper(); |
855 | 855 | $config = $c->getConfig(); |
856 | 856 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -873,49 +873,49 @@ discard block |
||
873 | 873 | }); |
874 | 874 | $this->registerAlias('LockingProvider', ILockingProvider::class); |
875 | 875 | |
876 | - $this->registerService(\OCP\Files\Mount\IMountManager::class, function () { |
|
876 | + $this->registerService(\OCP\Files\Mount\IMountManager::class, function() { |
|
877 | 877 | return new \OC\Files\Mount\Manager(); |
878 | 878 | }); |
879 | 879 | $this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class); |
880 | 880 | |
881 | - $this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) { |
|
881 | + $this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) { |
|
882 | 882 | return new \OC\Files\Type\Detection( |
883 | 883 | $c->getURLGenerator(), |
884 | 884 | \OC::$configDir, |
885 | - \OC::$SERVERROOT . '/resources/config/' |
|
885 | + \OC::$SERVERROOT.'/resources/config/' |
|
886 | 886 | ); |
887 | 887 | }); |
888 | 888 | $this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class); |
889 | 889 | |
890 | - $this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) { |
|
890 | + $this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) { |
|
891 | 891 | return new \OC\Files\Type\Loader( |
892 | 892 | $c->getDatabaseConnection() |
893 | 893 | ); |
894 | 894 | }); |
895 | 895 | $this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class); |
896 | - $this->registerService(BundleFetcher::class, function () { |
|
896 | + $this->registerService(BundleFetcher::class, function() { |
|
897 | 897 | return new BundleFetcher($this->getL10N('lib')); |
898 | 898 | }); |
899 | - $this->registerService(\OCP\Notification\IManager::class, function (Server $c) { |
|
899 | + $this->registerService(\OCP\Notification\IManager::class, function(Server $c) { |
|
900 | 900 | return new Manager( |
901 | 901 | $c->query(IValidator::class) |
902 | 902 | ); |
903 | 903 | }); |
904 | 904 | $this->registerAlias('NotificationManager', \OCP\Notification\IManager::class); |
905 | 905 | |
906 | - $this->registerService(\OC\CapabilitiesManager::class, function (Server $c) { |
|
906 | + $this->registerService(\OC\CapabilitiesManager::class, function(Server $c) { |
|
907 | 907 | $manager = new \OC\CapabilitiesManager($c->getLogger()); |
908 | - $manager->registerCapability(function () use ($c) { |
|
908 | + $manager->registerCapability(function() use ($c) { |
|
909 | 909 | return new \OC\OCS\CoreCapabilities($c->getConfig()); |
910 | 910 | }); |
911 | - $manager->registerCapability(function () use ($c) { |
|
911 | + $manager->registerCapability(function() use ($c) { |
|
912 | 912 | return $c->query(\OC\Security\Bruteforce\Capabilities::class); |
913 | 913 | }); |
914 | 914 | return $manager; |
915 | 915 | }); |
916 | 916 | $this->registerAlias('CapabilitiesManager', \OC\CapabilitiesManager::class); |
917 | 917 | |
918 | - $this->registerService(\OCP\Comments\ICommentsManager::class, function (Server $c) { |
|
918 | + $this->registerService(\OCP\Comments\ICommentsManager::class, function(Server $c) { |
|
919 | 919 | $config = $c->getConfig(); |
920 | 920 | $factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class); |
921 | 921 | /** @var \OCP\Comments\ICommentsManagerFactory $factory */ |
@@ -925,7 +925,7 @@ discard block |
||
925 | 925 | $manager->registerDisplayNameResolver('user', function($id) use ($c) { |
926 | 926 | $manager = $c->getUserManager(); |
927 | 927 | $user = $manager->get($id); |
928 | - if(is_null($user)) { |
|
928 | + if (is_null($user)) { |
|
929 | 929 | $l = $c->getL10N('core'); |
930 | 930 | $displayName = $l->t('Unknown user'); |
931 | 931 | } else { |
@@ -938,7 +938,7 @@ discard block |
||
938 | 938 | }); |
939 | 939 | $this->registerAlias('CommentsManager', \OCP\Comments\ICommentsManager::class); |
940 | 940 | |
941 | - $this->registerService('ThemingDefaults', function (Server $c) { |
|
941 | + $this->registerService('ThemingDefaults', function(Server $c) { |
|
942 | 942 | /* |
943 | 943 | * Dark magic for autoloader. |
944 | 944 | * If we do a class_exists it will try to load the class which will |
@@ -966,7 +966,7 @@ discard block |
||
966 | 966 | } |
967 | 967 | return new \OC_Defaults(); |
968 | 968 | }); |
969 | - $this->registerService(SCSSCacher::class, function (Server $c) { |
|
969 | + $this->registerService(SCSSCacher::class, function(Server $c) { |
|
970 | 970 | return new SCSSCacher( |
971 | 971 | $c->getLogger(), |
972 | 972 | $c->query(\OC\Files\AppData\Factory::class), |
@@ -979,7 +979,7 @@ discard block |
||
979 | 979 | new TimeFactory() |
980 | 980 | ); |
981 | 981 | }); |
982 | - $this->registerService(JSCombiner::class, function (Server $c) { |
|
982 | + $this->registerService(JSCombiner::class, function(Server $c) { |
|
983 | 983 | return new JSCombiner( |
984 | 984 | $c->getAppDataDir('js'), |
985 | 985 | $c->getURLGenerator(), |
@@ -988,13 +988,13 @@ discard block |
||
988 | 988 | $c->getLogger() |
989 | 989 | ); |
990 | 990 | }); |
991 | - $this->registerService(EventDispatcher::class, function () { |
|
991 | + $this->registerService(EventDispatcher::class, function() { |
|
992 | 992 | return new EventDispatcher(); |
993 | 993 | }); |
994 | 994 | $this->registerAlias('EventDispatcher', EventDispatcher::class); |
995 | 995 | $this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class); |
996 | 996 | |
997 | - $this->registerService('CryptoWrapper', function (Server $c) { |
|
997 | + $this->registerService('CryptoWrapper', function(Server $c) { |
|
998 | 998 | // FIXME: Instantiiated here due to cyclic dependency |
999 | 999 | $request = new Request( |
1000 | 1000 | [ |
@@ -1019,7 +1019,7 @@ discard block |
||
1019 | 1019 | $request |
1020 | 1020 | ); |
1021 | 1021 | }); |
1022 | - $this->registerService('CsrfTokenManager', function (Server $c) { |
|
1022 | + $this->registerService('CsrfTokenManager', function(Server $c) { |
|
1023 | 1023 | $tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom()); |
1024 | 1024 | |
1025 | 1025 | return new CsrfTokenManager( |
@@ -1027,22 +1027,22 @@ discard block |
||
1027 | 1027 | $c->query(SessionStorage::class) |
1028 | 1028 | ); |
1029 | 1029 | }); |
1030 | - $this->registerService(SessionStorage::class, function (Server $c) { |
|
1030 | + $this->registerService(SessionStorage::class, function(Server $c) { |
|
1031 | 1031 | return new SessionStorage($c->getSession()); |
1032 | 1032 | }); |
1033 | - $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) { |
|
1033 | + $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) { |
|
1034 | 1034 | return new ContentSecurityPolicyManager(); |
1035 | 1035 | }); |
1036 | 1036 | $this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class); |
1037 | 1037 | |
1038 | - $this->registerService('ContentSecurityPolicyNonceManager', function (Server $c) { |
|
1038 | + $this->registerService('ContentSecurityPolicyNonceManager', function(Server $c) { |
|
1039 | 1039 | return new ContentSecurityPolicyNonceManager( |
1040 | 1040 | $c->getCsrfTokenManager(), |
1041 | 1041 | $c->getRequest() |
1042 | 1042 | ); |
1043 | 1043 | }); |
1044 | 1044 | |
1045 | - $this->registerService(\OCP\Share\IManager::class, function (Server $c) { |
|
1045 | + $this->registerService(\OCP\Share\IManager::class, function(Server $c) { |
|
1046 | 1046 | $config = $c->getConfig(); |
1047 | 1047 | $factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class); |
1048 | 1048 | /** @var \OCP\Share\IProviderFactory $factory */ |
@@ -1089,7 +1089,7 @@ discard block |
||
1089 | 1089 | |
1090 | 1090 | $this->registerAlias(\OCP\Collaboration\Resources\IManager::class, \OC\Collaboration\Resources\Manager::class); |
1091 | 1091 | |
1092 | - $this->registerService('SettingsManager', function (Server $c) { |
|
1092 | + $this->registerService('SettingsManager', function(Server $c) { |
|
1093 | 1093 | $manager = new \OC\Settings\Manager( |
1094 | 1094 | $c->getLogger(), |
1095 | 1095 | $c->getL10N('lib'), |
@@ -1098,36 +1098,36 @@ discard block |
||
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 | - $this->registerService(IConfig::class, function (Server $c) { |
|
1122 | + $this->registerService(IConfig::class, function(Server $c) { |
|
1123 | 1123 | return new GlobalScale\Config($c->getConfig()); |
1124 | 1124 | }); |
1125 | 1125 | |
1126 | - $this->registerService(ICloudFederationProviderManager::class, function (Server $c) { |
|
1126 | + $this->registerService(ICloudFederationProviderManager::class, function(Server $c) { |
|
1127 | 1127 | return new CloudFederationProviderManager($c->getAppManager(), $c->getHTTPClientService(), $c->getCloudIdManager(), $c->getLogger()); |
1128 | 1128 | }); |
1129 | 1129 | |
1130 | - $this->registerService(ICloudFederationFactory::class, function (Server $c) { |
|
1130 | + $this->registerService(ICloudFederationFactory::class, function(Server $c) { |
|
1131 | 1131 | return new CloudFederationFactory(); |
1132 | 1132 | }); |
1133 | 1133 | |
@@ -1137,18 +1137,18 @@ discard block |
||
1137 | 1137 | $this->registerAlias(\OCP\AppFramework\Utility\ITimeFactory::class, \OC\AppFramework\Utility\TimeFactory::class); |
1138 | 1138 | $this->registerAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class); |
1139 | 1139 | |
1140 | - $this->registerService(Defaults::class, function (Server $c) { |
|
1140 | + $this->registerService(Defaults::class, function(Server $c) { |
|
1141 | 1141 | return new Defaults( |
1142 | 1142 | $c->getThemingDefaults() |
1143 | 1143 | ); |
1144 | 1144 | }); |
1145 | 1145 | $this->registerAlias('Defaults', \OCP\Defaults::class); |
1146 | 1146 | |
1147 | - $this->registerService(\OCP\ISession::class, function (SimpleContainer $c) { |
|
1147 | + $this->registerService(\OCP\ISession::class, function(SimpleContainer $c) { |
|
1148 | 1148 | return $c->query(\OCP\IUserSession::class)->getSession(); |
1149 | 1149 | }); |
1150 | 1150 | |
1151 | - $this->registerService(IShareHelper::class, function (Server $c) { |
|
1151 | + $this->registerService(IShareHelper::class, function(Server $c) { |
|
1152 | 1152 | return new ShareHelper( |
1153 | 1153 | $c->query(\OCP\Share\IManager::class) |
1154 | 1154 | ); |
@@ -1191,7 +1191,7 @@ discard block |
||
1191 | 1191 | $this->registerAlias(IDashboardManager::class, DashboardManager::class); |
1192 | 1192 | $this->registerAlias(IFullTextSearchManager::class, FullTextSearchManager::class); |
1193 | 1193 | |
1194 | - $this->registerService(\OC\Security\IdentityProof\Manager::class, function (Server $c) { |
|
1194 | + $this->registerService(\OC\Security\IdentityProof\Manager::class, function(Server $c) { |
|
1195 | 1195 | return new \OC\Security\IdentityProof\Manager( |
1196 | 1196 | $c->query(\OC\Files\AppData\Factory::class), |
1197 | 1197 | $c->getCrypto(), |
@@ -1244,11 +1244,11 @@ discard block |
||
1244 | 1244 | // no avatar to remove |
1245 | 1245 | } catch (\Exception $e) { |
1246 | 1246 | // Ignore exceptions |
1247 | - $logger->info('Could not cleanup avatar of ' . $user->getUID()); |
|
1247 | + $logger->info('Could not cleanup avatar of '.$user->getUID()); |
|
1248 | 1248 | } |
1249 | 1249 | }); |
1250 | 1250 | |
1251 | - $dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) { |
|
1251 | + $dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) { |
|
1252 | 1252 | $manager = $this->getAvatarManager(); |
1253 | 1253 | /** @var IUser $user */ |
1254 | 1254 | $user = $e->getSubject(); |
@@ -1404,7 +1404,7 @@ discard block |
||
1404 | 1404 | * @deprecated since 9.2.0 use IAppData |
1405 | 1405 | */ |
1406 | 1406 | public function getAppFolder() { |
1407 | - $dir = '/' . \OC_App::getCurrentApp(); |
|
1407 | + $dir = '/'.\OC_App::getCurrentApp(); |
|
1408 | 1408 | $root = $this->getRootFolder(); |
1409 | 1409 | if (!$root->nodeExists($dir)) { |
1410 | 1410 | $folder = $root->newFolder($dir); |
@@ -1979,7 +1979,7 @@ discard block |
||
1979 | 1979 | /** |
1980 | 1980 | * @return \OCP\Collaboration\AutoComplete\IManager |
1981 | 1981 | */ |
1982 | - public function getAutoCompleteManager(){ |
|
1982 | + public function getAutoCompleteManager() { |
|
1983 | 1983 | return $this->query(IManager::class); |
1984 | 1984 | } |
1985 | 1985 |