@@ -164,8 +164,8 @@ |
||
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | /** |
| 167 | - * @param array $states |
|
| 168 | - * @param IProvider $providers |
|
| 167 | + * @param string[] $states |
|
| 168 | + * @param IProvider[] $providers |
|
| 169 | 169 | */ |
| 170 | 170 | private function isProviderMissing(array $states, array $providers): bool { |
| 171 | 171 | $indexed = []; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | /** |
| 5 | 5 | * @copyright Copyright (c) 2016, ownCloud, Inc. |
| 6 | 6 | * |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | |
| 192 | 192 | if (!empty($missing)) { |
| 193 | 193 | // There was at least one provider missing |
| 194 | - $this->logger->alert(count($missing) . " two-factor auuth providers failed to load", |
|
| 194 | + $this->logger->alert(count($missing)." two-factor auuth providers failed to load", |
|
| 195 | 195 | [ |
| 196 | 196 | 'app' => 'core', |
| 197 | 197 | ]); |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | $isProviderMissing = $this->isProviderMissing($fixedStates, $providers); |
| 218 | 218 | |
| 219 | 219 | $enabled = array_filter($providers, |
| 220 | - function (IProvider $provider) use ($fixedStates) { |
|
| 220 | + function(IProvider $provider) use ($fixedStates) { |
|
| 221 | 221 | return $fixedStates[$provider->getId()]; |
| 222 | 222 | }); |
| 223 | 223 | return new ProviderSet($enabled, $isProviderMissing); |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * @copyright 2018 Christoph Wurst <[email protected]> |
@@ -101,9 +101,9 @@ discard block |
||
| 101 | 101 | return; |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - $output->writeln($title . ":"); |
|
| 104 | + $output->writeln($title.":"); |
|
| 105 | 105 | foreach ($providers as $provider) { |
| 106 | - $output->writeln("- " . $provider); |
|
| 106 | + $output->writeln("- ".$provider); |
|
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | // To find out if we are running from CLI or not |
| 168 | 168 | $this->registerParameter('isCLI', \OC::$CLI); |
| 169 | 169 | |
| 170 | - $this->registerService(\OCP\IServerContainer::class, function (IServerContainer $c) { |
|
| 170 | + $this->registerService(\OCP\IServerContainer::class, function(IServerContainer $c) { |
|
| 171 | 171 | return $c; |
| 172 | 172 | }); |
| 173 | 173 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | $this->registerAlias(IActionFactory::class, ActionFactory::class); |
| 181 | 181 | |
| 182 | 182 | |
| 183 | - $this->registerService(\OCP\IPreview::class, function (Server $c) { |
|
| 183 | + $this->registerService(\OCP\IPreview::class, function(Server $c) { |
|
| 184 | 184 | return new PreviewManager( |
| 185 | 185 | $c->getConfig(), |
| 186 | 186 | $c->getRootFolder(), |
@@ -191,13 +191,13 @@ discard block |
||
| 191 | 191 | }); |
| 192 | 192 | $this->registerAlias('PreviewManager', \OCP\IPreview::class); |
| 193 | 193 | |
| 194 | - $this->registerService(\OC\Preview\Watcher::class, function (Server $c) { |
|
| 194 | + $this->registerService(\OC\Preview\Watcher::class, function(Server $c) { |
|
| 195 | 195 | return new \OC\Preview\Watcher( |
| 196 | 196 | $c->getAppDataDir('preview') |
| 197 | 197 | ); |
| 198 | 198 | }); |
| 199 | 199 | |
| 200 | - $this->registerService('EncryptionManager', function (Server $c) { |
|
| 200 | + $this->registerService('EncryptionManager', function(Server $c) { |
|
| 201 | 201 | $view = new View(); |
| 202 | 202 | $util = new Encryption\Util( |
| 203 | 203 | $view, |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | ); |
| 216 | 216 | }); |
| 217 | 217 | |
| 218 | - $this->registerService('EncryptionFileHelper', function (Server $c) { |
|
| 218 | + $this->registerService('EncryptionFileHelper', function(Server $c) { |
|
| 219 | 219 | $util = new Encryption\Util( |
| 220 | 220 | new View(), |
| 221 | 221 | $c->getUserManager(), |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | ); |
| 230 | 230 | }); |
| 231 | 231 | |
| 232 | - $this->registerService('EncryptionKeyStorage', function (Server $c) { |
|
| 232 | + $this->registerService('EncryptionKeyStorage', function(Server $c) { |
|
| 233 | 233 | $view = new View(); |
| 234 | 234 | $util = new Encryption\Util( |
| 235 | 235 | $view, |
@@ -240,30 +240,30 @@ discard block |
||
| 240 | 240 | |
| 241 | 241 | return new Encryption\Keys\Storage($view, $util); |
| 242 | 242 | }); |
| 243 | - $this->registerService('TagMapper', function (Server $c) { |
|
| 243 | + $this->registerService('TagMapper', function(Server $c) { |
|
| 244 | 244 | return new TagMapper($c->getDatabaseConnection()); |
| 245 | 245 | }); |
| 246 | 246 | |
| 247 | - $this->registerService(\OCP\ITagManager::class, function (Server $c) { |
|
| 247 | + $this->registerService(\OCP\ITagManager::class, function(Server $c) { |
|
| 248 | 248 | $tagMapper = $c->query('TagMapper'); |
| 249 | 249 | return new TagManager($tagMapper, $c->getUserSession()); |
| 250 | 250 | }); |
| 251 | 251 | $this->registerAlias('TagManager', \OCP\ITagManager::class); |
| 252 | 252 | |
| 253 | - $this->registerService('SystemTagManagerFactory', function (Server $c) { |
|
| 253 | + $this->registerService('SystemTagManagerFactory', function(Server $c) { |
|
| 254 | 254 | $config = $c->getConfig(); |
| 255 | 255 | $factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class); |
| 256 | 256 | return new $factoryClass($this); |
| 257 | 257 | }); |
| 258 | - $this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) { |
|
| 258 | + $this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) { |
|
| 259 | 259 | return $c->query('SystemTagManagerFactory')->getManager(); |
| 260 | 260 | }); |
| 261 | 261 | $this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class); |
| 262 | 262 | |
| 263 | - $this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) { |
|
| 263 | + $this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) { |
|
| 264 | 264 | return $c->query('SystemTagManagerFactory')->getObjectMapper(); |
| 265 | 265 | }); |
| 266 | - $this->registerService('RootFolder', function (Server $c) { |
|
| 266 | + $this->registerService('RootFolder', function(Server $c) { |
|
| 267 | 267 | $manager = \OC\Files\Filesystem::getMountManager(null); |
| 268 | 268 | $view = new View(); |
| 269 | 269 | $root = new Root( |
@@ -284,38 +284,38 @@ discard block |
||
| 284 | 284 | }); |
| 285 | 285 | $this->registerAlias('SystemTagObjectMapper', \OCP\SystemTag\ISystemTagObjectMapper::class); |
| 286 | 286 | |
| 287 | - $this->registerService(\OCP\Files\IRootFolder::class, function (Server $c) { |
|
| 288 | - return new LazyRoot(function () use ($c) { |
|
| 287 | + $this->registerService(\OCP\Files\IRootFolder::class, function(Server $c) { |
|
| 288 | + return new LazyRoot(function() use ($c) { |
|
| 289 | 289 | return $c->query('RootFolder'); |
| 290 | 290 | }); |
| 291 | 291 | }); |
| 292 | 292 | $this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class); |
| 293 | 293 | |
| 294 | - $this->registerService(\OC\User\Manager::class, function (Server $c) { |
|
| 294 | + $this->registerService(\OC\User\Manager::class, function(Server $c) { |
|
| 295 | 295 | $config = $c->getConfig(); |
| 296 | 296 | return new \OC\User\Manager($config); |
| 297 | 297 | }); |
| 298 | 298 | $this->registerAlias('UserManager', \OC\User\Manager::class); |
| 299 | 299 | $this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class); |
| 300 | 300 | |
| 301 | - $this->registerService(\OCP\IGroupManager::class, function (Server $c) { |
|
| 301 | + $this->registerService(\OCP\IGroupManager::class, function(Server $c) { |
|
| 302 | 302 | $groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger()); |
| 303 | - $groupManager->listen('\OC\Group', 'preCreate', function ($gid) { |
|
| 303 | + $groupManager->listen('\OC\Group', 'preCreate', function($gid) { |
|
| 304 | 304 | \OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid)); |
| 305 | 305 | }); |
| 306 | - $groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) { |
|
| 306 | + $groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) { |
|
| 307 | 307 | \OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID())); |
| 308 | 308 | }); |
| 309 | - $groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { |
|
| 309 | + $groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) { |
|
| 310 | 310 | \OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID())); |
| 311 | 311 | }); |
| 312 | - $groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { |
|
| 312 | + $groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) { |
|
| 313 | 313 | \OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID())); |
| 314 | 314 | }); |
| 315 | - $groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
| 315 | + $groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
| 316 | 316 | \OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID())); |
| 317 | 317 | }); |
| 318 | - $groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
| 318 | + $groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
| 319 | 319 | \OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
| 320 | 320 | //Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks |
| 321 | 321 | \OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | }); |
| 325 | 325 | $this->registerAlias('GroupManager', \OCP\IGroupManager::class); |
| 326 | 326 | |
| 327 | - $this->registerService(Store::class, function (Server $c) { |
|
| 327 | + $this->registerService(Store::class, function(Server $c) { |
|
| 328 | 328 | $session = $c->getSession(); |
| 329 | 329 | if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
| 330 | 330 | $tokenProvider = $c->query(IProvider::class); |
@@ -335,11 +335,11 @@ discard block |
||
| 335 | 335 | return new Store($session, $logger, $tokenProvider); |
| 336 | 336 | }); |
| 337 | 337 | $this->registerAlias(IStore::class, Store::class); |
| 338 | - $this->registerService(Authentication\Token\DefaultTokenMapper::class, function (Server $c) { |
|
| 338 | + $this->registerService(Authentication\Token\DefaultTokenMapper::class, function(Server $c) { |
|
| 339 | 339 | $dbConnection = $c->getDatabaseConnection(); |
| 340 | 340 | return new Authentication\Token\DefaultTokenMapper($dbConnection); |
| 341 | 341 | }); |
| 342 | - $this->registerService(Authentication\Token\DefaultTokenProvider::class, function (Server $c) { |
|
| 342 | + $this->registerService(Authentication\Token\DefaultTokenProvider::class, function(Server $c) { |
|
| 343 | 343 | $mapper = $c->query(Authentication\Token\DefaultTokenMapper::class); |
| 344 | 344 | $crypto = $c->getCrypto(); |
| 345 | 345 | $config = $c->getConfig(); |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | }); |
| 350 | 350 | $this->registerAlias(IProvider::class, Authentication\Token\DefaultTokenProvider::class); |
| 351 | 351 | |
| 352 | - $this->registerService(\OCP\IUserSession::class, function (Server $c) { |
|
| 352 | + $this->registerService(\OCP\IUserSession::class, function(Server $c) { |
|
| 353 | 353 | $manager = $c->getUserManager(); |
| 354 | 354 | $session = new \OC\Session\Memory(''); |
| 355 | 355 | $timeFactory = new TimeFactory(); |
@@ -373,45 +373,45 @@ discard block |
||
| 373 | 373 | $c->getLockdownManager(), |
| 374 | 374 | $c->getLogger() |
| 375 | 375 | ); |
| 376 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
| 376 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
| 377 | 377 | \OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password)); |
| 378 | 378 | }); |
| 379 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
| 379 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
| 380 | 380 | /** @var $user \OC\User\User */ |
| 381 | 381 | \OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password)); |
| 382 | 382 | }); |
| 383 | - $userSession->listen('\OC\User', 'preDelete', function ($user) use ($dispatcher) { |
|
| 383 | + $userSession->listen('\OC\User', 'preDelete', function($user) use ($dispatcher) { |
|
| 384 | 384 | /** @var $user \OC\User\User */ |
| 385 | 385 | \OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID())); |
| 386 | 386 | $dispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user)); |
| 387 | 387 | }); |
| 388 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
| 388 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
| 389 | 389 | /** @var $user \OC\User\User */ |
| 390 | 390 | \OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID())); |
| 391 | 391 | }); |
| 392 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
| 392 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
| 393 | 393 | /** @var $user \OC\User\User */ |
| 394 | 394 | \OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
| 395 | 395 | }); |
| 396 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
| 396 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
| 397 | 397 | /** @var $user \OC\User\User */ |
| 398 | 398 | \OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
| 399 | 399 | }); |
| 400 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
| 400 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
| 401 | 401 | \OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password)); |
| 402 | 402 | }); |
| 403 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $password) { |
|
| 403 | + $userSession->listen('\OC\User', 'postLogin', function($user, $password) { |
|
| 404 | 404 | /** @var $user \OC\User\User */ |
| 405 | 405 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
| 406 | 406 | }); |
| 407 | - $userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) { |
|
| 407 | + $userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) { |
|
| 408 | 408 | /** @var $user \OC\User\User */ |
| 409 | 409 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
| 410 | 410 | }); |
| 411 | - $userSession->listen('\OC\User', 'logout', function () { |
|
| 411 | + $userSession->listen('\OC\User', 'logout', function() { |
|
| 412 | 412 | \OC_Hook::emit('OC_User', 'logout', array()); |
| 413 | 413 | }); |
| 414 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) use ($dispatcher) { |
|
| 414 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) use ($dispatcher) { |
|
| 415 | 415 | /** @var $user \OC\User\User */ |
| 416 | 416 | \OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue)); |
| 417 | 417 | $dispatcher->dispatch('OCP\IUser::changeUser', new GenericEvent($user, ['feature' => $feature, 'oldValue' => $oldValue, 'value' => $value])); |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | $this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class); |
| 426 | 426 | $this->registerAlias('NavigationManager', \OCP\INavigationManager::class); |
| 427 | 427 | |
| 428 | - $this->registerService(\OC\AllConfig::class, function (Server $c) { |
|
| 428 | + $this->registerService(\OC\AllConfig::class, function(Server $c) { |
|
| 429 | 429 | return new \OC\AllConfig( |
| 430 | 430 | $c->getSystemConfig() |
| 431 | 431 | ); |
@@ -433,17 +433,17 @@ discard block |
||
| 433 | 433 | $this->registerAlias('AllConfig', \OC\AllConfig::class); |
| 434 | 434 | $this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class); |
| 435 | 435 | |
| 436 | - $this->registerService('SystemConfig', function ($c) use ($config) { |
|
| 436 | + $this->registerService('SystemConfig', function($c) use ($config) { |
|
| 437 | 437 | return new \OC\SystemConfig($config); |
| 438 | 438 | }); |
| 439 | 439 | |
| 440 | - $this->registerService(\OC\AppConfig::class, function (Server $c) { |
|
| 440 | + $this->registerService(\OC\AppConfig::class, function(Server $c) { |
|
| 441 | 441 | return new \OC\AppConfig($c->getDatabaseConnection()); |
| 442 | 442 | }); |
| 443 | 443 | $this->registerAlias('AppConfig', \OC\AppConfig::class); |
| 444 | 444 | $this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class); |
| 445 | 445 | |
| 446 | - $this->registerService(\OCP\L10N\IFactory::class, function (Server $c) { |
|
| 446 | + $this->registerService(\OCP\L10N\IFactory::class, function(Server $c) { |
|
| 447 | 447 | return new \OC\L10N\Factory( |
| 448 | 448 | $c->getConfig(), |
| 449 | 449 | $c->getRequest(), |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | }); |
| 454 | 454 | $this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class); |
| 455 | 455 | |
| 456 | - $this->registerService(\OCP\IURLGenerator::class, function (Server $c) { |
|
| 456 | + $this->registerService(\OCP\IURLGenerator::class, function(Server $c) { |
|
| 457 | 457 | $config = $c->getConfig(); |
| 458 | 458 | $cacheFactory = $c->getMemCacheFactory(); |
| 459 | 459 | $request = $c->getRequest(); |
@@ -468,12 +468,12 @@ discard block |
||
| 468 | 468 | $this->registerAlias('AppFetcher', AppFetcher::class); |
| 469 | 469 | $this->registerAlias('CategoryFetcher', CategoryFetcher::class); |
| 470 | 470 | |
| 471 | - $this->registerService(\OCP\ICache::class, function ($c) { |
|
| 471 | + $this->registerService(\OCP\ICache::class, function($c) { |
|
| 472 | 472 | return new Cache\File(); |
| 473 | 473 | }); |
| 474 | 474 | $this->registerAlias('UserCache', \OCP\ICache::class); |
| 475 | 475 | |
| 476 | - $this->registerService(Factory::class, function (Server $c) { |
|
| 476 | + $this->registerService(Factory::class, function(Server $c) { |
|
| 477 | 477 | |
| 478 | 478 | $arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(), |
| 479 | 479 | ArrayCache::class, |
@@ -490,7 +490,7 @@ discard block |
||
| 490 | 490 | $version = implode(',', $v); |
| 491 | 491 | $instanceId = \OC_Util::getInstanceId(); |
| 492 | 492 | $path = \OC::$SERVERROOT; |
| 493 | - $prefix = md5($instanceId . '-' . $version . '-' . $path); |
|
| 493 | + $prefix = md5($instanceId.'-'.$version.'-'.$path); |
|
| 494 | 494 | return new \OC\Memcache\Factory($prefix, $c->getLogger(), |
| 495 | 495 | $config->getSystemValue('memcache.local', null), |
| 496 | 496 | $config->getSystemValue('memcache.distributed', null), |
@@ -503,12 +503,12 @@ discard block |
||
| 503 | 503 | $this->registerAlias('MemCacheFactory', Factory::class); |
| 504 | 504 | $this->registerAlias(ICacheFactory::class, Factory::class); |
| 505 | 505 | |
| 506 | - $this->registerService('RedisFactory', function (Server $c) { |
|
| 506 | + $this->registerService('RedisFactory', function(Server $c) { |
|
| 507 | 507 | $systemConfig = $c->getSystemConfig(); |
| 508 | 508 | return new RedisFactory($systemConfig); |
| 509 | 509 | }); |
| 510 | 510 | |
| 511 | - $this->registerService(\OCP\Activity\IManager::class, function (Server $c) { |
|
| 511 | + $this->registerService(\OCP\Activity\IManager::class, function(Server $c) { |
|
| 512 | 512 | return new \OC\Activity\Manager( |
| 513 | 513 | $c->getRequest(), |
| 514 | 514 | $c->getUserSession(), |
@@ -518,14 +518,14 @@ discard block |
||
| 518 | 518 | }); |
| 519 | 519 | $this->registerAlias('ActivityManager', \OCP\Activity\IManager::class); |
| 520 | 520 | |
| 521 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
| 521 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
| 522 | 522 | return new \OC\Activity\EventMerger( |
| 523 | 523 | $c->getL10N('lib') |
| 524 | 524 | ); |
| 525 | 525 | }); |
| 526 | 526 | $this->registerAlias(IValidator::class, Validator::class); |
| 527 | 527 | |
| 528 | - $this->registerService(\OCP\IAvatarManager::class, function (Server $c) { |
|
| 528 | + $this->registerService(\OCP\IAvatarManager::class, function(Server $c) { |
|
| 529 | 529 | return new AvatarManager( |
| 530 | 530 | $c->query(\OC\User\Manager::class), |
| 531 | 531 | $c->getAppDataDir('avatar'), |
@@ -538,7 +538,7 @@ discard block |
||
| 538 | 538 | |
| 539 | 539 | $this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class); |
| 540 | 540 | |
| 541 | - $this->registerService(\OCP\ILogger::class, function (Server $c) { |
|
| 541 | + $this->registerService(\OCP\ILogger::class, function(Server $c) { |
|
| 542 | 542 | $logType = $c->query('AllConfig')->getSystemValue('log_type', 'file'); |
| 543 | 543 | $factory = new LogFactory($c, $this->getSystemConfig()); |
| 544 | 544 | $logger = $factory->get($logType); |
@@ -548,11 +548,11 @@ discard block |
||
| 548 | 548 | }); |
| 549 | 549 | $this->registerAlias('Logger', \OCP\ILogger::class); |
| 550 | 550 | |
| 551 | - $this->registerService(ILogFactory::class, function (Server $c) { |
|
| 551 | + $this->registerService(ILogFactory::class, function(Server $c) { |
|
| 552 | 552 | return new LogFactory($c, $this->getSystemConfig()); |
| 553 | 553 | }); |
| 554 | 554 | |
| 555 | - $this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) { |
|
| 555 | + $this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) { |
|
| 556 | 556 | $config = $c->getConfig(); |
| 557 | 557 | return new \OC\BackgroundJob\JobList( |
| 558 | 558 | $c->getDatabaseConnection(), |
@@ -562,7 +562,7 @@ discard block |
||
| 562 | 562 | }); |
| 563 | 563 | $this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class); |
| 564 | 564 | |
| 565 | - $this->registerService(\OCP\Route\IRouter::class, function (Server $c) { |
|
| 565 | + $this->registerService(\OCP\Route\IRouter::class, function(Server $c) { |
|
| 566 | 566 | $cacheFactory = $c->getMemCacheFactory(); |
| 567 | 567 | $logger = $c->getLogger(); |
| 568 | 568 | if ($cacheFactory->isLocalCacheAvailable()) { |
@@ -574,12 +574,12 @@ discard block |
||
| 574 | 574 | }); |
| 575 | 575 | $this->registerAlias('Router', \OCP\Route\IRouter::class); |
| 576 | 576 | |
| 577 | - $this->registerService(\OCP\ISearch::class, function ($c) { |
|
| 577 | + $this->registerService(\OCP\ISearch::class, function($c) { |
|
| 578 | 578 | return new Search(); |
| 579 | 579 | }); |
| 580 | 580 | $this->registerAlias('Search', \OCP\ISearch::class); |
| 581 | 581 | |
| 582 | - $this->registerService(\OC\Security\RateLimiting\Limiter::class, function (Server $c) { |
|
| 582 | + $this->registerService(\OC\Security\RateLimiting\Limiter::class, function(Server $c) { |
|
| 583 | 583 | return new \OC\Security\RateLimiting\Limiter( |
| 584 | 584 | $this->getUserSession(), |
| 585 | 585 | $this->getRequest(), |
@@ -587,34 +587,34 @@ discard block |
||
| 587 | 587 | $c->query(\OC\Security\RateLimiting\Backend\IBackend::class) |
| 588 | 588 | ); |
| 589 | 589 | }); |
| 590 | - $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) { |
|
| 590 | + $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) { |
|
| 591 | 591 | return new \OC\Security\RateLimiting\Backend\MemoryCache( |
| 592 | 592 | $this->getMemCacheFactory(), |
| 593 | 593 | new \OC\AppFramework\Utility\TimeFactory() |
| 594 | 594 | ); |
| 595 | 595 | }); |
| 596 | 596 | |
| 597 | - $this->registerService(\OCP\Security\ISecureRandom::class, function ($c) { |
|
| 597 | + $this->registerService(\OCP\Security\ISecureRandom::class, function($c) { |
|
| 598 | 598 | return new SecureRandom(); |
| 599 | 599 | }); |
| 600 | 600 | $this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class); |
| 601 | 601 | |
| 602 | - $this->registerService(\OCP\Security\ICrypto::class, function (Server $c) { |
|
| 602 | + $this->registerService(\OCP\Security\ICrypto::class, function(Server $c) { |
|
| 603 | 603 | return new Crypto($c->getConfig(), $c->getSecureRandom()); |
| 604 | 604 | }); |
| 605 | 605 | $this->registerAlias('Crypto', \OCP\Security\ICrypto::class); |
| 606 | 606 | |
| 607 | - $this->registerService(\OCP\Security\IHasher::class, function (Server $c) { |
|
| 607 | + $this->registerService(\OCP\Security\IHasher::class, function(Server $c) { |
|
| 608 | 608 | return new Hasher($c->getConfig()); |
| 609 | 609 | }); |
| 610 | 610 | $this->registerAlias('Hasher', \OCP\Security\IHasher::class); |
| 611 | 611 | |
| 612 | - $this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) { |
|
| 612 | + $this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) { |
|
| 613 | 613 | return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection()); |
| 614 | 614 | }); |
| 615 | 615 | $this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class); |
| 616 | 616 | |
| 617 | - $this->registerService(IDBConnection::class, function (Server $c) { |
|
| 617 | + $this->registerService(IDBConnection::class, function(Server $c) { |
|
| 618 | 618 | $systemConfig = $c->getSystemConfig(); |
| 619 | 619 | $factory = new \OC\DB\ConnectionFactory($systemConfig); |
| 620 | 620 | $type = $systemConfig->getValue('dbtype', 'sqlite'); |
@@ -629,7 +629,7 @@ discard block |
||
| 629 | 629 | $this->registerAlias('DatabaseConnection', IDBConnection::class); |
| 630 | 630 | |
| 631 | 631 | |
| 632 | - $this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) { |
|
| 632 | + $this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) { |
|
| 633 | 633 | $user = \OC_User::getUser(); |
| 634 | 634 | $uid = $user ? $user : null; |
| 635 | 635 | return new ClientService( |
@@ -644,7 +644,7 @@ discard block |
||
| 644 | 644 | ); |
| 645 | 645 | }); |
| 646 | 646 | $this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class); |
| 647 | - $this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) { |
|
| 647 | + $this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) { |
|
| 648 | 648 | $eventLogger = new EventLogger(); |
| 649 | 649 | if ($c->getSystemConfig()->getValue('debug', false)) { |
| 650 | 650 | // In debug mode, module is being activated by default |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | }); |
| 655 | 655 | $this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class); |
| 656 | 656 | |
| 657 | - $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) { |
|
| 657 | + $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) { |
|
| 658 | 658 | $queryLogger = new QueryLogger(); |
| 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('QueryLogger', \OCP\Diagnostics\IQueryLogger::class); |
| 666 | 666 | |
| 667 | - $this->registerService(TempManager::class, function (Server $c) { |
|
| 667 | + $this->registerService(TempManager::class, function(Server $c) { |
|
| 668 | 668 | return new TempManager( |
| 669 | 669 | $c->getLogger(), |
| 670 | 670 | $c->getConfig() |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | $this->registerAlias('TempManager', TempManager::class); |
| 674 | 674 | $this->registerAlias(ITempManager::class, TempManager::class); |
| 675 | 675 | |
| 676 | - $this->registerService(AppManager::class, function (Server $c) { |
|
| 676 | + $this->registerService(AppManager::class, function(Server $c) { |
|
| 677 | 677 | return new \OC\App\AppManager( |
| 678 | 678 | $c->getUserSession(), |
| 679 | 679 | $c->query(\OC\AppConfig::class), |
@@ -685,7 +685,7 @@ discard block |
||
| 685 | 685 | $this->registerAlias('AppManager', AppManager::class); |
| 686 | 686 | $this->registerAlias(IAppManager::class, AppManager::class); |
| 687 | 687 | |
| 688 | - $this->registerService(\OCP\IDateTimeZone::class, function (Server $c) { |
|
| 688 | + $this->registerService(\OCP\IDateTimeZone::class, function(Server $c) { |
|
| 689 | 689 | return new DateTimeZone( |
| 690 | 690 | $c->getConfig(), |
| 691 | 691 | $c->getSession() |
@@ -693,7 +693,7 @@ discard block |
||
| 693 | 693 | }); |
| 694 | 694 | $this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class); |
| 695 | 695 | |
| 696 | - $this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) { |
|
| 696 | + $this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) { |
|
| 697 | 697 | $language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null); |
| 698 | 698 | |
| 699 | 699 | return new DateTimeFormatter( |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | }); |
| 704 | 704 | $this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class); |
| 705 | 705 | |
| 706 | - $this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) { |
|
| 706 | + $this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) { |
|
| 707 | 707 | $mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger()); |
| 708 | 708 | $listener = new UserMountCacheListener($mountCache); |
| 709 | 709 | $listener->listen($c->getUserManager()); |
@@ -711,7 +711,7 @@ discard block |
||
| 711 | 711 | }); |
| 712 | 712 | $this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class); |
| 713 | 713 | |
| 714 | - $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) { |
|
| 714 | + $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) { |
|
| 715 | 715 | $loader = \OC\Files\Filesystem::getLoader(); |
| 716 | 716 | $mountCache = $c->query('UserMountCache'); |
| 717 | 717 | $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
@@ -727,10 +727,10 @@ discard block |
||
| 727 | 727 | }); |
| 728 | 728 | $this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class); |
| 729 | 729 | |
| 730 | - $this->registerService('IniWrapper', function ($c) { |
|
| 730 | + $this->registerService('IniWrapper', function($c) { |
|
| 731 | 731 | return new IniGetWrapper(); |
| 732 | 732 | }); |
| 733 | - $this->registerService('AsyncCommandBus', function (Server $c) { |
|
| 733 | + $this->registerService('AsyncCommandBus', function(Server $c) { |
|
| 734 | 734 | $busClass = $c->getConfig()->getSystemValue('commandbus'); |
| 735 | 735 | if ($busClass) { |
| 736 | 736 | list($app, $class) = explode('::', $busClass, 2); |
@@ -745,10 +745,10 @@ discard block |
||
| 745 | 745 | return new CronBus($jobList); |
| 746 | 746 | } |
| 747 | 747 | }); |
| 748 | - $this->registerService('TrustedDomainHelper', function ($c) { |
|
| 748 | + $this->registerService('TrustedDomainHelper', function($c) { |
|
| 749 | 749 | return new TrustedDomainHelper($this->getConfig()); |
| 750 | 750 | }); |
| 751 | - $this->registerService('Throttler', function (Server $c) { |
|
| 751 | + $this->registerService('Throttler', function(Server $c) { |
|
| 752 | 752 | return new Throttler( |
| 753 | 753 | $c->getDatabaseConnection(), |
| 754 | 754 | new TimeFactory(), |
@@ -756,7 +756,7 @@ discard block |
||
| 756 | 756 | $c->getConfig() |
| 757 | 757 | ); |
| 758 | 758 | }); |
| 759 | - $this->registerService('IntegrityCodeChecker', function (Server $c) { |
|
| 759 | + $this->registerService('IntegrityCodeChecker', function(Server $c) { |
|
| 760 | 760 | // IConfig and IAppManager requires a working database. This code |
| 761 | 761 | // might however be called when ownCloud is not yet setup. |
| 762 | 762 | if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
@@ -777,7 +777,7 @@ discard block |
||
| 777 | 777 | $c->getTempManager() |
| 778 | 778 | ); |
| 779 | 779 | }); |
| 780 | - $this->registerService(\OCP\IRequest::class, function ($c) { |
|
| 780 | + $this->registerService(\OCP\IRequest::class, function($c) { |
|
| 781 | 781 | if (isset($this['urlParams'])) { |
| 782 | 782 | $urlParams = $this['urlParams']; |
| 783 | 783 | } else { |
@@ -813,7 +813,7 @@ discard block |
||
| 813 | 813 | }); |
| 814 | 814 | $this->registerAlias('Request', \OCP\IRequest::class); |
| 815 | 815 | |
| 816 | - $this->registerService(\OCP\Mail\IMailer::class, function (Server $c) { |
|
| 816 | + $this->registerService(\OCP\Mail\IMailer::class, function(Server $c) { |
|
| 817 | 817 | return new Mailer( |
| 818 | 818 | $c->getConfig(), |
| 819 | 819 | $c->getLogger(), |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | }); |
| 825 | 825 | $this->registerAlias('Mailer', \OCP\Mail\IMailer::class); |
| 826 | 826 | |
| 827 | - $this->registerService('LDAPProvider', function (Server $c) { |
|
| 827 | + $this->registerService('LDAPProvider', function(Server $c) { |
|
| 828 | 828 | $config = $c->getConfig(); |
| 829 | 829 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
| 830 | 830 | if (is_null($factoryClass)) { |
@@ -834,7 +834,7 @@ discard block |
||
| 834 | 834 | $factory = new $factoryClass($this); |
| 835 | 835 | return $factory->getLDAPProvider(); |
| 836 | 836 | }); |
| 837 | - $this->registerService(ILockingProvider::class, function (Server $c) { |
|
| 837 | + $this->registerService(ILockingProvider::class, function(Server $c) { |
|
| 838 | 838 | $ini = $c->getIniWrapper(); |
| 839 | 839 | $config = $c->getConfig(); |
| 840 | 840 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -857,49 +857,49 @@ discard block |
||
| 857 | 857 | }); |
| 858 | 858 | $this->registerAlias('LockingProvider', ILockingProvider::class); |
| 859 | 859 | |
| 860 | - $this->registerService(\OCP\Files\Mount\IMountManager::class, function () { |
|
| 860 | + $this->registerService(\OCP\Files\Mount\IMountManager::class, function() { |
|
| 861 | 861 | return new \OC\Files\Mount\Manager(); |
| 862 | 862 | }); |
| 863 | 863 | $this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class); |
| 864 | 864 | |
| 865 | - $this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) { |
|
| 865 | + $this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) { |
|
| 866 | 866 | return new \OC\Files\Type\Detection( |
| 867 | 867 | $c->getURLGenerator(), |
| 868 | 868 | \OC::$configDir, |
| 869 | - \OC::$SERVERROOT . '/resources/config/' |
|
| 869 | + \OC::$SERVERROOT.'/resources/config/' |
|
| 870 | 870 | ); |
| 871 | 871 | }); |
| 872 | 872 | $this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class); |
| 873 | 873 | |
| 874 | - $this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) { |
|
| 874 | + $this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) { |
|
| 875 | 875 | return new \OC\Files\Type\Loader( |
| 876 | 876 | $c->getDatabaseConnection() |
| 877 | 877 | ); |
| 878 | 878 | }); |
| 879 | 879 | $this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class); |
| 880 | - $this->registerService(BundleFetcher::class, function () { |
|
| 880 | + $this->registerService(BundleFetcher::class, function() { |
|
| 881 | 881 | return new BundleFetcher($this->getL10N('lib')); |
| 882 | 882 | }); |
| 883 | - $this->registerService(\OCP\Notification\IManager::class, function (Server $c) { |
|
| 883 | + $this->registerService(\OCP\Notification\IManager::class, function(Server $c) { |
|
| 884 | 884 | return new Manager( |
| 885 | 885 | $c->query(IValidator::class) |
| 886 | 886 | ); |
| 887 | 887 | }); |
| 888 | 888 | $this->registerAlias('NotificationManager', \OCP\Notification\IManager::class); |
| 889 | 889 | |
| 890 | - $this->registerService(\OC\CapabilitiesManager::class, function (Server $c) { |
|
| 890 | + $this->registerService(\OC\CapabilitiesManager::class, function(Server $c) { |
|
| 891 | 891 | $manager = new \OC\CapabilitiesManager($c->getLogger()); |
| 892 | - $manager->registerCapability(function () use ($c) { |
|
| 892 | + $manager->registerCapability(function() use ($c) { |
|
| 893 | 893 | return new \OC\OCS\CoreCapabilities($c->getConfig()); |
| 894 | 894 | }); |
| 895 | - $manager->registerCapability(function () use ($c) { |
|
| 895 | + $manager->registerCapability(function() use ($c) { |
|
| 896 | 896 | return $c->query(\OC\Security\Bruteforce\Capabilities::class); |
| 897 | 897 | }); |
| 898 | 898 | return $manager; |
| 899 | 899 | }); |
| 900 | 900 | $this->registerAlias('CapabilitiesManager', \OC\CapabilitiesManager::class); |
| 901 | 901 | |
| 902 | - $this->registerService(\OCP\Comments\ICommentsManager::class, function (Server $c) { |
|
| 902 | + $this->registerService(\OCP\Comments\ICommentsManager::class, function(Server $c) { |
|
| 903 | 903 | $config = $c->getConfig(); |
| 904 | 904 | $factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class); |
| 905 | 905 | /** @var \OCP\Comments\ICommentsManagerFactory $factory */ |
@@ -909,7 +909,7 @@ discard block |
||
| 909 | 909 | $manager->registerDisplayNameResolver('user', function($id) use ($c) { |
| 910 | 910 | $manager = $c->getUserManager(); |
| 911 | 911 | $user = $manager->get($id); |
| 912 | - if(is_null($user)) { |
|
| 912 | + if (is_null($user)) { |
|
| 913 | 913 | $l = $c->getL10N('core'); |
| 914 | 914 | $displayName = $l->t('Unknown user'); |
| 915 | 915 | } else { |
@@ -922,7 +922,7 @@ discard block |
||
| 922 | 922 | }); |
| 923 | 923 | $this->registerAlias('CommentsManager', \OCP\Comments\ICommentsManager::class); |
| 924 | 924 | |
| 925 | - $this->registerService('ThemingDefaults', function (Server $c) { |
|
| 925 | + $this->registerService('ThemingDefaults', function(Server $c) { |
|
| 926 | 926 | /* |
| 927 | 927 | * Dark magic for autoloader. |
| 928 | 928 | * If we do a class_exists it will try to load the class which will |
@@ -949,7 +949,7 @@ discard block |
||
| 949 | 949 | } |
| 950 | 950 | return new \OC_Defaults(); |
| 951 | 951 | }); |
| 952 | - $this->registerService(SCSSCacher::class, function (Server $c) { |
|
| 952 | + $this->registerService(SCSSCacher::class, function(Server $c) { |
|
| 953 | 953 | /** @var Factory $cacheFactory */ |
| 954 | 954 | $cacheFactory = $c->query(Factory::class); |
| 955 | 955 | return new SCSSCacher( |
@@ -962,7 +962,7 @@ discard block |
||
| 962 | 962 | $this->getMemCacheFactory() |
| 963 | 963 | ); |
| 964 | 964 | }); |
| 965 | - $this->registerService(JSCombiner::class, function (Server $c) { |
|
| 965 | + $this->registerService(JSCombiner::class, function(Server $c) { |
|
| 966 | 966 | /** @var Factory $cacheFactory */ |
| 967 | 967 | $cacheFactory = $c->query(Factory::class); |
| 968 | 968 | return new JSCombiner( |
@@ -973,13 +973,13 @@ discard block |
||
| 973 | 973 | $c->getLogger() |
| 974 | 974 | ); |
| 975 | 975 | }); |
| 976 | - $this->registerService(EventDispatcher::class, function () { |
|
| 976 | + $this->registerService(EventDispatcher::class, function() { |
|
| 977 | 977 | return new EventDispatcher(); |
| 978 | 978 | }); |
| 979 | 979 | $this->registerAlias('EventDispatcher', EventDispatcher::class); |
| 980 | 980 | $this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class); |
| 981 | 981 | |
| 982 | - $this->registerService('CryptoWrapper', function (Server $c) { |
|
| 982 | + $this->registerService('CryptoWrapper', function(Server $c) { |
|
| 983 | 983 | // FIXME: Instantiiated here due to cyclic dependency |
| 984 | 984 | $request = new Request( |
| 985 | 985 | [ |
@@ -1004,7 +1004,7 @@ discard block |
||
| 1004 | 1004 | $request |
| 1005 | 1005 | ); |
| 1006 | 1006 | }); |
| 1007 | - $this->registerService('CsrfTokenManager', function (Server $c) { |
|
| 1007 | + $this->registerService('CsrfTokenManager', function(Server $c) { |
|
| 1008 | 1008 | $tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom()); |
| 1009 | 1009 | |
| 1010 | 1010 | return new CsrfTokenManager( |
@@ -1012,22 +1012,22 @@ discard block |
||
| 1012 | 1012 | $c->query(SessionStorage::class) |
| 1013 | 1013 | ); |
| 1014 | 1014 | }); |
| 1015 | - $this->registerService(SessionStorage::class, function (Server $c) { |
|
| 1015 | + $this->registerService(SessionStorage::class, function(Server $c) { |
|
| 1016 | 1016 | return new SessionStorage($c->getSession()); |
| 1017 | 1017 | }); |
| 1018 | - $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) { |
|
| 1018 | + $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) { |
|
| 1019 | 1019 | return new ContentSecurityPolicyManager(); |
| 1020 | 1020 | }); |
| 1021 | 1021 | $this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class); |
| 1022 | 1022 | |
| 1023 | - $this->registerService('ContentSecurityPolicyNonceManager', function (Server $c) { |
|
| 1023 | + $this->registerService('ContentSecurityPolicyNonceManager', function(Server $c) { |
|
| 1024 | 1024 | return new ContentSecurityPolicyNonceManager( |
| 1025 | 1025 | $c->getCsrfTokenManager(), |
| 1026 | 1026 | $c->getRequest() |
| 1027 | 1027 | ); |
| 1028 | 1028 | }); |
| 1029 | 1029 | |
| 1030 | - $this->registerService(\OCP\Share\IManager::class, function (Server $c) { |
|
| 1030 | + $this->registerService(\OCP\Share\IManager::class, function(Server $c) { |
|
| 1031 | 1031 | $config = $c->getConfig(); |
| 1032 | 1032 | $factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class); |
| 1033 | 1033 | /** @var \OCP\Share\IProviderFactory $factory */ |
@@ -1070,7 +1070,7 @@ discard block |
||
| 1070 | 1070 | |
| 1071 | 1071 | $this->registerAlias(\OCP\Collaboration\AutoComplete\IManager::class, \OC\Collaboration\AutoComplete\Manager::class); |
| 1072 | 1072 | |
| 1073 | - $this->registerService('SettingsManager', function (Server $c) { |
|
| 1073 | + $this->registerService('SettingsManager', function(Server $c) { |
|
| 1074 | 1074 | $manager = new \OC\Settings\Manager( |
| 1075 | 1075 | $c->getLogger(), |
| 1076 | 1076 | $c->getDatabaseConnection(), |
@@ -1088,24 +1088,24 @@ discard block |
||
| 1088 | 1088 | ); |
| 1089 | 1089 | return $manager; |
| 1090 | 1090 | }); |
| 1091 | - $this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) { |
|
| 1091 | + $this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) { |
|
| 1092 | 1092 | return new \OC\Files\AppData\Factory( |
| 1093 | 1093 | $c->getRootFolder(), |
| 1094 | 1094 | $c->getSystemConfig() |
| 1095 | 1095 | ); |
| 1096 | 1096 | }); |
| 1097 | 1097 | |
| 1098 | - $this->registerService('LockdownManager', function (Server $c) { |
|
| 1099 | - return new LockdownManager(function () use ($c) { |
|
| 1098 | + $this->registerService('LockdownManager', function(Server $c) { |
|
| 1099 | + return new LockdownManager(function() use ($c) { |
|
| 1100 | 1100 | return $c->getSession(); |
| 1101 | 1101 | }); |
| 1102 | 1102 | }); |
| 1103 | 1103 | |
| 1104 | - $this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) { |
|
| 1104 | + $this->registerService(\OCP\OCS\IDiscoveryService::class, function(Server $c) { |
|
| 1105 | 1105 | return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService()); |
| 1106 | 1106 | }); |
| 1107 | 1107 | |
| 1108 | - $this->registerService(ICloudIdManager::class, function (Server $c) { |
|
| 1108 | + $this->registerService(ICloudIdManager::class, function(Server $c) { |
|
| 1109 | 1109 | return new CloudIdManager(); |
| 1110 | 1110 | }); |
| 1111 | 1111 | |
@@ -1115,18 +1115,18 @@ discard block |
||
| 1115 | 1115 | $this->registerAlias(\OCP\AppFramework\Utility\ITimeFactory::class, \OC\AppFramework\Utility\TimeFactory::class); |
| 1116 | 1116 | $this->registerAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class); |
| 1117 | 1117 | |
| 1118 | - $this->registerService(Defaults::class, function (Server $c) { |
|
| 1118 | + $this->registerService(Defaults::class, function(Server $c) { |
|
| 1119 | 1119 | return new Defaults( |
| 1120 | 1120 | $c->getThemingDefaults() |
| 1121 | 1121 | ); |
| 1122 | 1122 | }); |
| 1123 | 1123 | $this->registerAlias('Defaults', \OCP\Defaults::class); |
| 1124 | 1124 | |
| 1125 | - $this->registerService(\OCP\ISession::class, function (SimpleContainer $c) { |
|
| 1125 | + $this->registerService(\OCP\ISession::class, function(SimpleContainer $c) { |
|
| 1126 | 1126 | return $c->query(\OCP\IUserSession::class)->getSession(); |
| 1127 | 1127 | }); |
| 1128 | 1128 | |
| 1129 | - $this->registerService(IShareHelper::class, function (Server $c) { |
|
| 1129 | + $this->registerService(IShareHelper::class, function(Server $c) { |
|
| 1130 | 1130 | return new ShareHelper( |
| 1131 | 1131 | $c->query(\OCP\Share\IManager::class) |
| 1132 | 1132 | ); |
@@ -1188,11 +1188,11 @@ discard block |
||
| 1188 | 1188 | // no avatar to remove |
| 1189 | 1189 | } catch (\Exception $e) { |
| 1190 | 1190 | // Ignore exceptions |
| 1191 | - $logger->info('Could not cleanup avatar of ' . $user->getUID()); |
|
| 1191 | + $logger->info('Could not cleanup avatar of '.$user->getUID()); |
|
| 1192 | 1192 | } |
| 1193 | 1193 | }); |
| 1194 | 1194 | |
| 1195 | - $dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) { |
|
| 1195 | + $dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) { |
|
| 1196 | 1196 | $manager = $this->getAvatarManager(); |
| 1197 | 1197 | /** @var IUser $user */ |
| 1198 | 1198 | $user = $e->getSubject(); |
@@ -1343,7 +1343,7 @@ discard block |
||
| 1343 | 1343 | * @deprecated since 9.2.0 use IAppData |
| 1344 | 1344 | */ |
| 1345 | 1345 | public function getAppFolder() { |
| 1346 | - $dir = '/' . \OC_App::getCurrentApp(); |
|
| 1346 | + $dir = '/'.\OC_App::getCurrentApp(); |
|
| 1347 | 1347 | $root = $this->getRootFolder(); |
| 1348 | 1348 | if (!$root->nodeExists($dir)) { |
| 1349 | 1349 | $folder = $root->newFolder($dir); |
@@ -1918,7 +1918,7 @@ discard block |
||
| 1918 | 1918 | /** |
| 1919 | 1919 | * @return \OCP\Collaboration\AutoComplete\IManager |
| 1920 | 1920 | */ |
| 1921 | - public function getAutoCompleteManager(){ |
|
| 1921 | + public function getAutoCompleteManager() { |
|
| 1922 | 1922 | return $this->query(IManager::class); |
| 1923 | 1923 | } |
| 1924 | 1924 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * @copyright 2018 Christoph Wurst <[email protected]> |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * @copyright 2018 Christoph Wurst <[email protected]> |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * @copyright 2018 Christoph Wurst <[email protected]> |