@@ -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 |
@@ -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]> |
@@ -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 | * |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | |
200 | 200 | if (!empty($missing)) { |
201 | 201 | // There was at least one provider missing |
202 | - $this->logger->alert(count($missing) . " two-factor auth providers failed to load", ['app' => 'core']); |
|
202 | + $this->logger->alert(count($missing)." two-factor auth providers failed to load", ['app' => 'core']); |
|
203 | 203 | |
204 | 204 | return true; |
205 | 205 | } |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $fixedStates = $this->fixMissingProviderStates($providerStates, $providers, $user); |
222 | 222 | $isProviderMissing = $this->isProviderMissing($fixedStates, $providers); |
223 | 223 | |
224 | - $enabled = array_filter($providers, function (IProvider $provider) use ($fixedStates) { |
|
224 | + $enabled = array_filter($providers, function(IProvider $provider) use ($fixedStates) { |
|
225 | 225 | return $fixedStates[$provider->getId()]; |
226 | 226 | }); |
227 | 227 | return new ProviderSet($enabled, $isProviderMissing); |
@@ -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,13 +335,13 @@ 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 | 342 | $this->registerAlias(IProvider::class, Authentication\Token\Manager::class); |
343 | 343 | |
344 | - $this->registerService(\OCP\IUserSession::class, function (Server $c) { |
|
344 | + $this->registerService(\OCP\IUserSession::class, function(Server $c) { |
|
345 | 345 | $manager = $c->getUserManager(); |
346 | 346 | $session = new \OC\Session\Memory(''); |
347 | 347 | $timeFactory = new TimeFactory(); |
@@ -365,45 +365,45 @@ discard block |
||
365 | 365 | $c->getLockdownManager(), |
366 | 366 | $c->getLogger() |
367 | 367 | ); |
368 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
368 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
369 | 369 | \OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password)); |
370 | 370 | }); |
371 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
371 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
372 | 372 | /** @var $user \OC\User\User */ |
373 | 373 | \OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password)); |
374 | 374 | }); |
375 | - $userSession->listen('\OC\User', 'preDelete', function ($user) use ($dispatcher) { |
|
375 | + $userSession->listen('\OC\User', 'preDelete', function($user) use ($dispatcher) { |
|
376 | 376 | /** @var $user \OC\User\User */ |
377 | 377 | \OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID())); |
378 | 378 | $dispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user)); |
379 | 379 | }); |
380 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
380 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
381 | 381 | /** @var $user \OC\User\User */ |
382 | 382 | \OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID())); |
383 | 383 | }); |
384 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
384 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
385 | 385 | /** @var $user \OC\User\User */ |
386 | 386 | \OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
387 | 387 | }); |
388 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
388 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
389 | 389 | /** @var $user \OC\User\User */ |
390 | 390 | \OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
391 | 391 | }); |
392 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
392 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
393 | 393 | \OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password)); |
394 | 394 | }); |
395 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $password) { |
|
395 | + $userSession->listen('\OC\User', 'postLogin', function($user, $password) { |
|
396 | 396 | /** @var $user \OC\User\User */ |
397 | 397 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
398 | 398 | }); |
399 | - $userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) { |
|
399 | + $userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) { |
|
400 | 400 | /** @var $user \OC\User\User */ |
401 | 401 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
402 | 402 | }); |
403 | - $userSession->listen('\OC\User', 'logout', function () { |
|
403 | + $userSession->listen('\OC\User', 'logout', function() { |
|
404 | 404 | \OC_Hook::emit('OC_User', 'logout', array()); |
405 | 405 | }); |
406 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) use ($dispatcher) { |
|
406 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) use ($dispatcher) { |
|
407 | 407 | /** @var $user \OC\User\User */ |
408 | 408 | \OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue)); |
409 | 409 | $dispatcher->dispatch('OCP\IUser::changeUser', new GenericEvent($user, ['feature' => $feature, 'oldValue' => $oldValue, 'value' => $value])); |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | $this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class); |
418 | 418 | $this->registerAlias('NavigationManager', \OCP\INavigationManager::class); |
419 | 419 | |
420 | - $this->registerService(\OC\AllConfig::class, function (Server $c) { |
|
420 | + $this->registerService(\OC\AllConfig::class, function(Server $c) { |
|
421 | 421 | return new \OC\AllConfig( |
422 | 422 | $c->getSystemConfig() |
423 | 423 | ); |
@@ -425,17 +425,17 @@ discard block |
||
425 | 425 | $this->registerAlias('AllConfig', \OC\AllConfig::class); |
426 | 426 | $this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class); |
427 | 427 | |
428 | - $this->registerService('SystemConfig', function ($c) use ($config) { |
|
428 | + $this->registerService('SystemConfig', function($c) use ($config) { |
|
429 | 429 | return new \OC\SystemConfig($config); |
430 | 430 | }); |
431 | 431 | |
432 | - $this->registerService(\OC\AppConfig::class, function (Server $c) { |
|
432 | + $this->registerService(\OC\AppConfig::class, function(Server $c) { |
|
433 | 433 | return new \OC\AppConfig($c->getDatabaseConnection()); |
434 | 434 | }); |
435 | 435 | $this->registerAlias('AppConfig', \OC\AppConfig::class); |
436 | 436 | $this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class); |
437 | 437 | |
438 | - $this->registerService(\OCP\L10N\IFactory::class, function (Server $c) { |
|
438 | + $this->registerService(\OCP\L10N\IFactory::class, function(Server $c) { |
|
439 | 439 | return new \OC\L10N\Factory( |
440 | 440 | $c->getConfig(), |
441 | 441 | $c->getRequest(), |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | }); |
446 | 446 | $this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class); |
447 | 447 | |
448 | - $this->registerService(\OCP\IURLGenerator::class, function (Server $c) { |
|
448 | + $this->registerService(\OCP\IURLGenerator::class, function(Server $c) { |
|
449 | 449 | $config = $c->getConfig(); |
450 | 450 | $cacheFactory = $c->getMemCacheFactory(); |
451 | 451 | $request = $c->getRequest(); |
@@ -460,12 +460,12 @@ discard block |
||
460 | 460 | $this->registerAlias('AppFetcher', AppFetcher::class); |
461 | 461 | $this->registerAlias('CategoryFetcher', CategoryFetcher::class); |
462 | 462 | |
463 | - $this->registerService(\OCP\ICache::class, function ($c) { |
|
463 | + $this->registerService(\OCP\ICache::class, function($c) { |
|
464 | 464 | return new Cache\File(); |
465 | 465 | }); |
466 | 466 | $this->registerAlias('UserCache', \OCP\ICache::class); |
467 | 467 | |
468 | - $this->registerService(Factory::class, function (Server $c) { |
|
468 | + $this->registerService(Factory::class, function(Server $c) { |
|
469 | 469 | |
470 | 470 | $arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(), |
471 | 471 | ArrayCache::class, |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | $version = implode(',', $v); |
483 | 483 | $instanceId = \OC_Util::getInstanceId(); |
484 | 484 | $path = \OC::$SERVERROOT; |
485 | - $prefix = md5($instanceId . '-' . $version . '-' . $path); |
|
485 | + $prefix = md5($instanceId.'-'.$version.'-'.$path); |
|
486 | 486 | return new \OC\Memcache\Factory($prefix, $c->getLogger(), |
487 | 487 | $config->getSystemValue('memcache.local', null), |
488 | 488 | $config->getSystemValue('memcache.distributed', null), |
@@ -495,12 +495,12 @@ discard block |
||
495 | 495 | $this->registerAlias('MemCacheFactory', Factory::class); |
496 | 496 | $this->registerAlias(ICacheFactory::class, Factory::class); |
497 | 497 | |
498 | - $this->registerService('RedisFactory', function (Server $c) { |
|
498 | + $this->registerService('RedisFactory', function(Server $c) { |
|
499 | 499 | $systemConfig = $c->getSystemConfig(); |
500 | 500 | return new RedisFactory($systemConfig); |
501 | 501 | }); |
502 | 502 | |
503 | - $this->registerService(\OCP\Activity\IManager::class, function (Server $c) { |
|
503 | + $this->registerService(\OCP\Activity\IManager::class, function(Server $c) { |
|
504 | 504 | return new \OC\Activity\Manager( |
505 | 505 | $c->getRequest(), |
506 | 506 | $c->getUserSession(), |
@@ -510,14 +510,14 @@ discard block |
||
510 | 510 | }); |
511 | 511 | $this->registerAlias('ActivityManager', \OCP\Activity\IManager::class); |
512 | 512 | |
513 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
513 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
514 | 514 | return new \OC\Activity\EventMerger( |
515 | 515 | $c->getL10N('lib') |
516 | 516 | ); |
517 | 517 | }); |
518 | 518 | $this->registerAlias(IValidator::class, Validator::class); |
519 | 519 | |
520 | - $this->registerService(\OCP\IAvatarManager::class, function (Server $c) { |
|
520 | + $this->registerService(\OCP\IAvatarManager::class, function(Server $c) { |
|
521 | 521 | return new AvatarManager( |
522 | 522 | $c->query(\OC\User\Manager::class), |
523 | 523 | $c->getAppDataDir('avatar'), |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | |
531 | 531 | $this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class); |
532 | 532 | |
533 | - $this->registerService(\OCP\ILogger::class, function (Server $c) { |
|
533 | + $this->registerService(\OCP\ILogger::class, function(Server $c) { |
|
534 | 534 | $logType = $c->query('AllConfig')->getSystemValue('log_type', 'file'); |
535 | 535 | $factory = new LogFactory($c, $this->getSystemConfig()); |
536 | 536 | $logger = $factory->get($logType); |
@@ -540,11 +540,11 @@ discard block |
||
540 | 540 | }); |
541 | 541 | $this->registerAlias('Logger', \OCP\ILogger::class); |
542 | 542 | |
543 | - $this->registerService(ILogFactory::class, function (Server $c) { |
|
543 | + $this->registerService(ILogFactory::class, function(Server $c) { |
|
544 | 544 | return new LogFactory($c, $this->getSystemConfig()); |
545 | 545 | }); |
546 | 546 | |
547 | - $this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) { |
|
547 | + $this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) { |
|
548 | 548 | $config = $c->getConfig(); |
549 | 549 | return new \OC\BackgroundJob\JobList( |
550 | 550 | $c->getDatabaseConnection(), |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | }); |
555 | 555 | $this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class); |
556 | 556 | |
557 | - $this->registerService(\OCP\Route\IRouter::class, function (Server $c) { |
|
557 | + $this->registerService(\OCP\Route\IRouter::class, function(Server $c) { |
|
558 | 558 | $cacheFactory = $c->getMemCacheFactory(); |
559 | 559 | $logger = $c->getLogger(); |
560 | 560 | if ($cacheFactory->isLocalCacheAvailable()) { |
@@ -566,12 +566,12 @@ discard block |
||
566 | 566 | }); |
567 | 567 | $this->registerAlias('Router', \OCP\Route\IRouter::class); |
568 | 568 | |
569 | - $this->registerService(\OCP\ISearch::class, function ($c) { |
|
569 | + $this->registerService(\OCP\ISearch::class, function($c) { |
|
570 | 570 | return new Search(); |
571 | 571 | }); |
572 | 572 | $this->registerAlias('Search', \OCP\ISearch::class); |
573 | 573 | |
574 | - $this->registerService(\OC\Security\RateLimiting\Limiter::class, function (Server $c) { |
|
574 | + $this->registerService(\OC\Security\RateLimiting\Limiter::class, function(Server $c) { |
|
575 | 575 | return new \OC\Security\RateLimiting\Limiter( |
576 | 576 | $this->getUserSession(), |
577 | 577 | $this->getRequest(), |
@@ -579,34 +579,34 @@ discard block |
||
579 | 579 | $c->query(\OC\Security\RateLimiting\Backend\IBackend::class) |
580 | 580 | ); |
581 | 581 | }); |
582 | - $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) { |
|
582 | + $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) { |
|
583 | 583 | return new \OC\Security\RateLimiting\Backend\MemoryCache( |
584 | 584 | $this->getMemCacheFactory(), |
585 | 585 | new \OC\AppFramework\Utility\TimeFactory() |
586 | 586 | ); |
587 | 587 | }); |
588 | 588 | |
589 | - $this->registerService(\OCP\Security\ISecureRandom::class, function ($c) { |
|
589 | + $this->registerService(\OCP\Security\ISecureRandom::class, function($c) { |
|
590 | 590 | return new SecureRandom(); |
591 | 591 | }); |
592 | 592 | $this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class); |
593 | 593 | |
594 | - $this->registerService(\OCP\Security\ICrypto::class, function (Server $c) { |
|
594 | + $this->registerService(\OCP\Security\ICrypto::class, function(Server $c) { |
|
595 | 595 | return new Crypto($c->getConfig(), $c->getSecureRandom()); |
596 | 596 | }); |
597 | 597 | $this->registerAlias('Crypto', \OCP\Security\ICrypto::class); |
598 | 598 | |
599 | - $this->registerService(\OCP\Security\IHasher::class, function (Server $c) { |
|
599 | + $this->registerService(\OCP\Security\IHasher::class, function(Server $c) { |
|
600 | 600 | return new Hasher($c->getConfig()); |
601 | 601 | }); |
602 | 602 | $this->registerAlias('Hasher', \OCP\Security\IHasher::class); |
603 | 603 | |
604 | - $this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) { |
|
604 | + $this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) { |
|
605 | 605 | return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection()); |
606 | 606 | }); |
607 | 607 | $this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class); |
608 | 608 | |
609 | - $this->registerService(IDBConnection::class, function (Server $c) { |
|
609 | + $this->registerService(IDBConnection::class, function(Server $c) { |
|
610 | 610 | $systemConfig = $c->getSystemConfig(); |
611 | 611 | $factory = new \OC\DB\ConnectionFactory($systemConfig); |
612 | 612 | $type = $systemConfig->getValue('dbtype', 'sqlite'); |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | $this->registerAlias('DatabaseConnection', IDBConnection::class); |
622 | 622 | |
623 | 623 | |
624 | - $this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) { |
|
624 | + $this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) { |
|
625 | 625 | $user = \OC_User::getUser(); |
626 | 626 | $uid = $user ? $user : null; |
627 | 627 | return new ClientService( |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | ); |
637 | 637 | }); |
638 | 638 | $this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class); |
639 | - $this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) { |
|
639 | + $this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) { |
|
640 | 640 | $eventLogger = new EventLogger(); |
641 | 641 | if ($c->getSystemConfig()->getValue('debug', false)) { |
642 | 642 | // In debug mode, module is being activated by default |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | }); |
647 | 647 | $this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class); |
648 | 648 | |
649 | - $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) { |
|
649 | + $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) { |
|
650 | 650 | $queryLogger = new QueryLogger(); |
651 | 651 | if ($c->getSystemConfig()->getValue('debug', false)) { |
652 | 652 | // In debug mode, module is being activated by default |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | }); |
657 | 657 | $this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class); |
658 | 658 | |
659 | - $this->registerService(TempManager::class, function (Server $c) { |
|
659 | + $this->registerService(TempManager::class, function(Server $c) { |
|
660 | 660 | return new TempManager( |
661 | 661 | $c->getLogger(), |
662 | 662 | $c->getConfig() |
@@ -665,7 +665,7 @@ discard block |
||
665 | 665 | $this->registerAlias('TempManager', TempManager::class); |
666 | 666 | $this->registerAlias(ITempManager::class, TempManager::class); |
667 | 667 | |
668 | - $this->registerService(AppManager::class, function (Server $c) { |
|
668 | + $this->registerService(AppManager::class, function(Server $c) { |
|
669 | 669 | return new \OC\App\AppManager( |
670 | 670 | $c->getUserSession(), |
671 | 671 | $c->query(\OC\AppConfig::class), |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | $this->registerAlias('AppManager', AppManager::class); |
678 | 678 | $this->registerAlias(IAppManager::class, AppManager::class); |
679 | 679 | |
680 | - $this->registerService(\OCP\IDateTimeZone::class, function (Server $c) { |
|
680 | + $this->registerService(\OCP\IDateTimeZone::class, function(Server $c) { |
|
681 | 681 | return new DateTimeZone( |
682 | 682 | $c->getConfig(), |
683 | 683 | $c->getSession() |
@@ -685,7 +685,7 @@ discard block |
||
685 | 685 | }); |
686 | 686 | $this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class); |
687 | 687 | |
688 | - $this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) { |
|
688 | + $this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) { |
|
689 | 689 | $language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null); |
690 | 690 | |
691 | 691 | return new DateTimeFormatter( |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | }); |
696 | 696 | $this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class); |
697 | 697 | |
698 | - $this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) { |
|
698 | + $this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) { |
|
699 | 699 | $mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger()); |
700 | 700 | $listener = new UserMountCacheListener($mountCache); |
701 | 701 | $listener->listen($c->getUserManager()); |
@@ -703,7 +703,7 @@ discard block |
||
703 | 703 | }); |
704 | 704 | $this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class); |
705 | 705 | |
706 | - $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) { |
|
706 | + $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) { |
|
707 | 707 | $loader = \OC\Files\Filesystem::getLoader(); |
708 | 708 | $mountCache = $c->query('UserMountCache'); |
709 | 709 | $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
@@ -719,10 +719,10 @@ discard block |
||
719 | 719 | }); |
720 | 720 | $this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class); |
721 | 721 | |
722 | - $this->registerService('IniWrapper', function ($c) { |
|
722 | + $this->registerService('IniWrapper', function($c) { |
|
723 | 723 | return new IniGetWrapper(); |
724 | 724 | }); |
725 | - $this->registerService('AsyncCommandBus', function (Server $c) { |
|
725 | + $this->registerService('AsyncCommandBus', function(Server $c) { |
|
726 | 726 | $busClass = $c->getConfig()->getSystemValue('commandbus'); |
727 | 727 | if ($busClass) { |
728 | 728 | list($app, $class) = explode('::', $busClass, 2); |
@@ -737,10 +737,10 @@ discard block |
||
737 | 737 | return new CronBus($jobList); |
738 | 738 | } |
739 | 739 | }); |
740 | - $this->registerService('TrustedDomainHelper', function ($c) { |
|
740 | + $this->registerService('TrustedDomainHelper', function($c) { |
|
741 | 741 | return new TrustedDomainHelper($this->getConfig()); |
742 | 742 | }); |
743 | - $this->registerService('Throttler', function (Server $c) { |
|
743 | + $this->registerService('Throttler', function(Server $c) { |
|
744 | 744 | return new Throttler( |
745 | 745 | $c->getDatabaseConnection(), |
746 | 746 | new TimeFactory(), |
@@ -748,7 +748,7 @@ discard block |
||
748 | 748 | $c->getConfig() |
749 | 749 | ); |
750 | 750 | }); |
751 | - $this->registerService('IntegrityCodeChecker', function (Server $c) { |
|
751 | + $this->registerService('IntegrityCodeChecker', function(Server $c) { |
|
752 | 752 | // IConfig and IAppManager requires a working database. This code |
753 | 753 | // might however be called when ownCloud is not yet setup. |
754 | 754 | if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
@@ -769,7 +769,7 @@ discard block |
||
769 | 769 | $c->getTempManager() |
770 | 770 | ); |
771 | 771 | }); |
772 | - $this->registerService(\OCP\IRequest::class, function ($c) { |
|
772 | + $this->registerService(\OCP\IRequest::class, function($c) { |
|
773 | 773 | if (isset($this['urlParams'])) { |
774 | 774 | $urlParams = $this['urlParams']; |
775 | 775 | } else { |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | }); |
806 | 806 | $this->registerAlias('Request', \OCP\IRequest::class); |
807 | 807 | |
808 | - $this->registerService(\OCP\Mail\IMailer::class, function (Server $c) { |
|
808 | + $this->registerService(\OCP\Mail\IMailer::class, function(Server $c) { |
|
809 | 809 | return new Mailer( |
810 | 810 | $c->getConfig(), |
811 | 811 | $c->getLogger(), |
@@ -816,7 +816,7 @@ discard block |
||
816 | 816 | }); |
817 | 817 | $this->registerAlias('Mailer', \OCP\Mail\IMailer::class); |
818 | 818 | |
819 | - $this->registerService('LDAPProvider', function (Server $c) { |
|
819 | + $this->registerService('LDAPProvider', function(Server $c) { |
|
820 | 820 | $config = $c->getConfig(); |
821 | 821 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
822 | 822 | if (is_null($factoryClass)) { |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | $factory = new $factoryClass($this); |
827 | 827 | return $factory->getLDAPProvider(); |
828 | 828 | }); |
829 | - $this->registerService(ILockingProvider::class, function (Server $c) { |
|
829 | + $this->registerService(ILockingProvider::class, function(Server $c) { |
|
830 | 830 | $ini = $c->getIniWrapper(); |
831 | 831 | $config = $c->getConfig(); |
832 | 832 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -849,49 +849,49 @@ discard block |
||
849 | 849 | }); |
850 | 850 | $this->registerAlias('LockingProvider', ILockingProvider::class); |
851 | 851 | |
852 | - $this->registerService(\OCP\Files\Mount\IMountManager::class, function () { |
|
852 | + $this->registerService(\OCP\Files\Mount\IMountManager::class, function() { |
|
853 | 853 | return new \OC\Files\Mount\Manager(); |
854 | 854 | }); |
855 | 855 | $this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class); |
856 | 856 | |
857 | - $this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) { |
|
857 | + $this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) { |
|
858 | 858 | return new \OC\Files\Type\Detection( |
859 | 859 | $c->getURLGenerator(), |
860 | 860 | \OC::$configDir, |
861 | - \OC::$SERVERROOT . '/resources/config/' |
|
861 | + \OC::$SERVERROOT.'/resources/config/' |
|
862 | 862 | ); |
863 | 863 | }); |
864 | 864 | $this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class); |
865 | 865 | |
866 | - $this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) { |
|
866 | + $this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) { |
|
867 | 867 | return new \OC\Files\Type\Loader( |
868 | 868 | $c->getDatabaseConnection() |
869 | 869 | ); |
870 | 870 | }); |
871 | 871 | $this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class); |
872 | - $this->registerService(BundleFetcher::class, function () { |
|
872 | + $this->registerService(BundleFetcher::class, function() { |
|
873 | 873 | return new BundleFetcher($this->getL10N('lib')); |
874 | 874 | }); |
875 | - $this->registerService(\OCP\Notification\IManager::class, function (Server $c) { |
|
875 | + $this->registerService(\OCP\Notification\IManager::class, function(Server $c) { |
|
876 | 876 | return new Manager( |
877 | 877 | $c->query(IValidator::class) |
878 | 878 | ); |
879 | 879 | }); |
880 | 880 | $this->registerAlias('NotificationManager', \OCP\Notification\IManager::class); |
881 | 881 | |
882 | - $this->registerService(\OC\CapabilitiesManager::class, function (Server $c) { |
|
882 | + $this->registerService(\OC\CapabilitiesManager::class, function(Server $c) { |
|
883 | 883 | $manager = new \OC\CapabilitiesManager($c->getLogger()); |
884 | - $manager->registerCapability(function () use ($c) { |
|
884 | + $manager->registerCapability(function() use ($c) { |
|
885 | 885 | return new \OC\OCS\CoreCapabilities($c->getConfig()); |
886 | 886 | }); |
887 | - $manager->registerCapability(function () use ($c) { |
|
887 | + $manager->registerCapability(function() use ($c) { |
|
888 | 888 | return $c->query(\OC\Security\Bruteforce\Capabilities::class); |
889 | 889 | }); |
890 | 890 | return $manager; |
891 | 891 | }); |
892 | 892 | $this->registerAlias('CapabilitiesManager', \OC\CapabilitiesManager::class); |
893 | 893 | |
894 | - $this->registerService(\OCP\Comments\ICommentsManager::class, function (Server $c) { |
|
894 | + $this->registerService(\OCP\Comments\ICommentsManager::class, function(Server $c) { |
|
895 | 895 | $config = $c->getConfig(); |
896 | 896 | $factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class); |
897 | 897 | /** @var \OCP\Comments\ICommentsManagerFactory $factory */ |
@@ -901,7 +901,7 @@ discard block |
||
901 | 901 | $manager->registerDisplayNameResolver('user', function($id) use ($c) { |
902 | 902 | $manager = $c->getUserManager(); |
903 | 903 | $user = $manager->get($id); |
904 | - if(is_null($user)) { |
|
904 | + if (is_null($user)) { |
|
905 | 905 | $l = $c->getL10N('core'); |
906 | 906 | $displayName = $l->t('Unknown user'); |
907 | 907 | } else { |
@@ -914,7 +914,7 @@ discard block |
||
914 | 914 | }); |
915 | 915 | $this->registerAlias('CommentsManager', \OCP\Comments\ICommentsManager::class); |
916 | 916 | |
917 | - $this->registerService('ThemingDefaults', function (Server $c) { |
|
917 | + $this->registerService('ThemingDefaults', function(Server $c) { |
|
918 | 918 | /* |
919 | 919 | * Dark magic for autoloader. |
920 | 920 | * If we do a class_exists it will try to load the class which will |
@@ -941,7 +941,7 @@ discard block |
||
941 | 941 | } |
942 | 942 | return new \OC_Defaults(); |
943 | 943 | }); |
944 | - $this->registerService(SCSSCacher::class, function (Server $c) { |
|
944 | + $this->registerService(SCSSCacher::class, function(Server $c) { |
|
945 | 945 | /** @var Factory $cacheFactory */ |
946 | 946 | $cacheFactory = $c->query(Factory::class); |
947 | 947 | return new SCSSCacher( |
@@ -954,7 +954,7 @@ discard block |
||
954 | 954 | $this->getMemCacheFactory() |
955 | 955 | ); |
956 | 956 | }); |
957 | - $this->registerService(JSCombiner::class, function (Server $c) { |
|
957 | + $this->registerService(JSCombiner::class, function(Server $c) { |
|
958 | 958 | /** @var Factory $cacheFactory */ |
959 | 959 | $cacheFactory = $c->query(Factory::class); |
960 | 960 | return new JSCombiner( |
@@ -965,13 +965,13 @@ discard block |
||
965 | 965 | $c->getLogger() |
966 | 966 | ); |
967 | 967 | }); |
968 | - $this->registerService(EventDispatcher::class, function () { |
|
968 | + $this->registerService(EventDispatcher::class, function() { |
|
969 | 969 | return new EventDispatcher(); |
970 | 970 | }); |
971 | 971 | $this->registerAlias('EventDispatcher', EventDispatcher::class); |
972 | 972 | $this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class); |
973 | 973 | |
974 | - $this->registerService('CryptoWrapper', function (Server $c) { |
|
974 | + $this->registerService('CryptoWrapper', function(Server $c) { |
|
975 | 975 | // FIXME: Instantiiated here due to cyclic dependency |
976 | 976 | $request = new Request( |
977 | 977 | [ |
@@ -996,7 +996,7 @@ discard block |
||
996 | 996 | $request |
997 | 997 | ); |
998 | 998 | }); |
999 | - $this->registerService('CsrfTokenManager', function (Server $c) { |
|
999 | + $this->registerService('CsrfTokenManager', function(Server $c) { |
|
1000 | 1000 | $tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom()); |
1001 | 1001 | |
1002 | 1002 | return new CsrfTokenManager( |
@@ -1004,22 +1004,22 @@ discard block |
||
1004 | 1004 | $c->query(SessionStorage::class) |
1005 | 1005 | ); |
1006 | 1006 | }); |
1007 | - $this->registerService(SessionStorage::class, function (Server $c) { |
|
1007 | + $this->registerService(SessionStorage::class, function(Server $c) { |
|
1008 | 1008 | return new SessionStorage($c->getSession()); |
1009 | 1009 | }); |
1010 | - $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) { |
|
1010 | + $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) { |
|
1011 | 1011 | return new ContentSecurityPolicyManager(); |
1012 | 1012 | }); |
1013 | 1013 | $this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class); |
1014 | 1014 | |
1015 | - $this->registerService('ContentSecurityPolicyNonceManager', function (Server $c) { |
|
1015 | + $this->registerService('ContentSecurityPolicyNonceManager', function(Server $c) { |
|
1016 | 1016 | return new ContentSecurityPolicyNonceManager( |
1017 | 1017 | $c->getCsrfTokenManager(), |
1018 | 1018 | $c->getRequest() |
1019 | 1019 | ); |
1020 | 1020 | }); |
1021 | 1021 | |
1022 | - $this->registerService(\OCP\Share\IManager::class, function (Server $c) { |
|
1022 | + $this->registerService(\OCP\Share\IManager::class, function(Server $c) { |
|
1023 | 1023 | $config = $c->getConfig(); |
1024 | 1024 | $factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class); |
1025 | 1025 | /** @var \OCP\Share\IProviderFactory $factory */ |
@@ -1062,7 +1062,7 @@ discard block |
||
1062 | 1062 | |
1063 | 1063 | $this->registerAlias(\OCP\Collaboration\AutoComplete\IManager::class, \OC\Collaboration\AutoComplete\Manager::class); |
1064 | 1064 | |
1065 | - $this->registerService('SettingsManager', function (Server $c) { |
|
1065 | + $this->registerService('SettingsManager', function(Server $c) { |
|
1066 | 1066 | $manager = new \OC\Settings\Manager( |
1067 | 1067 | $c->getLogger(), |
1068 | 1068 | $c->getDatabaseConnection(), |
@@ -1080,24 +1080,24 @@ discard block |
||
1080 | 1080 | ); |
1081 | 1081 | return $manager; |
1082 | 1082 | }); |
1083 | - $this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) { |
|
1083 | + $this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) { |
|
1084 | 1084 | return new \OC\Files\AppData\Factory( |
1085 | 1085 | $c->getRootFolder(), |
1086 | 1086 | $c->getSystemConfig() |
1087 | 1087 | ); |
1088 | 1088 | }); |
1089 | 1089 | |
1090 | - $this->registerService('LockdownManager', function (Server $c) { |
|
1091 | - return new LockdownManager(function () use ($c) { |
|
1090 | + $this->registerService('LockdownManager', function(Server $c) { |
|
1091 | + return new LockdownManager(function() use ($c) { |
|
1092 | 1092 | return $c->getSession(); |
1093 | 1093 | }); |
1094 | 1094 | }); |
1095 | 1095 | |
1096 | - $this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) { |
|
1096 | + $this->registerService(\OCP\OCS\IDiscoveryService::class, function(Server $c) { |
|
1097 | 1097 | return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService()); |
1098 | 1098 | }); |
1099 | 1099 | |
1100 | - $this->registerService(ICloudIdManager::class, function (Server $c) { |
|
1100 | + $this->registerService(ICloudIdManager::class, function(Server $c) { |
|
1101 | 1101 | return new CloudIdManager(); |
1102 | 1102 | }); |
1103 | 1103 | |
@@ -1107,18 +1107,18 @@ discard block |
||
1107 | 1107 | $this->registerAlias(\OCP\AppFramework\Utility\ITimeFactory::class, \OC\AppFramework\Utility\TimeFactory::class); |
1108 | 1108 | $this->registerAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class); |
1109 | 1109 | |
1110 | - $this->registerService(Defaults::class, function (Server $c) { |
|
1110 | + $this->registerService(Defaults::class, function(Server $c) { |
|
1111 | 1111 | return new Defaults( |
1112 | 1112 | $c->getThemingDefaults() |
1113 | 1113 | ); |
1114 | 1114 | }); |
1115 | 1115 | $this->registerAlias('Defaults', \OCP\Defaults::class); |
1116 | 1116 | |
1117 | - $this->registerService(\OCP\ISession::class, function (SimpleContainer $c) { |
|
1117 | + $this->registerService(\OCP\ISession::class, function(SimpleContainer $c) { |
|
1118 | 1118 | return $c->query(\OCP\IUserSession::class)->getSession(); |
1119 | 1119 | }); |
1120 | 1120 | |
1121 | - $this->registerService(IShareHelper::class, function (Server $c) { |
|
1121 | + $this->registerService(IShareHelper::class, function(Server $c) { |
|
1122 | 1122 | return new ShareHelper( |
1123 | 1123 | $c->query(\OCP\Share\IManager::class) |
1124 | 1124 | ); |
@@ -1180,11 +1180,11 @@ discard block |
||
1180 | 1180 | // no avatar to remove |
1181 | 1181 | } catch (\Exception $e) { |
1182 | 1182 | // Ignore exceptions |
1183 | - $logger->info('Could not cleanup avatar of ' . $user->getUID()); |
|
1183 | + $logger->info('Could not cleanup avatar of '.$user->getUID()); |
|
1184 | 1184 | } |
1185 | 1185 | }); |
1186 | 1186 | |
1187 | - $dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) { |
|
1187 | + $dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) { |
|
1188 | 1188 | $manager = $this->getAvatarManager(); |
1189 | 1189 | /** @var IUser $user */ |
1190 | 1190 | $user = $e->getSubject(); |
@@ -1335,7 +1335,7 @@ discard block |
||
1335 | 1335 | * @deprecated since 9.2.0 use IAppData |
1336 | 1336 | */ |
1337 | 1337 | public function getAppFolder() { |
1338 | - $dir = '/' . \OC_App::getCurrentApp(); |
|
1338 | + $dir = '/'.\OC_App::getCurrentApp(); |
|
1339 | 1339 | $root = $this->getRootFolder(); |
1340 | 1340 | if (!$root->nodeExists($dir)) { |
1341 | 1341 | $folder = $root->newFolder($dir); |
@@ -1910,7 +1910,7 @@ discard block |
||
1910 | 1910 | /** |
1911 | 1911 | * @return \OCP\Collaboration\AutoComplete\IManager |
1912 | 1912 | */ |
1913 | - public function getAutoCompleteManager(){ |
|
1913 | + public function getAutoCompleteManager() { |
|
1914 | 1914 | return $this->query(IManager::class); |
1915 | 1915 | } |
1916 | 1916 |