@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | // To find out if we are running from CLI or not |
| 184 | 184 | $this->registerParameter('isCLI', \OC::$CLI); |
| 185 | 185 | |
| 186 | - $this->registerService(\OCP\IServerContainer::class, function (IServerContainer $c) { |
|
| 186 | + $this->registerService(\OCP\IServerContainer::class, function(IServerContainer $c) { |
|
| 187 | 187 | return $c; |
| 188 | 188 | }); |
| 189 | 189 | |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | $this->registerAlias(IActionFactory::class, ActionFactory::class); |
| 203 | 203 | |
| 204 | 204 | |
| 205 | - $this->registerService(\OCP\IPreview::class, function (Server $c) { |
|
| 205 | + $this->registerService(\OCP\IPreview::class, function(Server $c) { |
|
| 206 | 206 | return new PreviewManager( |
| 207 | 207 | $c->getConfig(), |
| 208 | 208 | $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(); |
@@ -389,45 +389,45 @@ discard block |
||
| 389 | 389 | $c->getLogger(), |
| 390 | 390 | $c->query(IEventDispatcher::class) |
| 391 | 391 | ); |
| 392 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
| 392 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
| 393 | 393 | \OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password)); |
| 394 | 394 | }); |
| 395 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
| 395 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
| 396 | 396 | /** @var $user \OC\User\User */ |
| 397 | 397 | \OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password)); |
| 398 | 398 | }); |
| 399 | - $userSession->listen('\OC\User', 'preDelete', function ($user) use ($dispatcher) { |
|
| 399 | + $userSession->listen('\OC\User', 'preDelete', function($user) use ($dispatcher) { |
|
| 400 | 400 | /** @var $user \OC\User\User */ |
| 401 | 401 | \OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID())); |
| 402 | 402 | $dispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user)); |
| 403 | 403 | }); |
| 404 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
| 404 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
| 405 | 405 | /** @var $user \OC\User\User */ |
| 406 | 406 | \OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID())); |
| 407 | 407 | }); |
| 408 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
| 408 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
| 409 | 409 | /** @var $user \OC\User\User */ |
| 410 | 410 | \OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
| 411 | 411 | }); |
| 412 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
| 412 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
| 413 | 413 | /** @var $user \OC\User\User */ |
| 414 | 414 | \OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
| 415 | 415 | }); |
| 416 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
| 416 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
| 417 | 417 | \OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password)); |
| 418 | 418 | }); |
| 419 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $password, $isTokenLogin) { |
|
| 419 | + $userSession->listen('\OC\User', 'postLogin', function($user, $password, $isTokenLogin) { |
|
| 420 | 420 | /** @var $user \OC\User\User */ |
| 421 | 421 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'isTokenLogin' => $isTokenLogin)); |
| 422 | 422 | }); |
| 423 | - $userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) { |
|
| 423 | + $userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) { |
|
| 424 | 424 | /** @var $user \OC\User\User */ |
| 425 | 425 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
| 426 | 426 | }); |
| 427 | - $userSession->listen('\OC\User', 'logout', function () { |
|
| 427 | + $userSession->listen('\OC\User', 'logout', function() { |
|
| 428 | 428 | \OC_Hook::emit('OC_User', 'logout', array()); |
| 429 | 429 | }); |
| 430 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) { |
|
| 430 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) { |
|
| 431 | 431 | /** @var $user \OC\User\User */ |
| 432 | 432 | \OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue)); |
| 433 | 433 | }); |
@@ -441,7 +441,7 @@ discard block |
||
| 441 | 441 | $this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class); |
| 442 | 442 | $this->registerAlias('NavigationManager', \OCP\INavigationManager::class); |
| 443 | 443 | |
| 444 | - $this->registerService(\OC\AllConfig::class, function (Server $c) { |
|
| 444 | + $this->registerService(\OC\AllConfig::class, function(Server $c) { |
|
| 445 | 445 | return new \OC\AllConfig( |
| 446 | 446 | $c->getSystemConfig() |
| 447 | 447 | ); |
@@ -449,18 +449,18 @@ discard block |
||
| 449 | 449 | $this->registerAlias('AllConfig', \OC\AllConfig::class); |
| 450 | 450 | $this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class); |
| 451 | 451 | |
| 452 | - $this->registerService(\OC\SystemConfig::class, function ($c) use ($config) { |
|
| 452 | + $this->registerService(\OC\SystemConfig::class, function($c) use ($config) { |
|
| 453 | 453 | return new \OC\SystemConfig($config); |
| 454 | 454 | }); |
| 455 | 455 | $this->registerAlias('SystemConfig', \OC\SystemConfig::class); |
| 456 | 456 | |
| 457 | - $this->registerService(\OC\AppConfig::class, function (Server $c) { |
|
| 457 | + $this->registerService(\OC\AppConfig::class, function(Server $c) { |
|
| 458 | 458 | return new \OC\AppConfig($c->getDatabaseConnection()); |
| 459 | 459 | }); |
| 460 | 460 | $this->registerAlias('AppConfig', \OC\AppConfig::class); |
| 461 | 461 | $this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class); |
| 462 | 462 | |
| 463 | - $this->registerService(\OCP\L10N\IFactory::class, function (Server $c) { |
|
| 463 | + $this->registerService(\OCP\L10N\IFactory::class, function(Server $c) { |
|
| 464 | 464 | return new \OC\L10N\Factory( |
| 465 | 465 | $c->getConfig(), |
| 466 | 466 | $c->getRequest(), |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | }); |
| 471 | 471 | $this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class); |
| 472 | 472 | |
| 473 | - $this->registerService(\OCP\IURLGenerator::class, function (Server $c) { |
|
| 473 | + $this->registerService(\OCP\IURLGenerator::class, function(Server $c) { |
|
| 474 | 474 | $config = $c->getConfig(); |
| 475 | 475 | $cacheFactory = $c->getMemCacheFactory(); |
| 476 | 476 | $request = $c->getRequest(); |
@@ -485,12 +485,12 @@ discard block |
||
| 485 | 485 | $this->registerAlias('AppFetcher', AppFetcher::class); |
| 486 | 486 | $this->registerAlias('CategoryFetcher', CategoryFetcher::class); |
| 487 | 487 | |
| 488 | - $this->registerService(\OCP\ICache::class, function ($c) { |
|
| 488 | + $this->registerService(\OCP\ICache::class, function($c) { |
|
| 489 | 489 | return new Cache\File(); |
| 490 | 490 | }); |
| 491 | 491 | $this->registerAlias('UserCache', \OCP\ICache::class); |
| 492 | 492 | |
| 493 | - $this->registerService(Factory::class, function (Server $c) { |
|
| 493 | + $this->registerService(Factory::class, function(Server $c) { |
|
| 494 | 494 | |
| 495 | 495 | $arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(), |
| 496 | 496 | ArrayCache::class, |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | $version = implode(',', $v); |
| 506 | 506 | $instanceId = \OC_Util::getInstanceId(); |
| 507 | 507 | $path = \OC::$SERVERROOT; |
| 508 | - $prefix = md5($instanceId . '-' . $version . '-' . $path); |
|
| 508 | + $prefix = md5($instanceId.'-'.$version.'-'.$path); |
|
| 509 | 509 | return new \OC\Memcache\Factory($prefix, $c->getLogger(), |
| 510 | 510 | $config->getSystemValue('memcache.local', null), |
| 511 | 511 | $config->getSystemValue('memcache.distributed', null), |
@@ -518,12 +518,12 @@ discard block |
||
| 518 | 518 | $this->registerAlias('MemCacheFactory', Factory::class); |
| 519 | 519 | $this->registerAlias(ICacheFactory::class, Factory::class); |
| 520 | 520 | |
| 521 | - $this->registerService('RedisFactory', function (Server $c) { |
|
| 521 | + $this->registerService('RedisFactory', function(Server $c) { |
|
| 522 | 522 | $systemConfig = $c->getSystemConfig(); |
| 523 | 523 | return new RedisFactory($systemConfig); |
| 524 | 524 | }); |
| 525 | 525 | |
| 526 | - $this->registerService(\OCP\Activity\IManager::class, function (Server $c) { |
|
| 526 | + $this->registerService(\OCP\Activity\IManager::class, function(Server $c) { |
|
| 527 | 527 | return new \OC\Activity\Manager( |
| 528 | 528 | $c->getRequest(), |
| 529 | 529 | $c->getUserSession(), |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | }); |
| 534 | 534 | $this->registerAlias('ActivityManager', \OCP\Activity\IManager::class); |
| 535 | 535 | |
| 536 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
| 536 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
| 537 | 537 | return new \OC\Activity\EventMerger( |
| 538 | 538 | $c->getL10N('lib') |
| 539 | 539 | ); |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | $this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class); |
| 556 | 556 | $this->registerAlias(\OCP\Support\Subscription\IRegistry::class, \OC\Support\Subscription\Registry::class); |
| 557 | 557 | |
| 558 | - $this->registerService(\OC\Log::class, function (Server $c) { |
|
| 558 | + $this->registerService(\OC\Log::class, function(Server $c) { |
|
| 559 | 559 | $logType = $c->query('AllConfig')->getSystemValue('log_type', 'file'); |
| 560 | 560 | $factory = new LogFactory($c, $this->getSystemConfig()); |
| 561 | 561 | $logger = $factory->get($logType); |
@@ -566,11 +566,11 @@ discard block |
||
| 566 | 566 | $this->registerAlias(\OCP\ILogger::class, \OC\Log::class); |
| 567 | 567 | $this->registerAlias('Logger', \OC\Log::class); |
| 568 | 568 | |
| 569 | - $this->registerService(ILogFactory::class, function (Server $c) { |
|
| 569 | + $this->registerService(ILogFactory::class, function(Server $c) { |
|
| 570 | 570 | return new LogFactory($c, $this->getSystemConfig()); |
| 571 | 571 | }); |
| 572 | 572 | |
| 573 | - $this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) { |
|
| 573 | + $this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) { |
|
| 574 | 574 | $config = $c->getConfig(); |
| 575 | 575 | return new \OC\BackgroundJob\JobList( |
| 576 | 576 | $c->getDatabaseConnection(), |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | }); |
| 581 | 581 | $this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class); |
| 582 | 582 | |
| 583 | - $this->registerService(\OCP\Route\IRouter::class, function (Server $c) { |
|
| 583 | + $this->registerService(\OCP\Route\IRouter::class, function(Server $c) { |
|
| 584 | 584 | $cacheFactory = $c->getMemCacheFactory(); |
| 585 | 585 | $logger = $c->getLogger(); |
| 586 | 586 | if ($cacheFactory->isLocalCacheAvailable()) { |
@@ -592,39 +592,39 @@ discard block |
||
| 592 | 592 | }); |
| 593 | 593 | $this->registerAlias('Router', \OCP\Route\IRouter::class); |
| 594 | 594 | |
| 595 | - $this->registerService(\OCP\ISearch::class, function ($c) { |
|
| 595 | + $this->registerService(\OCP\ISearch::class, function($c) { |
|
| 596 | 596 | return new Search(); |
| 597 | 597 | }); |
| 598 | 598 | $this->registerAlias('Search', \OCP\ISearch::class); |
| 599 | 599 | |
| 600 | - $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) { |
|
| 600 | + $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) { |
|
| 601 | 601 | return new \OC\Security\RateLimiting\Backend\MemoryCache( |
| 602 | 602 | $this->getMemCacheFactory(), |
| 603 | 603 | new \OC\AppFramework\Utility\TimeFactory() |
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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), |
@@ -696,7 +696,7 @@ discard block |
||
| 696 | 696 | $this->registerAlias('AppManager', AppManager::class); |
| 697 | 697 | $this->registerAlias(IAppManager::class, AppManager::class); |
| 698 | 698 | |
| 699 | - $this->registerService(\OCP\IDateTimeZone::class, function (Server $c) { |
|
| 699 | + $this->registerService(\OCP\IDateTimeZone::class, function(Server $c) { |
|
| 700 | 700 | return new DateTimeZone( |
| 701 | 701 | $c->getConfig(), |
| 702 | 702 | $c->getSession() |
@@ -704,7 +704,7 @@ discard block |
||
| 704 | 704 | }); |
| 705 | 705 | $this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class); |
| 706 | 706 | |
| 707 | - $this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) { |
|
| 707 | + $this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) { |
|
| 708 | 708 | $language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null); |
| 709 | 709 | |
| 710 | 710 | return new DateTimeFormatter( |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | }); |
| 715 | 715 | $this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class); |
| 716 | 716 | |
| 717 | - $this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) { |
|
| 717 | + $this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) { |
|
| 718 | 718 | $mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger()); |
| 719 | 719 | $listener = new UserMountCacheListener($mountCache); |
| 720 | 720 | $listener->listen($c->getUserManager()); |
@@ -722,7 +722,7 @@ discard block |
||
| 722 | 722 | }); |
| 723 | 723 | $this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class); |
| 724 | 724 | |
| 725 | - $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) { |
|
| 725 | + $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) { |
|
| 726 | 726 | $loader = \OC\Files\Filesystem::getLoader(); |
| 727 | 727 | $mountCache = $c->query('UserMountCache'); |
| 728 | 728 | $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
@@ -738,10 +738,10 @@ discard block |
||
| 738 | 738 | }); |
| 739 | 739 | $this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class); |
| 740 | 740 | |
| 741 | - $this->registerService('IniWrapper', function ($c) { |
|
| 741 | + $this->registerService('IniWrapper', function($c) { |
|
| 742 | 742 | return new IniGetWrapper(); |
| 743 | 743 | }); |
| 744 | - $this->registerService('AsyncCommandBus', function (Server $c) { |
|
| 744 | + $this->registerService('AsyncCommandBus', function(Server $c) { |
|
| 745 | 745 | $busClass = $c->getConfig()->getSystemValue('commandbus'); |
| 746 | 746 | if ($busClass) { |
| 747 | 747 | list($app, $class) = explode('::', $busClass, 2); |
@@ -756,10 +756,10 @@ discard block |
||
| 756 | 756 | return new CronBus($jobList); |
| 757 | 757 | } |
| 758 | 758 | }); |
| 759 | - $this->registerService('TrustedDomainHelper', function ($c) { |
|
| 759 | + $this->registerService('TrustedDomainHelper', function($c) { |
|
| 760 | 760 | return new TrustedDomainHelper($this->getConfig()); |
| 761 | 761 | }); |
| 762 | - $this->registerService(Throttler::class, function (Server $c) { |
|
| 762 | + $this->registerService(Throttler::class, function(Server $c) { |
|
| 763 | 763 | return new Throttler( |
| 764 | 764 | $c->getDatabaseConnection(), |
| 765 | 765 | new TimeFactory(), |
@@ -768,7 +768,7 @@ discard block |
||
| 768 | 768 | ); |
| 769 | 769 | }); |
| 770 | 770 | $this->registerAlias('Throttler', Throttler::class); |
| 771 | - $this->registerService('IntegrityCodeChecker', function (Server $c) { |
|
| 771 | + $this->registerService('IntegrityCodeChecker', function(Server $c) { |
|
| 772 | 772 | // IConfig and IAppManager requires a working database. This code |
| 773 | 773 | // might however be called when ownCloud is not yet setup. |
| 774 | 774 | if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
@@ -790,7 +790,7 @@ discard block |
||
| 790 | 790 | $c->getMimeTypeDetector() |
| 791 | 791 | ); |
| 792 | 792 | }); |
| 793 | - $this->registerService(\OCP\IRequest::class, function ($c) { |
|
| 793 | + $this->registerService(\OCP\IRequest::class, function($c) { |
|
| 794 | 794 | if (isset($this['urlParams'])) { |
| 795 | 795 | $urlParams = $this['urlParams']; |
| 796 | 796 | } else { |
@@ -826,7 +826,7 @@ discard block |
||
| 826 | 826 | }); |
| 827 | 827 | $this->registerAlias('Request', \OCP\IRequest::class); |
| 828 | 828 | |
| 829 | - $this->registerService(\OCP\Mail\IMailer::class, function (Server $c) { |
|
| 829 | + $this->registerService(\OCP\Mail\IMailer::class, function(Server $c) { |
|
| 830 | 830 | return new Mailer( |
| 831 | 831 | $c->getConfig(), |
| 832 | 832 | $c->getLogger(), |
@@ -837,7 +837,7 @@ discard block |
||
| 837 | 837 | }); |
| 838 | 838 | $this->registerAlias('Mailer', \OCP\Mail\IMailer::class); |
| 839 | 839 | |
| 840 | - $this->registerService('LDAPProvider', function (Server $c) { |
|
| 840 | + $this->registerService('LDAPProvider', function(Server $c) { |
|
| 841 | 841 | $config = $c->getConfig(); |
| 842 | 842 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
| 843 | 843 | if (is_null($factoryClass)) { |
@@ -847,7 +847,7 @@ discard block |
||
| 847 | 847 | $factory = new $factoryClass($this); |
| 848 | 848 | return $factory->getLDAPProvider(); |
| 849 | 849 | }); |
| 850 | - $this->registerService(ILockingProvider::class, function (Server $c) { |
|
| 850 | + $this->registerService(ILockingProvider::class, function(Server $c) { |
|
| 851 | 851 | $ini = $c->getIniWrapper(); |
| 852 | 852 | $config = $c->getConfig(); |
| 853 | 853 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -870,30 +870,30 @@ discard block |
||
| 870 | 870 | }); |
| 871 | 871 | $this->registerAlias('LockingProvider', ILockingProvider::class); |
| 872 | 872 | |
| 873 | - $this->registerService(\OCP\Files\Mount\IMountManager::class, function () { |
|
| 873 | + $this->registerService(\OCP\Files\Mount\IMountManager::class, function() { |
|
| 874 | 874 | return new \OC\Files\Mount\Manager(); |
| 875 | 875 | }); |
| 876 | 876 | $this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class); |
| 877 | 877 | |
| 878 | - $this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) { |
|
| 878 | + $this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) { |
|
| 879 | 879 | return new \OC\Files\Type\Detection( |
| 880 | 880 | $c->getURLGenerator(), |
| 881 | 881 | \OC::$configDir, |
| 882 | - \OC::$SERVERROOT . '/resources/config/' |
|
| 882 | + \OC::$SERVERROOT.'/resources/config/' |
|
| 883 | 883 | ); |
| 884 | 884 | }); |
| 885 | 885 | $this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class); |
| 886 | 886 | |
| 887 | - $this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) { |
|
| 887 | + $this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) { |
|
| 888 | 888 | return new \OC\Files\Type\Loader( |
| 889 | 889 | $c->getDatabaseConnection() |
| 890 | 890 | ); |
| 891 | 891 | }); |
| 892 | 892 | $this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class); |
| 893 | - $this->registerService(BundleFetcher::class, function () { |
|
| 893 | + $this->registerService(BundleFetcher::class, function() { |
|
| 894 | 894 | return new BundleFetcher($this->getL10N('lib')); |
| 895 | 895 | }); |
| 896 | - $this->registerService(\OCP\Notification\IManager::class, function (Server $c) { |
|
| 896 | + $this->registerService(\OCP\Notification\IManager::class, function(Server $c) { |
|
| 897 | 897 | return new Manager( |
| 898 | 898 | $c->query(IValidator::class), |
| 899 | 899 | $c->getLogger() |
@@ -901,19 +901,19 @@ discard block |
||
| 901 | 901 | }); |
| 902 | 902 | $this->registerAlias('NotificationManager', \OCP\Notification\IManager::class); |
| 903 | 903 | |
| 904 | - $this->registerService(\OC\CapabilitiesManager::class, function (Server $c) { |
|
| 904 | + $this->registerService(\OC\CapabilitiesManager::class, function(Server $c) { |
|
| 905 | 905 | $manager = new \OC\CapabilitiesManager($c->getLogger()); |
| 906 | - $manager->registerCapability(function () use ($c) { |
|
| 906 | + $manager->registerCapability(function() use ($c) { |
|
| 907 | 907 | return new \OC\OCS\CoreCapabilities($c->getConfig()); |
| 908 | 908 | }); |
| 909 | - $manager->registerCapability(function () use ($c) { |
|
| 909 | + $manager->registerCapability(function() use ($c) { |
|
| 910 | 910 | return $c->query(\OC\Security\Bruteforce\Capabilities::class); |
| 911 | 911 | }); |
| 912 | 912 | return $manager; |
| 913 | 913 | }); |
| 914 | 914 | $this->registerAlias('CapabilitiesManager', \OC\CapabilitiesManager::class); |
| 915 | 915 | |
| 916 | - $this->registerService(\OCP\Comments\ICommentsManager::class, function (Server $c) { |
|
| 916 | + $this->registerService(\OCP\Comments\ICommentsManager::class, function(Server $c) { |
|
| 917 | 917 | $config = $c->getConfig(); |
| 918 | 918 | $factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class); |
| 919 | 919 | /** @var \OCP\Comments\ICommentsManagerFactory $factory */ |
@@ -923,7 +923,7 @@ discard block |
||
| 923 | 923 | $manager->registerDisplayNameResolver('user', function($id) use ($c) { |
| 924 | 924 | $manager = $c->getUserManager(); |
| 925 | 925 | $user = $manager->get($id); |
| 926 | - if(is_null($user)) { |
|
| 926 | + if (is_null($user)) { |
|
| 927 | 927 | $l = $c->getL10N('core'); |
| 928 | 928 | $displayName = $l->t('Unknown user'); |
| 929 | 929 | } else { |
@@ -936,7 +936,7 @@ discard block |
||
| 936 | 936 | }); |
| 937 | 937 | $this->registerAlias('CommentsManager', \OCP\Comments\ICommentsManager::class); |
| 938 | 938 | |
| 939 | - $this->registerService('ThemingDefaults', function (Server $c) { |
|
| 939 | + $this->registerService('ThemingDefaults', function(Server $c) { |
|
| 940 | 940 | /* |
| 941 | 941 | * Dark magic for autoloader. |
| 942 | 942 | * If we do a class_exists it will try to load the class which will |
@@ -964,7 +964,7 @@ discard block |
||
| 964 | 964 | } |
| 965 | 965 | return new \OC_Defaults(); |
| 966 | 966 | }); |
| 967 | - $this->registerService(SCSSCacher::class, function (Server $c) { |
|
| 967 | + $this->registerService(SCSSCacher::class, function(Server $c) { |
|
| 968 | 968 | return new SCSSCacher( |
| 969 | 969 | $c->getLogger(), |
| 970 | 970 | $c->query(\OC\Files\AppData\Factory::class), |
@@ -977,7 +977,7 @@ discard block |
||
| 977 | 977 | new TimeFactory() |
| 978 | 978 | ); |
| 979 | 979 | }); |
| 980 | - $this->registerService(JSCombiner::class, function (Server $c) { |
|
| 980 | + $this->registerService(JSCombiner::class, function(Server $c) { |
|
| 981 | 981 | return new JSCombiner( |
| 982 | 982 | $c->getAppDataDir('js'), |
| 983 | 983 | $c->getURLGenerator(), |
@@ -990,7 +990,7 @@ discard block |
||
| 990 | 990 | $this->registerAlias('EventDispatcher', \OC\EventDispatcher\SymfonyAdapter::class); |
| 991 | 991 | $this->registerAlias(EventDispatcherInterface::class, \OC\EventDispatcher\SymfonyAdapter::class); |
| 992 | 992 | |
| 993 | - $this->registerService('CryptoWrapper', function (Server $c) { |
|
| 993 | + $this->registerService('CryptoWrapper', function(Server $c) { |
|
| 994 | 994 | // FIXME: Instantiiated here due to cyclic dependency |
| 995 | 995 | $request = new Request( |
| 996 | 996 | [ |
@@ -1015,7 +1015,7 @@ discard block |
||
| 1015 | 1015 | $request |
| 1016 | 1016 | ); |
| 1017 | 1017 | }); |
| 1018 | - $this->registerService(CsrfTokenManager::class, function (Server $c) { |
|
| 1018 | + $this->registerService(CsrfTokenManager::class, function(Server $c) { |
|
| 1019 | 1019 | $tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom()); |
| 1020 | 1020 | |
| 1021 | 1021 | return new CsrfTokenManager( |
@@ -1024,20 +1024,20 @@ discard block |
||
| 1024 | 1024 | ); |
| 1025 | 1025 | }); |
| 1026 | 1026 | $this->registerAlias('CsrfTokenManager', CsrfTokenManager::class); |
| 1027 | - $this->registerService(SessionStorage::class, function (Server $c) { |
|
| 1027 | + $this->registerService(SessionStorage::class, function(Server $c) { |
|
| 1028 | 1028 | return new SessionStorage($c->getSession()); |
| 1029 | 1029 | }); |
| 1030 | 1030 | $this->registerAlias(\OCP\Security\IContentSecurityPolicyManager::class, \OC\Security\CSP\ContentSecurityPolicyManager::class); |
| 1031 | 1031 | $this->registerAlias('ContentSecurityPolicyManager', \OC\Security\CSP\ContentSecurityPolicyManager::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 */ |
@@ -1084,7 +1084,7 @@ discard block |
||
| 1084 | 1084 | |
| 1085 | 1085 | $this->registerAlias(\OCP\Collaboration\Resources\IManager::class, \OC\Collaboration\Resources\Manager::class); |
| 1086 | 1086 | |
| 1087 | - $this->registerService('SettingsManager', function (Server $c) { |
|
| 1087 | + $this->registerService('SettingsManager', function(Server $c) { |
|
| 1088 | 1088 | $manager = new \OC\Settings\Manager( |
| 1089 | 1089 | $c->getLogger(), |
| 1090 | 1090 | $c->getL10NFactory(), |
@@ -1093,36 +1093,36 @@ discard block |
||
| 1093 | 1093 | ); |
| 1094 | 1094 | return $manager; |
| 1095 | 1095 | }); |
| 1096 | - $this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) { |
|
| 1096 | + $this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) { |
|
| 1097 | 1097 | return new \OC\Files\AppData\Factory( |
| 1098 | 1098 | $c->getRootFolder(), |
| 1099 | 1099 | $c->getSystemConfig() |
| 1100 | 1100 | ); |
| 1101 | 1101 | }); |
| 1102 | 1102 | |
| 1103 | - $this->registerService('LockdownManager', function (Server $c) { |
|
| 1104 | - return new LockdownManager(function () use ($c) { |
|
| 1103 | + $this->registerService('LockdownManager', function(Server $c) { |
|
| 1104 | + return new LockdownManager(function() use ($c) { |
|
| 1105 | 1105 | return $c->getSession(); |
| 1106 | 1106 | }); |
| 1107 | 1107 | }); |
| 1108 | 1108 | |
| 1109 | - $this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) { |
|
| 1109 | + $this->registerService(\OCP\OCS\IDiscoveryService::class, function(Server $c) { |
|
| 1110 | 1110 | return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService()); |
| 1111 | 1111 | }); |
| 1112 | 1112 | |
| 1113 | - $this->registerService(ICloudIdManager::class, function (Server $c) { |
|
| 1113 | + $this->registerService(ICloudIdManager::class, function(Server $c) { |
|
| 1114 | 1114 | return new CloudIdManager(); |
| 1115 | 1115 | }); |
| 1116 | 1116 | |
| 1117 | - $this->registerService(IConfig::class, function (Server $c) { |
|
| 1117 | + $this->registerService(IConfig::class, function(Server $c) { |
|
| 1118 | 1118 | return new GlobalScale\Config($c->getConfig()); |
| 1119 | 1119 | }); |
| 1120 | 1120 | |
| 1121 | - $this->registerService(ICloudFederationProviderManager::class, function (Server $c) { |
|
| 1121 | + $this->registerService(ICloudFederationProviderManager::class, function(Server $c) { |
|
| 1122 | 1122 | return new CloudFederationProviderManager($c->getAppManager(), $c->getHTTPClientService(), $c->getCloudIdManager(), $c->getLogger()); |
| 1123 | 1123 | }); |
| 1124 | 1124 | |
| 1125 | - $this->registerService(ICloudFederationFactory::class, function (Server $c) { |
|
| 1125 | + $this->registerService(ICloudFederationFactory::class, function(Server $c) { |
|
| 1126 | 1126 | return new CloudFederationFactory(); |
| 1127 | 1127 | }); |
| 1128 | 1128 | |
@@ -1132,18 +1132,18 @@ discard block |
||
| 1132 | 1132 | $this->registerAlias(\OCP\AppFramework\Utility\ITimeFactory::class, \OC\AppFramework\Utility\TimeFactory::class); |
| 1133 | 1133 | $this->registerAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class); |
| 1134 | 1134 | |
| 1135 | - $this->registerService(Defaults::class, function (Server $c) { |
|
| 1135 | + $this->registerService(Defaults::class, function(Server $c) { |
|
| 1136 | 1136 | return new Defaults( |
| 1137 | 1137 | $c->getThemingDefaults() |
| 1138 | 1138 | ); |
| 1139 | 1139 | }); |
| 1140 | 1140 | $this->registerAlias('Defaults', \OCP\Defaults::class); |
| 1141 | 1141 | |
| 1142 | - $this->registerService(\OCP\ISession::class, function (SimpleContainer $c) { |
|
| 1142 | + $this->registerService(\OCP\ISession::class, function(SimpleContainer $c) { |
|
| 1143 | 1143 | return $c->query(\OCP\IUserSession::class)->getSession(); |
| 1144 | 1144 | }); |
| 1145 | 1145 | |
| 1146 | - $this->registerService(IShareHelper::class, function (Server $c) { |
|
| 1146 | + $this->registerService(IShareHelper::class, function(Server $c) { |
|
| 1147 | 1147 | return new ShareHelper( |
| 1148 | 1148 | $c->query(\OCP\Share\IManager::class) |
| 1149 | 1149 | ); |
@@ -1231,11 +1231,11 @@ discard block |
||
| 1231 | 1231 | // no avatar to remove |
| 1232 | 1232 | } catch (\Exception $e) { |
| 1233 | 1233 | // Ignore exceptions |
| 1234 | - $logger->info('Could not cleanup avatar of ' . $user->getUID()); |
|
| 1234 | + $logger->info('Could not cleanup avatar of '.$user->getUID()); |
|
| 1235 | 1235 | } |
| 1236 | 1236 | }); |
| 1237 | 1237 | |
| 1238 | - $dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) { |
|
| 1238 | + $dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) { |
|
| 1239 | 1239 | $manager = $this->getAvatarManager(); |
| 1240 | 1240 | /** @var IUser $user */ |
| 1241 | 1241 | $user = $e->getSubject(); |
@@ -1391,7 +1391,7 @@ discard block |
||
| 1391 | 1391 | * @deprecated since 9.2.0 use IAppData |
| 1392 | 1392 | */ |
| 1393 | 1393 | public function getAppFolder() { |
| 1394 | - $dir = '/' . \OC_App::getCurrentApp(); |
|
| 1394 | + $dir = '/'.\OC_App::getCurrentApp(); |
|
| 1395 | 1395 | $root = $this->getRootFolder(); |
| 1396 | 1396 | if (!$root->nodeExists($dir)) { |
| 1397 | 1397 | $folder = $root->newFolder($dir); |
@@ -1966,7 +1966,7 @@ discard block |
||
| 1966 | 1966 | /** |
| 1967 | 1967 | * @return \OCP\Collaboration\AutoComplete\IManager |
| 1968 | 1968 | */ |
| 1969 | - public function getAutoCompleteManager(){ |
|
| 1969 | + public function getAutoCompleteManager() { |
|
| 1970 | 1970 | return $this->query(IManager::class); |
| 1971 | 1971 | } |
| 1972 | 1972 | |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | */ |
| 141 | 141 | public function getKey(IUser $user): Key { |
| 142 | 142 | $uid = $user->getUID(); |
| 143 | - return $this->retrieveKey('user-' . $uid); |
|
| 143 | + return $this->retrieveKey('user-'.$uid); |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | /** |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | if ($instanceId === null) { |
| 155 | 155 | throw new \RuntimeException('no instance id!'); |
| 156 | 156 | } |
| 157 | - return $this->retrieveKey('system-' . $instanceId); |
|
| 157 | + return $this->retrieveKey('system-'.$instanceId); |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | private function logOpensslError(): void { |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | while ($error = openssl_error_string()) { |
| 163 | 163 | $errors[] = $error; |
| 164 | 164 | } |
| 165 | - $this->logger->critical('Something is wrong with your openssl setup: ' . implode(', ', $errors)); |
|
| 165 | + $this->logger->critical('Something is wrong with your openssl setup: '.implode(', ', $errors)); |
|
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | |