@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | // To find out if we are running from CLI or not |
175 | 175 | $this->registerParameter('isCLI', \OC::$CLI); |
176 | 176 | |
177 | - $this->registerService(\OCP\IServerContainer::class, function (IServerContainer $c) { |
|
177 | + $this->registerService(\OCP\IServerContainer::class, function(IServerContainer $c) { |
|
178 | 178 | return $c; |
179 | 179 | }); |
180 | 180 | |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $this->registerAlias(IActionFactory::class, ActionFactory::class); |
194 | 194 | |
195 | 195 | |
196 | - $this->registerService(\OCP\IPreview::class, function (Server $c) { |
|
196 | + $this->registerService(\OCP\IPreview::class, function(Server $c) { |
|
197 | 197 | return new PreviewManager( |
198 | 198 | $c->getConfig(), |
199 | 199 | $c->getRootFolder(), |
@@ -204,13 +204,13 @@ discard block |
||
204 | 204 | }); |
205 | 205 | $this->registerAlias('PreviewManager', \OCP\IPreview::class); |
206 | 206 | |
207 | - $this->registerService(\OC\Preview\Watcher::class, function (Server $c) { |
|
207 | + $this->registerService(\OC\Preview\Watcher::class, function(Server $c) { |
|
208 | 208 | return new \OC\Preview\Watcher( |
209 | 209 | $c->getAppDataDir('preview') |
210 | 210 | ); |
211 | 211 | }); |
212 | 212 | |
213 | - $this->registerService('EncryptionManager', function (Server $c) { |
|
213 | + $this->registerService('EncryptionManager', function(Server $c) { |
|
214 | 214 | $view = new View(); |
215 | 215 | $util = new Encryption\Util( |
216 | 216 | $view, |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | ); |
229 | 229 | }); |
230 | 230 | |
231 | - $this->registerService('EncryptionFileHelper', function (Server $c) { |
|
231 | + $this->registerService('EncryptionFileHelper', function(Server $c) { |
|
232 | 232 | $util = new Encryption\Util( |
233 | 233 | new View(), |
234 | 234 | $c->getUserManager(), |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | ); |
243 | 243 | }); |
244 | 244 | |
245 | - $this->registerService('EncryptionKeyStorage', function (Server $c) { |
|
245 | + $this->registerService('EncryptionKeyStorage', function(Server $c) { |
|
246 | 246 | $view = new View(); |
247 | 247 | $util = new Encryption\Util( |
248 | 248 | $view, |
@@ -253,30 +253,30 @@ discard block |
||
253 | 253 | |
254 | 254 | return new Encryption\Keys\Storage($view, $util); |
255 | 255 | }); |
256 | - $this->registerService('TagMapper', function (Server $c) { |
|
256 | + $this->registerService('TagMapper', function(Server $c) { |
|
257 | 257 | return new TagMapper($c->getDatabaseConnection()); |
258 | 258 | }); |
259 | 259 | |
260 | - $this->registerService(\OCP\ITagManager::class, function (Server $c) { |
|
260 | + $this->registerService(\OCP\ITagManager::class, function(Server $c) { |
|
261 | 261 | $tagMapper = $c->query('TagMapper'); |
262 | 262 | return new TagManager($tagMapper, $c->getUserSession()); |
263 | 263 | }); |
264 | 264 | $this->registerAlias('TagManager', \OCP\ITagManager::class); |
265 | 265 | |
266 | - $this->registerService('SystemTagManagerFactory', function (Server $c) { |
|
266 | + $this->registerService('SystemTagManagerFactory', function(Server $c) { |
|
267 | 267 | $config = $c->getConfig(); |
268 | 268 | $factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class); |
269 | 269 | return new $factoryClass($this); |
270 | 270 | }); |
271 | - $this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) { |
|
271 | + $this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) { |
|
272 | 272 | return $c->query('SystemTagManagerFactory')->getManager(); |
273 | 273 | }); |
274 | 274 | $this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class); |
275 | 275 | |
276 | - $this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) { |
|
276 | + $this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) { |
|
277 | 277 | return $c->query('SystemTagManagerFactory')->getObjectMapper(); |
278 | 278 | }); |
279 | - $this->registerService('RootFolder', function (Server $c) { |
|
279 | + $this->registerService('RootFolder', function(Server $c) { |
|
280 | 280 | $manager = \OC\Files\Filesystem::getMountManager(null); |
281 | 281 | $view = new View(); |
282 | 282 | $root = new Root( |
@@ -297,38 +297,38 @@ discard block |
||
297 | 297 | }); |
298 | 298 | $this->registerAlias('SystemTagObjectMapper', \OCP\SystemTag\ISystemTagObjectMapper::class); |
299 | 299 | |
300 | - $this->registerService(\OCP\Files\IRootFolder::class, function (Server $c) { |
|
301 | - return new LazyRoot(function () use ($c) { |
|
300 | + $this->registerService(\OCP\Files\IRootFolder::class, function(Server $c) { |
|
301 | + return new LazyRoot(function() use ($c) { |
|
302 | 302 | return $c->query('RootFolder'); |
303 | 303 | }); |
304 | 304 | }); |
305 | 305 | $this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class); |
306 | 306 | |
307 | - $this->registerService(\OC\User\Manager::class, function (Server $c) { |
|
307 | + $this->registerService(\OC\User\Manager::class, function(Server $c) { |
|
308 | 308 | $config = $c->getConfig(); |
309 | 309 | return new \OC\User\Manager($config); |
310 | 310 | }); |
311 | 311 | $this->registerAlias('UserManager', \OC\User\Manager::class); |
312 | 312 | $this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class); |
313 | 313 | |
314 | - $this->registerService(\OCP\IGroupManager::class, function (Server $c) { |
|
314 | + $this->registerService(\OCP\IGroupManager::class, function(Server $c) { |
|
315 | 315 | $groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger()); |
316 | - $groupManager->listen('\OC\Group', 'preCreate', function ($gid) { |
|
316 | + $groupManager->listen('\OC\Group', 'preCreate', function($gid) { |
|
317 | 317 | \OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid)); |
318 | 318 | }); |
319 | - $groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) { |
|
319 | + $groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) { |
|
320 | 320 | \OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID())); |
321 | 321 | }); |
322 | - $groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { |
|
322 | + $groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) { |
|
323 | 323 | \OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID())); |
324 | 324 | }); |
325 | - $groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { |
|
325 | + $groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) { |
|
326 | 326 | \OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID())); |
327 | 327 | }); |
328 | - $groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
328 | + $groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
329 | 329 | \OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID())); |
330 | 330 | }); |
331 | - $groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
331 | + $groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
332 | 332 | \OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
333 | 333 | //Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks |
334 | 334 | \OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | }); |
338 | 338 | $this->registerAlias('GroupManager', \OCP\IGroupManager::class); |
339 | 339 | |
340 | - $this->registerService(Store::class, function (Server $c) { |
|
340 | + $this->registerService(Store::class, function(Server $c) { |
|
341 | 341 | $session = $c->getSession(); |
342 | 342 | if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
343 | 343 | $tokenProvider = $c->query(IProvider::class); |
@@ -348,13 +348,13 @@ discard block |
||
348 | 348 | return new Store($session, $logger, $tokenProvider); |
349 | 349 | }); |
350 | 350 | $this->registerAlias(IStore::class, Store::class); |
351 | - $this->registerService(Authentication\Token\DefaultTokenMapper::class, function (Server $c) { |
|
351 | + $this->registerService(Authentication\Token\DefaultTokenMapper::class, function(Server $c) { |
|
352 | 352 | $dbConnection = $c->getDatabaseConnection(); |
353 | 353 | return new Authentication\Token\DefaultTokenMapper($dbConnection); |
354 | 354 | }); |
355 | 355 | $this->registerAlias(IProvider::class, Authentication\Token\Manager::class); |
356 | 356 | |
357 | - $this->registerService(\OCP\IUserSession::class, function (Server $c) { |
|
357 | + $this->registerService(\OCP\IUserSession::class, function(Server $c) { |
|
358 | 358 | $manager = $c->getUserManager(); |
359 | 359 | $session = new \OC\Session\Memory(''); |
360 | 360 | $timeFactory = new TimeFactory(); |
@@ -378,45 +378,45 @@ discard block |
||
378 | 378 | $c->getLockdownManager(), |
379 | 379 | $c->getLogger() |
380 | 380 | ); |
381 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
381 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
382 | 382 | \OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password)); |
383 | 383 | }); |
384 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
384 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
385 | 385 | /** @var $user \OC\User\User */ |
386 | 386 | \OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password)); |
387 | 387 | }); |
388 | - $userSession->listen('\OC\User', 'preDelete', function ($user) use ($dispatcher) { |
|
388 | + $userSession->listen('\OC\User', 'preDelete', function($user) use ($dispatcher) { |
|
389 | 389 | /** @var $user \OC\User\User */ |
390 | 390 | \OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID())); |
391 | 391 | $dispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user)); |
392 | 392 | }); |
393 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
393 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
394 | 394 | /** @var $user \OC\User\User */ |
395 | 395 | \OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID())); |
396 | 396 | }); |
397 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
397 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
398 | 398 | /** @var $user \OC\User\User */ |
399 | 399 | \OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
400 | 400 | }); |
401 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
401 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
402 | 402 | /** @var $user \OC\User\User */ |
403 | 403 | \OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
404 | 404 | }); |
405 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
405 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
406 | 406 | \OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password)); |
407 | 407 | }); |
408 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $password) { |
|
408 | + $userSession->listen('\OC\User', 'postLogin', function($user, $password) { |
|
409 | 409 | /** @var $user \OC\User\User */ |
410 | 410 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
411 | 411 | }); |
412 | - $userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) { |
|
412 | + $userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) { |
|
413 | 413 | /** @var $user \OC\User\User */ |
414 | 414 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
415 | 415 | }); |
416 | - $userSession->listen('\OC\User', 'logout', function () { |
|
416 | + $userSession->listen('\OC\User', 'logout', function() { |
|
417 | 417 | \OC_Hook::emit('OC_User', 'logout', array()); |
418 | 418 | }); |
419 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) use ($dispatcher) { |
|
419 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) use ($dispatcher) { |
|
420 | 420 | /** @var $user \OC\User\User */ |
421 | 421 | \OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue)); |
422 | 422 | $dispatcher->dispatch('OCP\IUser::changeUser', new GenericEvent($user, ['feature' => $feature, 'oldValue' => $oldValue, 'value' => $value])); |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | $this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class); |
431 | 431 | $this->registerAlias('NavigationManager', \OCP\INavigationManager::class); |
432 | 432 | |
433 | - $this->registerService(\OC\AllConfig::class, function (Server $c) { |
|
433 | + $this->registerService(\OC\AllConfig::class, function(Server $c) { |
|
434 | 434 | return new \OC\AllConfig( |
435 | 435 | $c->getSystemConfig() |
436 | 436 | ); |
@@ -438,17 +438,17 @@ discard block |
||
438 | 438 | $this->registerAlias('AllConfig', \OC\AllConfig::class); |
439 | 439 | $this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class); |
440 | 440 | |
441 | - $this->registerService('SystemConfig', function ($c) use ($config) { |
|
441 | + $this->registerService('SystemConfig', function($c) use ($config) { |
|
442 | 442 | return new \OC\SystemConfig($config); |
443 | 443 | }); |
444 | 444 | |
445 | - $this->registerService(\OC\AppConfig::class, function (Server $c) { |
|
445 | + $this->registerService(\OC\AppConfig::class, function(Server $c) { |
|
446 | 446 | return new \OC\AppConfig($c->getDatabaseConnection()); |
447 | 447 | }); |
448 | 448 | $this->registerAlias('AppConfig', \OC\AppConfig::class); |
449 | 449 | $this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class); |
450 | 450 | |
451 | - $this->registerService(\OCP\L10N\IFactory::class, function (Server $c) { |
|
451 | + $this->registerService(\OCP\L10N\IFactory::class, function(Server $c) { |
|
452 | 452 | return new \OC\L10N\Factory( |
453 | 453 | $c->getConfig(), |
454 | 454 | $c->getRequest(), |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | }); |
459 | 459 | $this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class); |
460 | 460 | |
461 | - $this->registerService(\OCP\IURLGenerator::class, function (Server $c) { |
|
461 | + $this->registerService(\OCP\IURLGenerator::class, function(Server $c) { |
|
462 | 462 | $config = $c->getConfig(); |
463 | 463 | $cacheFactory = $c->getMemCacheFactory(); |
464 | 464 | $request = $c->getRequest(); |
@@ -473,12 +473,12 @@ discard block |
||
473 | 473 | $this->registerAlias('AppFetcher', AppFetcher::class); |
474 | 474 | $this->registerAlias('CategoryFetcher', CategoryFetcher::class); |
475 | 475 | |
476 | - $this->registerService(\OCP\ICache::class, function ($c) { |
|
476 | + $this->registerService(\OCP\ICache::class, function($c) { |
|
477 | 477 | return new Cache\File(); |
478 | 478 | }); |
479 | 479 | $this->registerAlias('UserCache', \OCP\ICache::class); |
480 | 480 | |
481 | - $this->registerService(Factory::class, function (Server $c) { |
|
481 | + $this->registerService(Factory::class, function(Server $c) { |
|
482 | 482 | |
483 | 483 | $arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(), |
484 | 484 | ArrayCache::class, |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | $version = implode(',', $v); |
496 | 496 | $instanceId = \OC_Util::getInstanceId(); |
497 | 497 | $path = \OC::$SERVERROOT; |
498 | - $prefix = md5($instanceId . '-' . $version . '-' . $path); |
|
498 | + $prefix = md5($instanceId.'-'.$version.'-'.$path); |
|
499 | 499 | return new \OC\Memcache\Factory($prefix, $c->getLogger(), |
500 | 500 | $config->getSystemValue('memcache.local', null), |
501 | 501 | $config->getSystemValue('memcache.distributed', null), |
@@ -508,12 +508,12 @@ discard block |
||
508 | 508 | $this->registerAlias('MemCacheFactory', Factory::class); |
509 | 509 | $this->registerAlias(ICacheFactory::class, Factory::class); |
510 | 510 | |
511 | - $this->registerService('RedisFactory', function (Server $c) { |
|
511 | + $this->registerService('RedisFactory', function(Server $c) { |
|
512 | 512 | $systemConfig = $c->getSystemConfig(); |
513 | 513 | return new RedisFactory($systemConfig); |
514 | 514 | }); |
515 | 515 | |
516 | - $this->registerService(\OCP\Activity\IManager::class, function (Server $c) { |
|
516 | + $this->registerService(\OCP\Activity\IManager::class, function(Server $c) { |
|
517 | 517 | return new \OC\Activity\Manager( |
518 | 518 | $c->getRequest(), |
519 | 519 | $c->getUserSession(), |
@@ -523,14 +523,14 @@ discard block |
||
523 | 523 | }); |
524 | 524 | $this->registerAlias('ActivityManager', \OCP\Activity\IManager::class); |
525 | 525 | |
526 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
526 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
527 | 527 | return new \OC\Activity\EventMerger( |
528 | 528 | $c->getL10N('lib') |
529 | 529 | ); |
530 | 530 | }); |
531 | 531 | $this->registerAlias(IValidator::class, Validator::class); |
532 | 532 | |
533 | - $this->registerService(\OCP\IAvatarManager::class, function (Server $c) { |
|
533 | + $this->registerService(\OCP\IAvatarManager::class, function(Server $c) { |
|
534 | 534 | return new AvatarManager( |
535 | 535 | $c->query(\OC\User\Manager::class), |
536 | 536 | $c->getAppDataDir('avatar'), |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | |
544 | 544 | $this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class); |
545 | 545 | |
546 | - $this->registerService(\OCP\ILogger::class, function (Server $c) { |
|
546 | + $this->registerService(\OCP\ILogger::class, function(Server $c) { |
|
547 | 547 | $logType = $c->query('AllConfig')->getSystemValue('log_type', 'file'); |
548 | 548 | $factory = new LogFactory($c, $this->getSystemConfig()); |
549 | 549 | $logger = $factory->get($logType); |
@@ -553,11 +553,11 @@ discard block |
||
553 | 553 | }); |
554 | 554 | $this->registerAlias('Logger', \OCP\ILogger::class); |
555 | 555 | |
556 | - $this->registerService(ILogFactory::class, function (Server $c) { |
|
556 | + $this->registerService(ILogFactory::class, function(Server $c) { |
|
557 | 557 | return new LogFactory($c, $this->getSystemConfig()); |
558 | 558 | }); |
559 | 559 | |
560 | - $this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) { |
|
560 | + $this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) { |
|
561 | 561 | $config = $c->getConfig(); |
562 | 562 | return new \OC\BackgroundJob\JobList( |
563 | 563 | $c->getDatabaseConnection(), |
@@ -567,7 +567,7 @@ discard block |
||
567 | 567 | }); |
568 | 568 | $this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class); |
569 | 569 | |
570 | - $this->registerService(\OCP\Route\IRouter::class, function (Server $c) { |
|
570 | + $this->registerService(\OCP\Route\IRouter::class, function(Server $c) { |
|
571 | 571 | $cacheFactory = $c->getMemCacheFactory(); |
572 | 572 | $logger = $c->getLogger(); |
573 | 573 | if ($cacheFactory->isLocalCacheAvailable()) { |
@@ -579,12 +579,12 @@ discard block |
||
579 | 579 | }); |
580 | 580 | $this->registerAlias('Router', \OCP\Route\IRouter::class); |
581 | 581 | |
582 | - $this->registerService(\OCP\ISearch::class, function ($c) { |
|
582 | + $this->registerService(\OCP\ISearch::class, function($c) { |
|
583 | 583 | return new Search(); |
584 | 584 | }); |
585 | 585 | $this->registerAlias('Search', \OCP\ISearch::class); |
586 | 586 | |
587 | - $this->registerService(\OC\Security\RateLimiting\Limiter::class, function (Server $c) { |
|
587 | + $this->registerService(\OC\Security\RateLimiting\Limiter::class, function(Server $c) { |
|
588 | 588 | return new \OC\Security\RateLimiting\Limiter( |
589 | 589 | $this->getUserSession(), |
590 | 590 | $this->getRequest(), |
@@ -592,34 +592,34 @@ discard block |
||
592 | 592 | $c->query(\OC\Security\RateLimiting\Backend\IBackend::class) |
593 | 593 | ); |
594 | 594 | }); |
595 | - $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) { |
|
595 | + $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) { |
|
596 | 596 | return new \OC\Security\RateLimiting\Backend\MemoryCache( |
597 | 597 | $this->getMemCacheFactory(), |
598 | 598 | new \OC\AppFramework\Utility\TimeFactory() |
599 | 599 | ); |
600 | 600 | }); |
601 | 601 | |
602 | - $this->registerService(\OCP\Security\ISecureRandom::class, function ($c) { |
|
602 | + $this->registerService(\OCP\Security\ISecureRandom::class, function($c) { |
|
603 | 603 | return new SecureRandom(); |
604 | 604 | }); |
605 | 605 | $this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class); |
606 | 606 | |
607 | - $this->registerService(\OCP\Security\ICrypto::class, function (Server $c) { |
|
607 | + $this->registerService(\OCP\Security\ICrypto::class, function(Server $c) { |
|
608 | 608 | return new Crypto($c->getConfig(), $c->getSecureRandom()); |
609 | 609 | }); |
610 | 610 | $this->registerAlias('Crypto', \OCP\Security\ICrypto::class); |
611 | 611 | |
612 | - $this->registerService(\OCP\Security\IHasher::class, function (Server $c) { |
|
612 | + $this->registerService(\OCP\Security\IHasher::class, function(Server $c) { |
|
613 | 613 | return new Hasher($c->getConfig()); |
614 | 614 | }); |
615 | 615 | $this->registerAlias('Hasher', \OCP\Security\IHasher::class); |
616 | 616 | |
617 | - $this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) { |
|
617 | + $this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) { |
|
618 | 618 | return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection()); |
619 | 619 | }); |
620 | 620 | $this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class); |
621 | 621 | |
622 | - $this->registerService(IDBConnection::class, function (Server $c) { |
|
622 | + $this->registerService(IDBConnection::class, function(Server $c) { |
|
623 | 623 | $systemConfig = $c->getSystemConfig(); |
624 | 624 | $factory = new \OC\DB\ConnectionFactory($systemConfig); |
625 | 625 | $type = $systemConfig->getValue('dbtype', 'sqlite'); |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | $this->registerAlias('DatabaseConnection', IDBConnection::class); |
635 | 635 | |
636 | 636 | |
637 | - $this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) { |
|
637 | + $this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) { |
|
638 | 638 | $user = \OC_User::getUser(); |
639 | 639 | $uid = $user ? $user : null; |
640 | 640 | return new ClientService( |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | ); |
650 | 650 | }); |
651 | 651 | $this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class); |
652 | - $this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) { |
|
652 | + $this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) { |
|
653 | 653 | $eventLogger = new EventLogger(); |
654 | 654 | if ($c->getSystemConfig()->getValue('debug', false)) { |
655 | 655 | // In debug mode, module is being activated by default |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | }); |
660 | 660 | $this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class); |
661 | 661 | |
662 | - $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) { |
|
662 | + $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) { |
|
663 | 663 | $queryLogger = new QueryLogger(); |
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('QueryLogger', \OCP\Diagnostics\IQueryLogger::class); |
671 | 671 | |
672 | - $this->registerService(TempManager::class, function (Server $c) { |
|
672 | + $this->registerService(TempManager::class, function(Server $c) { |
|
673 | 673 | return new TempManager( |
674 | 674 | $c->getLogger(), |
675 | 675 | $c->getConfig() |
@@ -678,7 +678,7 @@ discard block |
||
678 | 678 | $this->registerAlias('TempManager', TempManager::class); |
679 | 679 | $this->registerAlias(ITempManager::class, TempManager::class); |
680 | 680 | |
681 | - $this->registerService(AppManager::class, function (Server $c) { |
|
681 | + $this->registerService(AppManager::class, function(Server $c) { |
|
682 | 682 | return new \OC\App\AppManager( |
683 | 683 | $c->getUserSession(), |
684 | 684 | $c->query(\OC\AppConfig::class), |
@@ -690,7 +690,7 @@ discard block |
||
690 | 690 | $this->registerAlias('AppManager', AppManager::class); |
691 | 691 | $this->registerAlias(IAppManager::class, AppManager::class); |
692 | 692 | |
693 | - $this->registerService(\OCP\IDateTimeZone::class, function (Server $c) { |
|
693 | + $this->registerService(\OCP\IDateTimeZone::class, function(Server $c) { |
|
694 | 694 | return new DateTimeZone( |
695 | 695 | $c->getConfig(), |
696 | 696 | $c->getSession() |
@@ -698,7 +698,7 @@ discard block |
||
698 | 698 | }); |
699 | 699 | $this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class); |
700 | 700 | |
701 | - $this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) { |
|
701 | + $this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) { |
|
702 | 702 | $language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null); |
703 | 703 | |
704 | 704 | return new DateTimeFormatter( |
@@ -708,7 +708,7 @@ discard block |
||
708 | 708 | }); |
709 | 709 | $this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class); |
710 | 710 | |
711 | - $this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) { |
|
711 | + $this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) { |
|
712 | 712 | $mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger()); |
713 | 713 | $listener = new UserMountCacheListener($mountCache); |
714 | 714 | $listener->listen($c->getUserManager()); |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | }); |
717 | 717 | $this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class); |
718 | 718 | |
719 | - $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) { |
|
719 | + $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) { |
|
720 | 720 | $loader = \OC\Files\Filesystem::getLoader(); |
721 | 721 | $mountCache = $c->query('UserMountCache'); |
722 | 722 | $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
@@ -732,10 +732,10 @@ discard block |
||
732 | 732 | }); |
733 | 733 | $this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class); |
734 | 734 | |
735 | - $this->registerService('IniWrapper', function ($c) { |
|
735 | + $this->registerService('IniWrapper', function($c) { |
|
736 | 736 | return new IniGetWrapper(); |
737 | 737 | }); |
738 | - $this->registerService('AsyncCommandBus', function (Server $c) { |
|
738 | + $this->registerService('AsyncCommandBus', function(Server $c) { |
|
739 | 739 | $busClass = $c->getConfig()->getSystemValue('commandbus'); |
740 | 740 | if ($busClass) { |
741 | 741 | list($app, $class) = explode('::', $busClass, 2); |
@@ -750,10 +750,10 @@ discard block |
||
750 | 750 | return new CronBus($jobList); |
751 | 751 | } |
752 | 752 | }); |
753 | - $this->registerService('TrustedDomainHelper', function ($c) { |
|
753 | + $this->registerService('TrustedDomainHelper', function($c) { |
|
754 | 754 | return new TrustedDomainHelper($this->getConfig()); |
755 | 755 | }); |
756 | - $this->registerService('Throttler', function (Server $c) { |
|
756 | + $this->registerService('Throttler', function(Server $c) { |
|
757 | 757 | return new Throttler( |
758 | 758 | $c->getDatabaseConnection(), |
759 | 759 | new TimeFactory(), |
@@ -761,7 +761,7 @@ discard block |
||
761 | 761 | $c->getConfig() |
762 | 762 | ); |
763 | 763 | }); |
764 | - $this->registerService('IntegrityCodeChecker', function (Server $c) { |
|
764 | + $this->registerService('IntegrityCodeChecker', function(Server $c) { |
|
765 | 765 | // IConfig and IAppManager requires a working database. This code |
766 | 766 | // might however be called when ownCloud is not yet setup. |
767 | 767 | if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
@@ -782,7 +782,7 @@ discard block |
||
782 | 782 | $c->getTempManager() |
783 | 783 | ); |
784 | 784 | }); |
785 | - $this->registerService(\OCP\IRequest::class, function ($c) { |
|
785 | + $this->registerService(\OCP\IRequest::class, function($c) { |
|
786 | 786 | if (isset($this['urlParams'])) { |
787 | 787 | $urlParams = $this['urlParams']; |
788 | 788 | } else { |
@@ -818,7 +818,7 @@ discard block |
||
818 | 818 | }); |
819 | 819 | $this->registerAlias('Request', \OCP\IRequest::class); |
820 | 820 | |
821 | - $this->registerService(\OCP\Mail\IMailer::class, function (Server $c) { |
|
821 | + $this->registerService(\OCP\Mail\IMailer::class, function(Server $c) { |
|
822 | 822 | return new Mailer( |
823 | 823 | $c->getConfig(), |
824 | 824 | $c->getLogger(), |
@@ -829,7 +829,7 @@ discard block |
||
829 | 829 | }); |
830 | 830 | $this->registerAlias('Mailer', \OCP\Mail\IMailer::class); |
831 | 831 | |
832 | - $this->registerService('LDAPProvider', function (Server $c) { |
|
832 | + $this->registerService('LDAPProvider', function(Server $c) { |
|
833 | 833 | $config = $c->getConfig(); |
834 | 834 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
835 | 835 | if (is_null($factoryClass)) { |
@@ -839,7 +839,7 @@ discard block |
||
839 | 839 | $factory = new $factoryClass($this); |
840 | 840 | return $factory->getLDAPProvider(); |
841 | 841 | }); |
842 | - $this->registerService(ILockingProvider::class, function (Server $c) { |
|
842 | + $this->registerService(ILockingProvider::class, function(Server $c) { |
|
843 | 843 | $ini = $c->getIniWrapper(); |
844 | 844 | $config = $c->getConfig(); |
845 | 845 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -862,49 +862,49 @@ discard block |
||
862 | 862 | }); |
863 | 863 | $this->registerAlias('LockingProvider', ILockingProvider::class); |
864 | 864 | |
865 | - $this->registerService(\OCP\Files\Mount\IMountManager::class, function () { |
|
865 | + $this->registerService(\OCP\Files\Mount\IMountManager::class, function() { |
|
866 | 866 | return new \OC\Files\Mount\Manager(); |
867 | 867 | }); |
868 | 868 | $this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class); |
869 | 869 | |
870 | - $this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) { |
|
870 | + $this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) { |
|
871 | 871 | return new \OC\Files\Type\Detection( |
872 | 872 | $c->getURLGenerator(), |
873 | 873 | \OC::$configDir, |
874 | - \OC::$SERVERROOT . '/resources/config/' |
|
874 | + \OC::$SERVERROOT.'/resources/config/' |
|
875 | 875 | ); |
876 | 876 | }); |
877 | 877 | $this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class); |
878 | 878 | |
879 | - $this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) { |
|
879 | + $this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) { |
|
880 | 880 | return new \OC\Files\Type\Loader( |
881 | 881 | $c->getDatabaseConnection() |
882 | 882 | ); |
883 | 883 | }); |
884 | 884 | $this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class); |
885 | - $this->registerService(BundleFetcher::class, function () { |
|
885 | + $this->registerService(BundleFetcher::class, function() { |
|
886 | 886 | return new BundleFetcher($this->getL10N('lib')); |
887 | 887 | }); |
888 | - $this->registerService(\OCP\Notification\IManager::class, function (Server $c) { |
|
888 | + $this->registerService(\OCP\Notification\IManager::class, function(Server $c) { |
|
889 | 889 | return new Manager( |
890 | 890 | $c->query(IValidator::class) |
891 | 891 | ); |
892 | 892 | }); |
893 | 893 | $this->registerAlias('NotificationManager', \OCP\Notification\IManager::class); |
894 | 894 | |
895 | - $this->registerService(\OC\CapabilitiesManager::class, function (Server $c) { |
|
895 | + $this->registerService(\OC\CapabilitiesManager::class, function(Server $c) { |
|
896 | 896 | $manager = new \OC\CapabilitiesManager($c->getLogger()); |
897 | - $manager->registerCapability(function () use ($c) { |
|
897 | + $manager->registerCapability(function() use ($c) { |
|
898 | 898 | return new \OC\OCS\CoreCapabilities($c->getConfig()); |
899 | 899 | }); |
900 | - $manager->registerCapability(function () use ($c) { |
|
900 | + $manager->registerCapability(function() use ($c) { |
|
901 | 901 | return $c->query(\OC\Security\Bruteforce\Capabilities::class); |
902 | 902 | }); |
903 | 903 | return $manager; |
904 | 904 | }); |
905 | 905 | $this->registerAlias('CapabilitiesManager', \OC\CapabilitiesManager::class); |
906 | 906 | |
907 | - $this->registerService(\OCP\Comments\ICommentsManager::class, function (Server $c) { |
|
907 | + $this->registerService(\OCP\Comments\ICommentsManager::class, function(Server $c) { |
|
908 | 908 | $config = $c->getConfig(); |
909 | 909 | $factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class); |
910 | 910 | /** @var \OCP\Comments\ICommentsManagerFactory $factory */ |
@@ -914,7 +914,7 @@ discard block |
||
914 | 914 | $manager->registerDisplayNameResolver('user', function($id) use ($c) { |
915 | 915 | $manager = $c->getUserManager(); |
916 | 916 | $user = $manager->get($id); |
917 | - if(is_null($user)) { |
|
917 | + if (is_null($user)) { |
|
918 | 918 | $l = $c->getL10N('core'); |
919 | 919 | $displayName = $l->t('Unknown user'); |
920 | 920 | } else { |
@@ -927,7 +927,7 @@ discard block |
||
927 | 927 | }); |
928 | 928 | $this->registerAlias('CommentsManager', \OCP\Comments\ICommentsManager::class); |
929 | 929 | |
930 | - $this->registerService('ThemingDefaults', function (Server $c) { |
|
930 | + $this->registerService('ThemingDefaults', function(Server $c) { |
|
931 | 931 | /* |
932 | 932 | * Dark magic for autoloader. |
933 | 933 | * If we do a class_exists it will try to load the class which will |
@@ -954,7 +954,7 @@ discard block |
||
954 | 954 | } |
955 | 955 | return new \OC_Defaults(); |
956 | 956 | }); |
957 | - $this->registerService(SCSSCacher::class, function (Server $c) { |
|
957 | + $this->registerService(SCSSCacher::class, function(Server $c) { |
|
958 | 958 | /** @var Factory $cacheFactory */ |
959 | 959 | $cacheFactory = $c->query(Factory::class); |
960 | 960 | return new SCSSCacher( |
@@ -969,7 +969,7 @@ discard block |
||
969 | 969 | new TimeFactory() |
970 | 970 | ); |
971 | 971 | }); |
972 | - $this->registerService(JSCombiner::class, function (Server $c) { |
|
972 | + $this->registerService(JSCombiner::class, function(Server $c) { |
|
973 | 973 | /** @var Factory $cacheFactory */ |
974 | 974 | $cacheFactory = $c->query(Factory::class); |
975 | 975 | return new JSCombiner( |
@@ -980,13 +980,13 @@ discard block |
||
980 | 980 | $c->getLogger() |
981 | 981 | ); |
982 | 982 | }); |
983 | - $this->registerService(EventDispatcher::class, function () { |
|
983 | + $this->registerService(EventDispatcher::class, function() { |
|
984 | 984 | return new EventDispatcher(); |
985 | 985 | }); |
986 | 986 | $this->registerAlias('EventDispatcher', EventDispatcher::class); |
987 | 987 | $this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class); |
988 | 988 | |
989 | - $this->registerService('CryptoWrapper', function (Server $c) { |
|
989 | + $this->registerService('CryptoWrapper', function(Server $c) { |
|
990 | 990 | // FIXME: Instantiiated here due to cyclic dependency |
991 | 991 | $request = new Request( |
992 | 992 | [ |
@@ -1011,7 +1011,7 @@ discard block |
||
1011 | 1011 | $request |
1012 | 1012 | ); |
1013 | 1013 | }); |
1014 | - $this->registerService('CsrfTokenManager', function (Server $c) { |
|
1014 | + $this->registerService('CsrfTokenManager', function(Server $c) { |
|
1015 | 1015 | $tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom()); |
1016 | 1016 | |
1017 | 1017 | return new CsrfTokenManager( |
@@ -1019,22 +1019,22 @@ discard block |
||
1019 | 1019 | $c->query(SessionStorage::class) |
1020 | 1020 | ); |
1021 | 1021 | }); |
1022 | - $this->registerService(SessionStorage::class, function (Server $c) { |
|
1022 | + $this->registerService(SessionStorage::class, function(Server $c) { |
|
1023 | 1023 | return new SessionStorage($c->getSession()); |
1024 | 1024 | }); |
1025 | - $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) { |
|
1025 | + $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) { |
|
1026 | 1026 | return new ContentSecurityPolicyManager(); |
1027 | 1027 | }); |
1028 | 1028 | $this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class); |
1029 | 1029 | |
1030 | - $this->registerService('ContentSecurityPolicyNonceManager', function (Server $c) { |
|
1030 | + $this->registerService('ContentSecurityPolicyNonceManager', function(Server $c) { |
|
1031 | 1031 | return new ContentSecurityPolicyNonceManager( |
1032 | 1032 | $c->getCsrfTokenManager(), |
1033 | 1033 | $c->getRequest() |
1034 | 1034 | ); |
1035 | 1035 | }); |
1036 | 1036 | |
1037 | - $this->registerService(\OCP\Share\IManager::class, function (Server $c) { |
|
1037 | + $this->registerService(\OCP\Share\IManager::class, function(Server $c) { |
|
1038 | 1038 | $config = $c->getConfig(); |
1039 | 1039 | $factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class); |
1040 | 1040 | /** @var \OCP\Share\IProviderFactory $factory */ |
@@ -1078,7 +1078,7 @@ discard block |
||
1078 | 1078 | |
1079 | 1079 | $this->registerAlias(\OCP\Collaboration\AutoComplete\IManager::class, \OC\Collaboration\AutoComplete\Manager::class); |
1080 | 1080 | |
1081 | - $this->registerService('SettingsManager', function (Server $c) { |
|
1081 | + $this->registerService('SettingsManager', function(Server $c) { |
|
1082 | 1082 | $manager = new \OC\Settings\Manager( |
1083 | 1083 | $c->getLogger(), |
1084 | 1084 | $c->getL10N('lib'), |
@@ -1087,36 +1087,36 @@ discard block |
||
1087 | 1087 | ); |
1088 | 1088 | return $manager; |
1089 | 1089 | }); |
1090 | - $this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) { |
|
1090 | + $this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) { |
|
1091 | 1091 | return new \OC\Files\AppData\Factory( |
1092 | 1092 | $c->getRootFolder(), |
1093 | 1093 | $c->getSystemConfig() |
1094 | 1094 | ); |
1095 | 1095 | }); |
1096 | 1096 | |
1097 | - $this->registerService('LockdownManager', function (Server $c) { |
|
1098 | - return new LockdownManager(function () use ($c) { |
|
1097 | + $this->registerService('LockdownManager', function(Server $c) { |
|
1098 | + return new LockdownManager(function() use ($c) { |
|
1099 | 1099 | return $c->getSession(); |
1100 | 1100 | }); |
1101 | 1101 | }); |
1102 | 1102 | |
1103 | - $this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) { |
|
1103 | + $this->registerService(\OCP\OCS\IDiscoveryService::class, function(Server $c) { |
|
1104 | 1104 | return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService()); |
1105 | 1105 | }); |
1106 | 1106 | |
1107 | - $this->registerService(ICloudIdManager::class, function (Server $c) { |
|
1107 | + $this->registerService(ICloudIdManager::class, function(Server $c) { |
|
1108 | 1108 | return new CloudIdManager(); |
1109 | 1109 | }); |
1110 | 1110 | |
1111 | - $this->registerService(IConfig::class, function (Server $c) { |
|
1111 | + $this->registerService(IConfig::class, function(Server $c) { |
|
1112 | 1112 | return new GlobalScale\Config($c->getConfig()); |
1113 | 1113 | }); |
1114 | 1114 | |
1115 | - $this->registerService(ICloudFederationProviderManager::class, function (Server $c) { |
|
1115 | + $this->registerService(ICloudFederationProviderManager::class, function(Server $c) { |
|
1116 | 1116 | return new CloudFederationProviderManager($c->getAppManager(), $c->getHTTPClientService(), $c->getCloudIdManager(), $c->getLogger()); |
1117 | 1117 | }); |
1118 | 1118 | |
1119 | - $this->registerService(ICloudFederationFactory::class, function (Server $c) { |
|
1119 | + $this->registerService(ICloudFederationFactory::class, function(Server $c) { |
|
1120 | 1120 | return new CloudFederationFactory(); |
1121 | 1121 | }); |
1122 | 1122 | |
@@ -1126,18 +1126,18 @@ discard block |
||
1126 | 1126 | $this->registerAlias(\OCP\AppFramework\Utility\ITimeFactory::class, \OC\AppFramework\Utility\TimeFactory::class); |
1127 | 1127 | $this->registerAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class); |
1128 | 1128 | |
1129 | - $this->registerService(Defaults::class, function (Server $c) { |
|
1129 | + $this->registerService(Defaults::class, function(Server $c) { |
|
1130 | 1130 | return new Defaults( |
1131 | 1131 | $c->getThemingDefaults() |
1132 | 1132 | ); |
1133 | 1133 | }); |
1134 | 1134 | $this->registerAlias('Defaults', \OCP\Defaults::class); |
1135 | 1135 | |
1136 | - $this->registerService(\OCP\ISession::class, function (SimpleContainer $c) { |
|
1136 | + $this->registerService(\OCP\ISession::class, function(SimpleContainer $c) { |
|
1137 | 1137 | return $c->query(\OCP\IUserSession::class)->getSession(); |
1138 | 1138 | }); |
1139 | 1139 | |
1140 | - $this->registerService(IShareHelper::class, function (Server $c) { |
|
1140 | + $this->registerService(IShareHelper::class, function(Server $c) { |
|
1141 | 1141 | return new ShareHelper( |
1142 | 1142 | $c->query(\OCP\Share\IManager::class) |
1143 | 1143 | ); |
@@ -1213,11 +1213,11 @@ discard block |
||
1213 | 1213 | // no avatar to remove |
1214 | 1214 | } catch (\Exception $e) { |
1215 | 1215 | // Ignore exceptions |
1216 | - $logger->info('Could not cleanup avatar of ' . $user->getUID()); |
|
1216 | + $logger->info('Could not cleanup avatar of '.$user->getUID()); |
|
1217 | 1217 | } |
1218 | 1218 | }); |
1219 | 1219 | |
1220 | - $dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) { |
|
1220 | + $dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) { |
|
1221 | 1221 | $manager = $this->getAvatarManager(); |
1222 | 1222 | /** @var IUser $user */ |
1223 | 1223 | $user = $e->getSubject(); |
@@ -1368,7 +1368,7 @@ discard block |
||
1368 | 1368 | * @deprecated since 9.2.0 use IAppData |
1369 | 1369 | */ |
1370 | 1370 | public function getAppFolder() { |
1371 | - $dir = '/' . \OC_App::getCurrentApp(); |
|
1371 | + $dir = '/'.\OC_App::getCurrentApp(); |
|
1372 | 1372 | $root = $this->getRootFolder(); |
1373 | 1373 | if (!$root->nodeExists($dir)) { |
1374 | 1374 | $folder = $root->newFolder($dir); |
@@ -1943,7 +1943,7 @@ discard block |
||
1943 | 1943 | /** |
1944 | 1944 | * @return \OCP\Collaboration\AutoComplete\IManager |
1945 | 1945 | */ |
1946 | - public function getAutoCompleteManager(){ |
|
1946 | + public function getAutoCompleteManager() { |
|
1947 | 1947 | return $this->query(IManager::class); |
1948 | 1948 | } |
1949 | 1949 |