@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | parent::__construct(); |
| 141 | 141 | $this->webRoot = $webRoot; |
| 142 | 142 | |
| 143 | - $this->registerService(\OCP\IServerContainer::class, function (IServerContainer $c) { |
|
| 143 | + $this->registerService(\OCP\IServerContainer::class, function(IServerContainer $c) { |
|
| 144 | 144 | return $c; |
| 145 | 145 | }); |
| 146 | 146 | |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $this->registerAlias(IActionFactory::class, ActionFactory::class); |
| 151 | 151 | |
| 152 | 152 | |
| 153 | - $this->registerService(\OCP\IPreview::class, function (Server $c) { |
|
| 153 | + $this->registerService(\OCP\IPreview::class, function(Server $c) { |
|
| 154 | 154 | return new PreviewManager( |
| 155 | 155 | $c->getConfig(), |
| 156 | 156 | $c->getRootFolder(), |
@@ -161,13 +161,13 @@ discard block |
||
| 161 | 161 | }); |
| 162 | 162 | $this->registerAlias('PreviewManager', \OCP\IPreview::class); |
| 163 | 163 | |
| 164 | - $this->registerService(\OC\Preview\Watcher::class, function (Server $c) { |
|
| 164 | + $this->registerService(\OC\Preview\Watcher::class, function(Server $c) { |
|
| 165 | 165 | return new \OC\Preview\Watcher( |
| 166 | 166 | $c->getAppDataDir('preview') |
| 167 | 167 | ); |
| 168 | 168 | }); |
| 169 | 169 | |
| 170 | - $this->registerService('EncryptionManager', function (Server $c) { |
|
| 170 | + $this->registerService('EncryptionManager', function(Server $c) { |
|
| 171 | 171 | $view = new View(); |
| 172 | 172 | $util = new Encryption\Util( |
| 173 | 173 | $view, |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | ); |
| 186 | 186 | }); |
| 187 | 187 | |
| 188 | - $this->registerService('EncryptionFileHelper', function (Server $c) { |
|
| 188 | + $this->registerService('EncryptionFileHelper', function(Server $c) { |
|
| 189 | 189 | $util = new Encryption\Util( |
| 190 | 190 | new View(), |
| 191 | 191 | $c->getUserManager(), |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | ); |
| 200 | 200 | }); |
| 201 | 201 | |
| 202 | - $this->registerService('EncryptionKeyStorage', function (Server $c) { |
|
| 202 | + $this->registerService('EncryptionKeyStorage', function(Server $c) { |
|
| 203 | 203 | $view = new View(); |
| 204 | 204 | $util = new Encryption\Util( |
| 205 | 205 | $view, |
@@ -210,32 +210,32 @@ discard block |
||
| 210 | 210 | |
| 211 | 211 | return new Encryption\Keys\Storage($view, $util); |
| 212 | 212 | }); |
| 213 | - $this->registerService('TagMapper', function (Server $c) { |
|
| 213 | + $this->registerService('TagMapper', function(Server $c) { |
|
| 214 | 214 | return new TagMapper($c->getDatabaseConnection()); |
| 215 | 215 | }); |
| 216 | 216 | |
| 217 | - $this->registerService(\OCP\ITagManager::class, function (Server $c) { |
|
| 217 | + $this->registerService(\OCP\ITagManager::class, function(Server $c) { |
|
| 218 | 218 | $tagMapper = $c->query('TagMapper'); |
| 219 | 219 | return new TagManager($tagMapper, $c->getUserSession()); |
| 220 | 220 | }); |
| 221 | 221 | $this->registerAlias('TagManager', \OCP\ITagManager::class); |
| 222 | 222 | |
| 223 | - $this->registerService('SystemTagManagerFactory', function (Server $c) { |
|
| 223 | + $this->registerService('SystemTagManagerFactory', function(Server $c) { |
|
| 224 | 224 | $config = $c->getConfig(); |
| 225 | 225 | $factoryClass = $config->getSystemValue('systemtags.managerFactory', '\OC\SystemTag\ManagerFactory'); |
| 226 | 226 | /** @var \OC\SystemTag\ManagerFactory $factory */ |
| 227 | 227 | $factory = new $factoryClass($this); |
| 228 | 228 | return $factory; |
| 229 | 229 | }); |
| 230 | - $this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) { |
|
| 230 | + $this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) { |
|
| 231 | 231 | return $c->query('SystemTagManagerFactory')->getManager(); |
| 232 | 232 | }); |
| 233 | 233 | $this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class); |
| 234 | 234 | |
| 235 | - $this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) { |
|
| 235 | + $this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) { |
|
| 236 | 236 | return $c->query('SystemTagManagerFactory')->getObjectMapper(); |
| 237 | 237 | }); |
| 238 | - $this->registerService('RootFolder', function (Server $c) { |
|
| 238 | + $this->registerService('RootFolder', function(Server $c) { |
|
| 239 | 239 | $manager = \OC\Files\Filesystem::getMountManager(null); |
| 240 | 240 | $view = new View(); |
| 241 | 241 | $root = new Root( |
@@ -256,37 +256,37 @@ discard block |
||
| 256 | 256 | }); |
| 257 | 257 | $this->registerAlias('SystemTagObjectMapper', \OCP\SystemTag\ISystemTagObjectMapper::class); |
| 258 | 258 | |
| 259 | - $this->registerService(\OCP\Files\IRootFolder::class, function (Server $c) { |
|
| 260 | - return new LazyRoot(function () use ($c) { |
|
| 259 | + $this->registerService(\OCP\Files\IRootFolder::class, function(Server $c) { |
|
| 260 | + return new LazyRoot(function() use ($c) { |
|
| 261 | 261 | return $c->query('RootFolder'); |
| 262 | 262 | }); |
| 263 | 263 | }); |
| 264 | 264 | $this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class); |
| 265 | 265 | |
| 266 | - $this->registerService(\OCP\IUserManager::class, function (Server $c) { |
|
| 266 | + $this->registerService(\OCP\IUserManager::class, function(Server $c) { |
|
| 267 | 267 | $config = $c->getConfig(); |
| 268 | 268 | return new \OC\User\Manager($config); |
| 269 | 269 | }); |
| 270 | 270 | $this->registerAlias('UserManager', \OCP\IUserManager::class); |
| 271 | 271 | |
| 272 | - $this->registerService(\OCP\IGroupManager::class, function (Server $c) { |
|
| 272 | + $this->registerService(\OCP\IGroupManager::class, function(Server $c) { |
|
| 273 | 273 | $groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger()); |
| 274 | - $groupManager->listen('\OC\Group', 'preCreate', function ($gid) { |
|
| 274 | + $groupManager->listen('\OC\Group', 'preCreate', function($gid) { |
|
| 275 | 275 | \OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid)); |
| 276 | 276 | }); |
| 277 | - $groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) { |
|
| 277 | + $groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) { |
|
| 278 | 278 | \OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID())); |
| 279 | 279 | }); |
| 280 | - $groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { |
|
| 280 | + $groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) { |
|
| 281 | 281 | \OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID())); |
| 282 | 282 | }); |
| 283 | - $groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { |
|
| 283 | + $groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) { |
|
| 284 | 284 | \OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID())); |
| 285 | 285 | }); |
| 286 | - $groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
| 286 | + $groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
| 287 | 287 | \OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID())); |
| 288 | 288 | }); |
| 289 | - $groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
| 289 | + $groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
| 290 | 290 | \OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
| 291 | 291 | //Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks |
| 292 | 292 | \OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | }); |
| 296 | 296 | $this->registerAlias('GroupManager', \OCP\IGroupManager::class); |
| 297 | 297 | |
| 298 | - $this->registerService(Store::class, function (Server $c) { |
|
| 298 | + $this->registerService(Store::class, function(Server $c) { |
|
| 299 | 299 | $session = $c->getSession(); |
| 300 | 300 | if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
| 301 | 301 | $tokenProvider = $c->query('OC\Authentication\Token\IProvider'); |
@@ -306,11 +306,11 @@ discard block |
||
| 306 | 306 | return new Store($session, $logger, $tokenProvider); |
| 307 | 307 | }); |
| 308 | 308 | $this->registerAlias(IStore::class, Store::class); |
| 309 | - $this->registerService('OC\Authentication\Token\DefaultTokenMapper', function (Server $c) { |
|
| 309 | + $this->registerService('OC\Authentication\Token\DefaultTokenMapper', function(Server $c) { |
|
| 310 | 310 | $dbConnection = $c->getDatabaseConnection(); |
| 311 | 311 | return new Authentication\Token\DefaultTokenMapper($dbConnection); |
| 312 | 312 | }); |
| 313 | - $this->registerService('OC\Authentication\Token\DefaultTokenProvider', function (Server $c) { |
|
| 313 | + $this->registerService('OC\Authentication\Token\DefaultTokenProvider', function(Server $c) { |
|
| 314 | 314 | $mapper = $c->query('OC\Authentication\Token\DefaultTokenMapper'); |
| 315 | 315 | $crypto = $c->getCrypto(); |
| 316 | 316 | $config = $c->getConfig(); |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | }); |
| 321 | 321 | $this->registerAlias('OC\Authentication\Token\IProvider', 'OC\Authentication\Token\DefaultTokenProvider'); |
| 322 | 322 | |
| 323 | - $this->registerService(\OCP\IUserSession::class, function (Server $c) { |
|
| 323 | + $this->registerService(\OCP\IUserSession::class, function(Server $c) { |
|
| 324 | 324 | $manager = $c->getUserManager(); |
| 325 | 325 | $session = new \OC\Session\Memory(''); |
| 326 | 326 | $timeFactory = new TimeFactory(); |
@@ -333,44 +333,44 @@ discard block |
||
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | $userSession = new \OC\User\Session($manager, $session, $timeFactory, $defaultTokenProvider, $c->getConfig(), $c->getSecureRandom(), $c->getLockdownManager()); |
| 336 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
| 336 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
| 337 | 337 | \OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password)); |
| 338 | 338 | }); |
| 339 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
| 339 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
| 340 | 340 | /** @var $user \OC\User\User */ |
| 341 | 341 | \OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password)); |
| 342 | 342 | }); |
| 343 | - $userSession->listen('\OC\User', 'preDelete', function ($user) { |
|
| 343 | + $userSession->listen('\OC\User', 'preDelete', function($user) { |
|
| 344 | 344 | /** @var $user \OC\User\User */ |
| 345 | 345 | \OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID())); |
| 346 | 346 | }); |
| 347 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
| 347 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
| 348 | 348 | /** @var $user \OC\User\User */ |
| 349 | 349 | \OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID())); |
| 350 | 350 | }); |
| 351 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
| 351 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
| 352 | 352 | /** @var $user \OC\User\User */ |
| 353 | 353 | \OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
| 354 | 354 | }); |
| 355 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
| 355 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
| 356 | 356 | /** @var $user \OC\User\User */ |
| 357 | 357 | \OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
| 358 | 358 | }); |
| 359 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
| 359 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
| 360 | 360 | \OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password)); |
| 361 | 361 | }); |
| 362 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $password) { |
|
| 362 | + $userSession->listen('\OC\User', 'postLogin', function($user, $password) { |
|
| 363 | 363 | /** @var $user \OC\User\User */ |
| 364 | 364 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
| 365 | 365 | }); |
| 366 | - $userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) { |
|
| 366 | + $userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) { |
|
| 367 | 367 | /** @var $user \OC\User\User */ |
| 368 | 368 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
| 369 | 369 | }); |
| 370 | - $userSession->listen('\OC\User', 'logout', function () { |
|
| 370 | + $userSession->listen('\OC\User', 'logout', function() { |
|
| 371 | 371 | \OC_Hook::emit('OC_User', 'logout', array()); |
| 372 | 372 | }); |
| 373 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) { |
|
| 373 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) { |
|
| 374 | 374 | /** @var $user \OC\User\User */ |
| 375 | 375 | \OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue)); |
| 376 | 376 | }); |
@@ -378,14 +378,14 @@ discard block |
||
| 378 | 378 | }); |
| 379 | 379 | $this->registerAlias('UserSession', \OCP\IUserSession::class); |
| 380 | 380 | |
| 381 | - $this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function (Server $c) { |
|
| 381 | + $this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function(Server $c) { |
|
| 382 | 382 | return new \OC\Authentication\TwoFactorAuth\Manager($c->getAppManager(), $c->getSession(), $c->getConfig(), $c->getActivityManager(), $c->getLogger()); |
| 383 | 383 | }); |
| 384 | 384 | |
| 385 | 385 | $this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class); |
| 386 | 386 | $this->registerAlias('NavigationManager', \OCP\INavigationManager::class); |
| 387 | 387 | |
| 388 | - $this->registerService(\OC\AllConfig::class, function (Server $c) { |
|
| 388 | + $this->registerService(\OC\AllConfig::class, function(Server $c) { |
|
| 389 | 389 | return new \OC\AllConfig( |
| 390 | 390 | $c->getSystemConfig() |
| 391 | 391 | ); |
@@ -393,17 +393,17 @@ discard block |
||
| 393 | 393 | $this->registerAlias('AllConfig', \OC\AllConfig::class); |
| 394 | 394 | $this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class); |
| 395 | 395 | |
| 396 | - $this->registerService('SystemConfig', function ($c) use ($config) { |
|
| 396 | + $this->registerService('SystemConfig', function($c) use ($config) { |
|
| 397 | 397 | return new \OC\SystemConfig($config); |
| 398 | 398 | }); |
| 399 | 399 | |
| 400 | - $this->registerService(\OC\AppConfig::class, function (Server $c) { |
|
| 400 | + $this->registerService(\OC\AppConfig::class, function(Server $c) { |
|
| 401 | 401 | return new \OC\AppConfig($c->getDatabaseConnection()); |
| 402 | 402 | }); |
| 403 | 403 | $this->registerAlias('AppConfig', \OC\AppConfig::class); |
| 404 | 404 | $this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class); |
| 405 | 405 | |
| 406 | - $this->registerService(\OCP\L10N\IFactory::class, function (Server $c) { |
|
| 406 | + $this->registerService(\OCP\L10N\IFactory::class, function(Server $c) { |
|
| 407 | 407 | return new \OC\L10N\Factory( |
| 408 | 408 | $c->getConfig(), |
| 409 | 409 | $c->getRequest(), |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | }); |
| 414 | 414 | $this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class); |
| 415 | 415 | |
| 416 | - $this->registerService(\OCP\IURLGenerator::class, function (Server $c) { |
|
| 416 | + $this->registerService(\OCP\IURLGenerator::class, function(Server $c) { |
|
| 417 | 417 | $config = $c->getConfig(); |
| 418 | 418 | $cacheFactory = $c->getMemCacheFactory(); |
| 419 | 419 | $request = $c->getRequest(); |
@@ -425,18 +425,18 @@ discard block |
||
| 425 | 425 | }); |
| 426 | 426 | $this->registerAlias('URLGenerator', \OCP\IURLGenerator::class); |
| 427 | 427 | |
| 428 | - $this->registerService('AppHelper', function ($c) { |
|
| 428 | + $this->registerService('AppHelper', function($c) { |
|
| 429 | 429 | return new \OC\AppHelper(); |
| 430 | 430 | }); |
| 431 | 431 | $this->registerAlias('AppFetcher', AppFetcher::class); |
| 432 | 432 | $this->registerAlias('CategoryFetcher', CategoryFetcher::class); |
| 433 | 433 | |
| 434 | - $this->registerService(\OCP\ICache::class, function ($c) { |
|
| 434 | + $this->registerService(\OCP\ICache::class, function($c) { |
|
| 435 | 435 | return new Cache\File(); |
| 436 | 436 | }); |
| 437 | 437 | $this->registerAlias('UserCache', \OCP\ICache::class); |
| 438 | 438 | |
| 439 | - $this->registerService(Factory::class, function (Server $c) { |
|
| 439 | + $this->registerService(Factory::class, function(Server $c) { |
|
| 440 | 440 | |
| 441 | 441 | $arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(), |
| 442 | 442 | '\\OC\\Memcache\\ArrayCache', |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | $version = implode(',', $v); |
| 454 | 454 | $instanceId = \OC_Util::getInstanceId(); |
| 455 | 455 | $path = \OC::$SERVERROOT; |
| 456 | - $prefix = md5($instanceId . '-' . $version . '-' . $path . '-' . $urlGenerator->getBaseUrl()); |
|
| 456 | + $prefix = md5($instanceId.'-'.$version.'-'.$path.'-'.$urlGenerator->getBaseUrl()); |
|
| 457 | 457 | return new \OC\Memcache\Factory($prefix, $c->getLogger(), |
| 458 | 458 | $config->getSystemValue('memcache.local', null), |
| 459 | 459 | $config->getSystemValue('memcache.distributed', null), |
@@ -466,12 +466,12 @@ discard block |
||
| 466 | 466 | $this->registerAlias('MemCacheFactory', Factory::class); |
| 467 | 467 | $this->registerAlias(ICacheFactory::class, Factory::class); |
| 468 | 468 | |
| 469 | - $this->registerService('RedisFactory', function (Server $c) { |
|
| 469 | + $this->registerService('RedisFactory', function(Server $c) { |
|
| 470 | 470 | $systemConfig = $c->getSystemConfig(); |
| 471 | 471 | return new RedisFactory($systemConfig); |
| 472 | 472 | }); |
| 473 | 473 | |
| 474 | - $this->registerService(\OCP\Activity\IManager::class, function (Server $c) { |
|
| 474 | + $this->registerService(\OCP\Activity\IManager::class, function(Server $c) { |
|
| 475 | 475 | return new \OC\Activity\Manager( |
| 476 | 476 | $c->getRequest(), |
| 477 | 477 | $c->getUserSession(), |
@@ -481,14 +481,14 @@ discard block |
||
| 481 | 481 | }); |
| 482 | 482 | $this->registerAlias('ActivityManager', \OCP\Activity\IManager::class); |
| 483 | 483 | |
| 484 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
| 484 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
| 485 | 485 | return new \OC\Activity\EventMerger( |
| 486 | 486 | $c->getL10N('lib') |
| 487 | 487 | ); |
| 488 | 488 | }); |
| 489 | 489 | $this->registerAlias(IValidator::class, Validator::class); |
| 490 | 490 | |
| 491 | - $this->registerService(\OCP\IAvatarManager::class, function (Server $c) { |
|
| 491 | + $this->registerService(\OCP\IAvatarManager::class, function(Server $c) { |
|
| 492 | 492 | return new AvatarManager( |
| 493 | 493 | $c->getUserManager(), |
| 494 | 494 | $c->getAppDataDir('avatar'), |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | }); |
| 500 | 500 | $this->registerAlias('AvatarManager', \OCP\IAvatarManager::class); |
| 501 | 501 | |
| 502 | - $this->registerService(\OCP\ILogger::class, function (Server $c) { |
|
| 502 | + $this->registerService(\OCP\ILogger::class, function(Server $c) { |
|
| 503 | 503 | $logType = $c->query('AllConfig')->getSystemValue('log_type', 'file'); |
| 504 | 504 | $logger = Log::getLogClass($logType); |
| 505 | 505 | call_user_func(array($logger, 'init')); |
@@ -508,7 +508,7 @@ discard block |
||
| 508 | 508 | }); |
| 509 | 509 | $this->registerAlias('Logger', \OCP\ILogger::class); |
| 510 | 510 | |
| 511 | - $this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) { |
|
| 511 | + $this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) { |
|
| 512 | 512 | $config = $c->getConfig(); |
| 513 | 513 | return new \OC\BackgroundJob\JobList( |
| 514 | 514 | $c->getDatabaseConnection(), |
@@ -518,7 +518,7 @@ discard block |
||
| 518 | 518 | }); |
| 519 | 519 | $this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class); |
| 520 | 520 | |
| 521 | - $this->registerService(\OCP\Route\IRouter::class, function (Server $c) { |
|
| 521 | + $this->registerService(\OCP\Route\IRouter::class, function(Server $c) { |
|
| 522 | 522 | $cacheFactory = $c->getMemCacheFactory(); |
| 523 | 523 | $logger = $c->getLogger(); |
| 524 | 524 | if ($cacheFactory->isAvailable()) { |
@@ -530,12 +530,12 @@ discard block |
||
| 530 | 530 | }); |
| 531 | 531 | $this->registerAlias('Router', \OCP\Route\IRouter::class); |
| 532 | 532 | |
| 533 | - $this->registerService(\OCP\ISearch::class, function ($c) { |
|
| 533 | + $this->registerService(\OCP\ISearch::class, function($c) { |
|
| 534 | 534 | return new Search(); |
| 535 | 535 | }); |
| 536 | 536 | $this->registerAlias('Search', \OCP\ISearch::class); |
| 537 | 537 | |
| 538 | - $this->registerService(\OC\Security\RateLimiting\Limiter::class, function ($c) { |
|
| 538 | + $this->registerService(\OC\Security\RateLimiting\Limiter::class, function($c) { |
|
| 539 | 539 | return new \OC\Security\RateLimiting\Limiter( |
| 540 | 540 | $this->getUserSession(), |
| 541 | 541 | $this->getRequest(), |
@@ -543,34 +543,34 @@ discard block |
||
| 543 | 543 | $c->query(\OC\Security\RateLimiting\Backend\IBackend::class) |
| 544 | 544 | ); |
| 545 | 545 | }); |
| 546 | - $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) { |
|
| 546 | + $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) { |
|
| 547 | 547 | return new \OC\Security\RateLimiting\Backend\MemoryCache( |
| 548 | 548 | $this->getMemCacheFactory(), |
| 549 | 549 | new \OC\AppFramework\Utility\TimeFactory() |
| 550 | 550 | ); |
| 551 | 551 | }); |
| 552 | 552 | |
| 553 | - $this->registerService(\OCP\Security\ISecureRandom::class, function ($c) { |
|
| 553 | + $this->registerService(\OCP\Security\ISecureRandom::class, function($c) { |
|
| 554 | 554 | return new SecureRandom(); |
| 555 | 555 | }); |
| 556 | 556 | $this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class); |
| 557 | 557 | |
| 558 | - $this->registerService(\OCP\Security\ICrypto::class, function (Server $c) { |
|
| 558 | + $this->registerService(\OCP\Security\ICrypto::class, function(Server $c) { |
|
| 559 | 559 | return new Crypto($c->getConfig(), $c->getSecureRandom()); |
| 560 | 560 | }); |
| 561 | 561 | $this->registerAlias('Crypto', \OCP\Security\ICrypto::class); |
| 562 | 562 | |
| 563 | - $this->registerService(\OCP\Security\IHasher::class, function (Server $c) { |
|
| 563 | + $this->registerService(\OCP\Security\IHasher::class, function(Server $c) { |
|
| 564 | 564 | return new Hasher($c->getConfig()); |
| 565 | 565 | }); |
| 566 | 566 | $this->registerAlias('Hasher', \OCP\Security\IHasher::class); |
| 567 | 567 | |
| 568 | - $this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) { |
|
| 568 | + $this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) { |
|
| 569 | 569 | return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection()); |
| 570 | 570 | }); |
| 571 | 571 | $this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class); |
| 572 | 572 | |
| 573 | - $this->registerService(IDBConnection::class, function (Server $c) { |
|
| 573 | + $this->registerService(IDBConnection::class, function(Server $c) { |
|
| 574 | 574 | $systemConfig = $c->getSystemConfig(); |
| 575 | 575 | $factory = new \OC\DB\ConnectionFactory($systemConfig); |
| 576 | 576 | $type = $systemConfig->getValue('dbtype', 'sqlite'); |
@@ -584,7 +584,7 @@ discard block |
||
| 584 | 584 | }); |
| 585 | 585 | $this->registerAlias('DatabaseConnection', IDBConnection::class); |
| 586 | 586 | |
| 587 | - $this->registerService('HTTPHelper', function (Server $c) { |
|
| 587 | + $this->registerService('HTTPHelper', function(Server $c) { |
|
| 588 | 588 | $config = $c->getConfig(); |
| 589 | 589 | return new HTTPHelper( |
| 590 | 590 | $config, |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | ); |
| 593 | 593 | }); |
| 594 | 594 | |
| 595 | - $this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) { |
|
| 595 | + $this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) { |
|
| 596 | 596 | $user = \OC_User::getUser(); |
| 597 | 597 | $uid = $user ? $user : null; |
| 598 | 598 | return new ClientService( |
@@ -607,7 +607,7 @@ discard block |
||
| 607 | 607 | ); |
| 608 | 608 | }); |
| 609 | 609 | $this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class); |
| 610 | - $this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) { |
|
| 610 | + $this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) { |
|
| 611 | 611 | $eventLogger = new EventLogger(); |
| 612 | 612 | if ($c->getSystemConfig()->getValue('debug', false)) { |
| 613 | 613 | // In debug mode, module is being activated by default |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | }); |
| 618 | 618 | $this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class); |
| 619 | 619 | |
| 620 | - $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) { |
|
| 620 | + $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) { |
|
| 621 | 621 | $queryLogger = new QueryLogger(); |
| 622 | 622 | if ($c->getSystemConfig()->getValue('debug', false)) { |
| 623 | 623 | // In debug mode, module is being activated by default |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | }); |
| 628 | 628 | $this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class); |
| 629 | 629 | |
| 630 | - $this->registerService(TempManager::class, function (Server $c) { |
|
| 630 | + $this->registerService(TempManager::class, function(Server $c) { |
|
| 631 | 631 | return new TempManager( |
| 632 | 632 | $c->getLogger(), |
| 633 | 633 | $c->getConfig() |
@@ -636,7 +636,7 @@ discard block |
||
| 636 | 636 | $this->registerAlias('TempManager', TempManager::class); |
| 637 | 637 | $this->registerAlias(ITempManager::class, TempManager::class); |
| 638 | 638 | |
| 639 | - $this->registerService(AppManager::class, function (Server $c) { |
|
| 639 | + $this->registerService(AppManager::class, function(Server $c) { |
|
| 640 | 640 | return new \OC\App\AppManager( |
| 641 | 641 | $c->getUserSession(), |
| 642 | 642 | $c->getAppConfig(), |
@@ -648,7 +648,7 @@ discard block |
||
| 648 | 648 | $this->registerAlias('AppManager', AppManager::class); |
| 649 | 649 | $this->registerAlias(IAppManager::class, AppManager::class); |
| 650 | 650 | |
| 651 | - $this->registerService(\OCP\IDateTimeZone::class, function (Server $c) { |
|
| 651 | + $this->registerService(\OCP\IDateTimeZone::class, function(Server $c) { |
|
| 652 | 652 | return new DateTimeZone( |
| 653 | 653 | $c->getConfig(), |
| 654 | 654 | $c->getSession() |
@@ -656,7 +656,7 @@ discard block |
||
| 656 | 656 | }); |
| 657 | 657 | $this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class); |
| 658 | 658 | |
| 659 | - $this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) { |
|
| 659 | + $this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) { |
|
| 660 | 660 | $language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null); |
| 661 | 661 | |
| 662 | 662 | return new DateTimeFormatter( |
@@ -666,7 +666,7 @@ discard block |
||
| 666 | 666 | }); |
| 667 | 667 | $this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class); |
| 668 | 668 | |
| 669 | - $this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) { |
|
| 669 | + $this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) { |
|
| 670 | 670 | $mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger()); |
| 671 | 671 | $listener = new UserMountCacheListener($mountCache); |
| 672 | 672 | $listener->listen($c->getUserManager()); |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | }); |
| 675 | 675 | $this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class); |
| 676 | 676 | |
| 677 | - $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) { |
|
| 677 | + $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) { |
|
| 678 | 678 | $loader = \OC\Files\Filesystem::getLoader(); |
| 679 | 679 | $mountCache = $c->query('UserMountCache'); |
| 680 | 680 | $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
@@ -690,10 +690,10 @@ discard block |
||
| 690 | 690 | }); |
| 691 | 691 | $this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class); |
| 692 | 692 | |
| 693 | - $this->registerService('IniWrapper', function ($c) { |
|
| 693 | + $this->registerService('IniWrapper', function($c) { |
|
| 694 | 694 | return new IniGetWrapper(); |
| 695 | 695 | }); |
| 696 | - $this->registerService('AsyncCommandBus', function (Server $c) { |
|
| 696 | + $this->registerService('AsyncCommandBus', function(Server $c) { |
|
| 697 | 697 | $busClass = $c->getConfig()->getSystemValue('commandbus'); |
| 698 | 698 | if ($busClass) { |
| 699 | 699 | list($app, $class) = explode('::', $busClass, 2); |
@@ -708,10 +708,10 @@ discard block |
||
| 708 | 708 | return new CronBus($jobList); |
| 709 | 709 | } |
| 710 | 710 | }); |
| 711 | - $this->registerService('TrustedDomainHelper', function ($c) { |
|
| 711 | + $this->registerService('TrustedDomainHelper', function($c) { |
|
| 712 | 712 | return new TrustedDomainHelper($this->getConfig()); |
| 713 | 713 | }); |
| 714 | - $this->registerService('Throttler', function (Server $c) { |
|
| 714 | + $this->registerService('Throttler', function(Server $c) { |
|
| 715 | 715 | return new Throttler( |
| 716 | 716 | $c->getDatabaseConnection(), |
| 717 | 717 | new TimeFactory(), |
@@ -719,7 +719,7 @@ discard block |
||
| 719 | 719 | $c->getConfig() |
| 720 | 720 | ); |
| 721 | 721 | }); |
| 722 | - $this->registerService('IntegrityCodeChecker', function (Server $c) { |
|
| 722 | + $this->registerService('IntegrityCodeChecker', function(Server $c) { |
|
| 723 | 723 | // IConfig and IAppManager requires a working database. This code |
| 724 | 724 | // might however be called when ownCloud is not yet setup. |
| 725 | 725 | if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
@@ -740,7 +740,7 @@ discard block |
||
| 740 | 740 | $c->getTempManager() |
| 741 | 741 | ); |
| 742 | 742 | }); |
| 743 | - $this->registerService(\OCP\IRequest::class, function ($c) { |
|
| 743 | + $this->registerService(\OCP\IRequest::class, function($c) { |
|
| 744 | 744 | if (isset($this['urlParams'])) { |
| 745 | 745 | $urlParams = $this['urlParams']; |
| 746 | 746 | } else { |
@@ -776,7 +776,7 @@ discard block |
||
| 776 | 776 | }); |
| 777 | 777 | $this->registerAlias('Request', \OCP\IRequest::class); |
| 778 | 778 | |
| 779 | - $this->registerService(\OCP\Mail\IMailer::class, function (Server $c) { |
|
| 779 | + $this->registerService(\OCP\Mail\IMailer::class, function(Server $c) { |
|
| 780 | 780 | return new Mailer( |
| 781 | 781 | $c->getConfig(), |
| 782 | 782 | $c->getLogger(), |
@@ -787,7 +787,7 @@ discard block |
||
| 787 | 787 | }); |
| 788 | 788 | $this->registerAlias('Mailer', \OCP\Mail\IMailer::class); |
| 789 | 789 | |
| 790 | - $this->registerService('LDAPProvider', function (Server $c) { |
|
| 790 | + $this->registerService('LDAPProvider', function(Server $c) { |
|
| 791 | 791 | $config = $c->getConfig(); |
| 792 | 792 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
| 793 | 793 | if (is_null($factoryClass)) { |
@@ -797,7 +797,7 @@ discard block |
||
| 797 | 797 | $factory = new $factoryClass($this); |
| 798 | 798 | return $factory->getLDAPProvider(); |
| 799 | 799 | }); |
| 800 | - $this->registerService(ILockingProvider::class, function (Server $c) { |
|
| 800 | + $this->registerService(ILockingProvider::class, function(Server $c) { |
|
| 801 | 801 | $ini = $c->getIniWrapper(); |
| 802 | 802 | $config = $c->getConfig(); |
| 803 | 803 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -814,49 +814,49 @@ discard block |
||
| 814 | 814 | }); |
| 815 | 815 | $this->registerAlias('LockingProvider', ILockingProvider::class); |
| 816 | 816 | |
| 817 | - $this->registerService(\OCP\Files\Mount\IMountManager::class, function () { |
|
| 817 | + $this->registerService(\OCP\Files\Mount\IMountManager::class, function() { |
|
| 818 | 818 | return new \OC\Files\Mount\Manager(); |
| 819 | 819 | }); |
| 820 | 820 | $this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class); |
| 821 | 821 | |
| 822 | - $this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) { |
|
| 822 | + $this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) { |
|
| 823 | 823 | return new \OC\Files\Type\Detection( |
| 824 | 824 | $c->getURLGenerator(), |
| 825 | 825 | \OC::$configDir, |
| 826 | - \OC::$SERVERROOT . '/resources/config/' |
|
| 826 | + \OC::$SERVERROOT.'/resources/config/' |
|
| 827 | 827 | ); |
| 828 | 828 | }); |
| 829 | 829 | $this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class); |
| 830 | 830 | |
| 831 | - $this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) { |
|
| 831 | + $this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) { |
|
| 832 | 832 | return new \OC\Files\Type\Loader( |
| 833 | 833 | $c->getDatabaseConnection() |
| 834 | 834 | ); |
| 835 | 835 | }); |
| 836 | 836 | $this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class); |
| 837 | - $this->registerService(BundleFetcher::class, function () { |
|
| 837 | + $this->registerService(BundleFetcher::class, function() { |
|
| 838 | 838 | return new BundleFetcher($this->getL10N('lib')); |
| 839 | 839 | }); |
| 840 | - $this->registerService(\OCP\Notification\IManager::class, function (Server $c) { |
|
| 840 | + $this->registerService(\OCP\Notification\IManager::class, function(Server $c) { |
|
| 841 | 841 | return new Manager( |
| 842 | 842 | $c->query(IValidator::class) |
| 843 | 843 | ); |
| 844 | 844 | }); |
| 845 | 845 | $this->registerAlias('NotificationManager', \OCP\Notification\IManager::class); |
| 846 | 846 | |
| 847 | - $this->registerService(\OC\CapabilitiesManager::class, function (Server $c) { |
|
| 847 | + $this->registerService(\OC\CapabilitiesManager::class, function(Server $c) { |
|
| 848 | 848 | $manager = new \OC\CapabilitiesManager($c->getLogger()); |
| 849 | - $manager->registerCapability(function () use ($c) { |
|
| 849 | + $manager->registerCapability(function() use ($c) { |
|
| 850 | 850 | return new \OC\OCS\CoreCapabilities($c->getConfig()); |
| 851 | 851 | }); |
| 852 | - $manager->registerCapability(function () use ($c) { |
|
| 852 | + $manager->registerCapability(function() use ($c) { |
|
| 853 | 853 | return $c->query(\OC\Security\Bruteforce\Capabilities::class); |
| 854 | 854 | }); |
| 855 | 855 | return $manager; |
| 856 | 856 | }); |
| 857 | 857 | $this->registerAlias('CapabilitiesManager', \OC\CapabilitiesManager::class); |
| 858 | 858 | |
| 859 | - $this->registerService(\OCP\Comments\ICommentsManager::class, function (Server $c) { |
|
| 859 | + $this->registerService(\OCP\Comments\ICommentsManager::class, function(Server $c) { |
|
| 860 | 860 | $config = $c->getConfig(); |
| 861 | 861 | $factoryClass = $config->getSystemValue('comments.managerFactory', '\OC\Comments\ManagerFactory'); |
| 862 | 862 | /** @var \OCP\Comments\ICommentsManagerFactory $factory */ |
@@ -865,7 +865,7 @@ discard block |
||
| 865 | 865 | }); |
| 866 | 866 | $this->registerAlias('CommentsManager', \OCP\Comments\ICommentsManager::class); |
| 867 | 867 | |
| 868 | - $this->registerService('ThemingDefaults', function (Server $c) { |
|
| 868 | + $this->registerService('ThemingDefaults', function(Server $c) { |
|
| 869 | 869 | /* |
| 870 | 870 | * Dark magic for autoloader. |
| 871 | 871 | * If we do a class_exists it will try to load the class which will |
@@ -891,7 +891,7 @@ discard block |
||
| 891 | 891 | } |
| 892 | 892 | return new \OC_Defaults(); |
| 893 | 893 | }); |
| 894 | - $this->registerService(SCSSCacher::class, function (Server $c) { |
|
| 894 | + $this->registerService(SCSSCacher::class, function(Server $c) { |
|
| 895 | 895 | /** @var Factory $cacheFactory */ |
| 896 | 896 | $cacheFactory = $c->query(Factory::class); |
| 897 | 897 | return new SCSSCacher( |
@@ -904,13 +904,13 @@ discard block |
||
| 904 | 904 | $cacheFactory->create('SCSS') |
| 905 | 905 | ); |
| 906 | 906 | }); |
| 907 | - $this->registerService(EventDispatcher::class, function () { |
|
| 907 | + $this->registerService(EventDispatcher::class, function() { |
|
| 908 | 908 | return new EventDispatcher(); |
| 909 | 909 | }); |
| 910 | 910 | $this->registerAlias('EventDispatcher', EventDispatcher::class); |
| 911 | 911 | $this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class); |
| 912 | 912 | |
| 913 | - $this->registerService('CryptoWrapper', function (Server $c) { |
|
| 913 | + $this->registerService('CryptoWrapper', function(Server $c) { |
|
| 914 | 914 | // FIXME: Instantiiated here due to cyclic dependency |
| 915 | 915 | $request = new Request( |
| 916 | 916 | [ |
@@ -935,7 +935,7 @@ discard block |
||
| 935 | 935 | $request |
| 936 | 936 | ); |
| 937 | 937 | }); |
| 938 | - $this->registerService('CsrfTokenManager', function (Server $c) { |
|
| 938 | + $this->registerService('CsrfTokenManager', function(Server $c) { |
|
| 939 | 939 | $tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom()); |
| 940 | 940 | |
| 941 | 941 | return new CsrfTokenManager( |
@@ -943,22 +943,22 @@ discard block |
||
| 943 | 943 | $c->query(SessionStorage::class) |
| 944 | 944 | ); |
| 945 | 945 | }); |
| 946 | - $this->registerService(SessionStorage::class, function (Server $c) { |
|
| 946 | + $this->registerService(SessionStorage::class, function(Server $c) { |
|
| 947 | 947 | return new SessionStorage($c->getSession()); |
| 948 | 948 | }); |
| 949 | - $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) { |
|
| 949 | + $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) { |
|
| 950 | 950 | return new ContentSecurityPolicyManager(); |
| 951 | 951 | }); |
| 952 | 952 | $this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class); |
| 953 | 953 | |
| 954 | - $this->registerService('ContentSecurityPolicyNonceManager', function (Server $c) { |
|
| 954 | + $this->registerService('ContentSecurityPolicyNonceManager', function(Server $c) { |
|
| 955 | 955 | return new ContentSecurityPolicyNonceManager( |
| 956 | 956 | $c->getCsrfTokenManager(), |
| 957 | 957 | $c->getRequest() |
| 958 | 958 | ); |
| 959 | 959 | }); |
| 960 | 960 | |
| 961 | - $this->registerService(\OCP\Share\IManager::class, function (Server $c) { |
|
| 961 | + $this->registerService(\OCP\Share\IManager::class, function(Server $c) { |
|
| 962 | 962 | $config = $c->getConfig(); |
| 963 | 963 | $factoryClass = $config->getSystemValue('sharing.managerFactory', '\OC\Share20\ProviderFactory'); |
| 964 | 964 | /** @var \OCP\Share\IProviderFactory $factory */ |
@@ -985,7 +985,7 @@ discard block |
||
| 985 | 985 | }); |
| 986 | 986 | $this->registerAlias('ShareManager', \OCP\Share\IManager::class); |
| 987 | 987 | |
| 988 | - $this->registerService('SettingsManager', function (Server $c) { |
|
| 988 | + $this->registerService('SettingsManager', function(Server $c) { |
|
| 989 | 989 | $manager = new \OC\Settings\Manager( |
| 990 | 990 | $c->getLogger(), |
| 991 | 991 | $c->getDatabaseConnection(), |
@@ -1005,29 +1005,29 @@ discard block |
||
| 1005 | 1005 | ); |
| 1006 | 1006 | return $manager; |
| 1007 | 1007 | }); |
| 1008 | - $this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) { |
|
| 1008 | + $this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) { |
|
| 1009 | 1009 | return new \OC\Files\AppData\Factory( |
| 1010 | 1010 | $c->getRootFolder(), |
| 1011 | 1011 | $c->getSystemConfig() |
| 1012 | 1012 | ); |
| 1013 | 1013 | }); |
| 1014 | 1014 | |
| 1015 | - $this->registerService('LockdownManager', function (Server $c) { |
|
| 1016 | - return new LockdownManager(function () use ($c) { |
|
| 1015 | + $this->registerService('LockdownManager', function(Server $c) { |
|
| 1016 | + return new LockdownManager(function() use ($c) { |
|
| 1017 | 1017 | return $c->getSession(); |
| 1018 | 1018 | }); |
| 1019 | 1019 | }); |
| 1020 | 1020 | |
| 1021 | - $this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) { |
|
| 1021 | + $this->registerService(\OCP\OCS\IDiscoveryService::class, function(Server $c) { |
|
| 1022 | 1022 | return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService()); |
| 1023 | 1023 | }); |
| 1024 | 1024 | |
| 1025 | - $this->registerService(ICloudIdManager::class, function (Server $c) { |
|
| 1025 | + $this->registerService(ICloudIdManager::class, function(Server $c) { |
|
| 1026 | 1026 | return new CloudIdManager(); |
| 1027 | 1027 | }); |
| 1028 | 1028 | |
| 1029 | 1029 | /* To trick DI since we don't extend the DIContainer here */ |
| 1030 | - $this->registerService(CleanPreviewsBackgroundJob::class, function (Server $c) { |
|
| 1030 | + $this->registerService(CleanPreviewsBackgroundJob::class, function(Server $c) { |
|
| 1031 | 1031 | return new CleanPreviewsBackgroundJob( |
| 1032 | 1032 | $c->getRootFolder(), |
| 1033 | 1033 | $c->getLogger(), |
@@ -1042,18 +1042,18 @@ discard block |
||
| 1042 | 1042 | $this->registerAlias(\OCP\AppFramework\Utility\ITimeFactory::class, \OC\AppFramework\Utility\TimeFactory::class); |
| 1043 | 1043 | $this->registerAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class); |
| 1044 | 1044 | |
| 1045 | - $this->registerService(Defaults::class, function (Server $c) { |
|
| 1045 | + $this->registerService(Defaults::class, function(Server $c) { |
|
| 1046 | 1046 | return new Defaults( |
| 1047 | 1047 | $c->getThemingDefaults() |
| 1048 | 1048 | ); |
| 1049 | 1049 | }); |
| 1050 | 1050 | $this->registerAlias('Defaults', \OCP\Defaults::class); |
| 1051 | 1051 | |
| 1052 | - $this->registerService(\OCP\ISession::class, function (SimpleContainer $c) { |
|
| 1052 | + $this->registerService(\OCP\ISession::class, function(SimpleContainer $c) { |
|
| 1053 | 1053 | return $c->query(\OCP\IUserSession::class)->getSession(); |
| 1054 | 1054 | }); |
| 1055 | 1055 | |
| 1056 | - $this->registerService(IShareHelper::class, function (Server $c) { |
|
| 1056 | + $this->registerService(IShareHelper::class, function(Server $c) { |
|
| 1057 | 1057 | return new ShareHelper( |
| 1058 | 1058 | $c->query(\OCP\Share\IManager::class) |
| 1059 | 1059 | ); |
@@ -1194,7 +1194,7 @@ discard block |
||
| 1194 | 1194 | * @deprecated since 9.2.0 use IAppData |
| 1195 | 1195 | */ |
| 1196 | 1196 | public function getAppFolder() { |
| 1197 | - $dir = '/' . \OC_App::getCurrentApp(); |
|
| 1197 | + $dir = '/'.\OC_App::getCurrentApp(); |
|
| 1198 | 1198 | $root = $this->getRootFolder(); |
| 1199 | 1199 | if (!$root->nodeExists($dir)) { |
| 1200 | 1200 | $folder = $root->newFolder($dir); |