@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | parent::__construct(); |
159 | 159 | $this->webRoot = $webRoot; |
160 | 160 | |
161 | - $this->registerService(\OCP\IServerContainer::class, function (IServerContainer $c) { |
|
161 | + $this->registerService(\OCP\IServerContainer::class, function(IServerContainer $c) { |
|
162 | 162 | return $c; |
163 | 163 | }); |
164 | 164 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $this->registerAlias(IActionFactory::class, ActionFactory::class); |
172 | 172 | |
173 | 173 | |
174 | - $this->registerService(\OCP\IPreview::class, function (Server $c) { |
|
174 | + $this->registerService(\OCP\IPreview::class, function(Server $c) { |
|
175 | 175 | return new PreviewManager( |
176 | 176 | $c->getConfig(), |
177 | 177 | $c->getRootFolder(), |
@@ -182,13 +182,13 @@ discard block |
||
182 | 182 | }); |
183 | 183 | $this->registerAlias('PreviewManager', \OCP\IPreview::class); |
184 | 184 | |
185 | - $this->registerService(\OC\Preview\Watcher::class, function (Server $c) { |
|
185 | + $this->registerService(\OC\Preview\Watcher::class, function(Server $c) { |
|
186 | 186 | return new \OC\Preview\Watcher( |
187 | 187 | $c->getAppDataDir('preview') |
188 | 188 | ); |
189 | 189 | }); |
190 | 190 | |
191 | - $this->registerService('EncryptionManager', function (Server $c) { |
|
191 | + $this->registerService('EncryptionManager', function(Server $c) { |
|
192 | 192 | $view = new View(); |
193 | 193 | $util = new Encryption\Util( |
194 | 194 | $view, |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | ); |
207 | 207 | }); |
208 | 208 | |
209 | - $this->registerService('EncryptionFileHelper', function (Server $c) { |
|
209 | + $this->registerService('EncryptionFileHelper', function(Server $c) { |
|
210 | 210 | $util = new Encryption\Util( |
211 | 211 | new View(), |
212 | 212 | $c->getUserManager(), |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | ); |
221 | 221 | }); |
222 | 222 | |
223 | - $this->registerService('EncryptionKeyStorage', function (Server $c) { |
|
223 | + $this->registerService('EncryptionKeyStorage', function(Server $c) { |
|
224 | 224 | $view = new View(); |
225 | 225 | $util = new Encryption\Util( |
226 | 226 | $view, |
@@ -231,32 +231,32 @@ discard block |
||
231 | 231 | |
232 | 232 | return new Encryption\Keys\Storage($view, $util); |
233 | 233 | }); |
234 | - $this->registerService('TagMapper', function (Server $c) { |
|
234 | + $this->registerService('TagMapper', function(Server $c) { |
|
235 | 235 | return new TagMapper($c->getDatabaseConnection()); |
236 | 236 | }); |
237 | 237 | |
238 | - $this->registerService(\OCP\ITagManager::class, function (Server $c) { |
|
238 | + $this->registerService(\OCP\ITagManager::class, function(Server $c) { |
|
239 | 239 | $tagMapper = $c->query('TagMapper'); |
240 | 240 | return new TagManager($tagMapper, $c->getUserSession()); |
241 | 241 | }); |
242 | 242 | $this->registerAlias('TagManager', \OCP\ITagManager::class); |
243 | 243 | |
244 | - $this->registerService('SystemTagManagerFactory', function (Server $c) { |
|
244 | + $this->registerService('SystemTagManagerFactory', function(Server $c) { |
|
245 | 245 | $config = $c->getConfig(); |
246 | 246 | $factoryClass = $config->getSystemValue('systemtags.managerFactory', '\OC\SystemTag\ManagerFactory'); |
247 | 247 | /** @var \OC\SystemTag\ManagerFactory $factory */ |
248 | 248 | $factory = new $factoryClass($this); |
249 | 249 | return $factory; |
250 | 250 | }); |
251 | - $this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) { |
|
251 | + $this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) { |
|
252 | 252 | return $c->query('SystemTagManagerFactory')->getManager(); |
253 | 253 | }); |
254 | 254 | $this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class); |
255 | 255 | |
256 | - $this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) { |
|
256 | + $this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) { |
|
257 | 257 | return $c->query('SystemTagManagerFactory')->getObjectMapper(); |
258 | 258 | }); |
259 | - $this->registerService('RootFolder', function (Server $c) { |
|
259 | + $this->registerService('RootFolder', function(Server $c) { |
|
260 | 260 | $manager = \OC\Files\Filesystem::getMountManager(null); |
261 | 261 | $view = new View(); |
262 | 262 | $root = new Root( |
@@ -277,37 +277,37 @@ discard block |
||
277 | 277 | }); |
278 | 278 | $this->registerAlias('SystemTagObjectMapper', \OCP\SystemTag\ISystemTagObjectMapper::class); |
279 | 279 | |
280 | - $this->registerService(\OCP\Files\IRootFolder::class, function (Server $c) { |
|
281 | - return new LazyRoot(function () use ($c) { |
|
280 | + $this->registerService(\OCP\Files\IRootFolder::class, function(Server $c) { |
|
281 | + return new LazyRoot(function() use ($c) { |
|
282 | 282 | return $c->query('RootFolder'); |
283 | 283 | }); |
284 | 284 | }); |
285 | 285 | $this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class); |
286 | 286 | |
287 | - $this->registerService(\OCP\IUserManager::class, function (Server $c) { |
|
287 | + $this->registerService(\OCP\IUserManager::class, function(Server $c) { |
|
288 | 288 | $config = $c->getConfig(); |
289 | 289 | return new \OC\User\Manager($config); |
290 | 290 | }); |
291 | 291 | $this->registerAlias('UserManager', \OCP\IUserManager::class); |
292 | 292 | |
293 | - $this->registerService(\OCP\IGroupManager::class, function (Server $c) { |
|
293 | + $this->registerService(\OCP\IGroupManager::class, function(Server $c) { |
|
294 | 294 | $groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger()); |
295 | - $groupManager->listen('\OC\Group', 'preCreate', function ($gid) { |
|
295 | + $groupManager->listen('\OC\Group', 'preCreate', function($gid) { |
|
296 | 296 | \OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid)); |
297 | 297 | }); |
298 | - $groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) { |
|
298 | + $groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) { |
|
299 | 299 | \OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID())); |
300 | 300 | }); |
301 | - $groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { |
|
301 | + $groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) { |
|
302 | 302 | \OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID())); |
303 | 303 | }); |
304 | - $groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { |
|
304 | + $groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) { |
|
305 | 305 | \OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID())); |
306 | 306 | }); |
307 | - $groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
307 | + $groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
308 | 308 | \OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID())); |
309 | 309 | }); |
310 | - $groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
310 | + $groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
311 | 311 | \OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
312 | 312 | //Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks |
313 | 313 | \OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | }); |
317 | 317 | $this->registerAlias('GroupManager', \OCP\IGroupManager::class); |
318 | 318 | |
319 | - $this->registerService(Store::class, function (Server $c) { |
|
319 | + $this->registerService(Store::class, function(Server $c) { |
|
320 | 320 | $session = $c->getSession(); |
321 | 321 | if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
322 | 322 | $tokenProvider = $c->query('OC\Authentication\Token\IProvider'); |
@@ -327,11 +327,11 @@ discard block |
||
327 | 327 | return new Store($session, $logger, $tokenProvider); |
328 | 328 | }); |
329 | 329 | $this->registerAlias(IStore::class, Store::class); |
330 | - $this->registerService('OC\Authentication\Token\DefaultTokenMapper', function (Server $c) { |
|
330 | + $this->registerService('OC\Authentication\Token\DefaultTokenMapper', function(Server $c) { |
|
331 | 331 | $dbConnection = $c->getDatabaseConnection(); |
332 | 332 | return new Authentication\Token\DefaultTokenMapper($dbConnection); |
333 | 333 | }); |
334 | - $this->registerService('OC\Authentication\Token\DefaultTokenProvider', function (Server $c) { |
|
334 | + $this->registerService('OC\Authentication\Token\DefaultTokenProvider', function(Server $c) { |
|
335 | 335 | $mapper = $c->query('OC\Authentication\Token\DefaultTokenMapper'); |
336 | 336 | $crypto = $c->getCrypto(); |
337 | 337 | $config = $c->getConfig(); |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | }); |
342 | 342 | $this->registerAlias('OC\Authentication\Token\IProvider', 'OC\Authentication\Token\DefaultTokenProvider'); |
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(); |
@@ -356,45 +356,45 @@ discard block |
||
356 | 356 | $dispatcher = $c->getEventDispatcher(); |
357 | 357 | |
358 | 358 | $userSession = new \OC\User\Session($manager, $session, $timeFactory, $defaultTokenProvider, $c->getConfig(), $c->getSecureRandom(), $c->getLockdownManager()); |
359 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
359 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
360 | 360 | \OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password)); |
361 | 361 | }); |
362 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
362 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
363 | 363 | /** @var $user \OC\User\User */ |
364 | 364 | \OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password)); |
365 | 365 | }); |
366 | - $userSession->listen('\OC\User', 'preDelete', function ($user) use ($dispatcher) { |
|
366 | + $userSession->listen('\OC\User', 'preDelete', function($user) use ($dispatcher) { |
|
367 | 367 | /** @var $user \OC\User\User */ |
368 | 368 | \OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID())); |
369 | 369 | $dispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user)); |
370 | 370 | }); |
371 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
371 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
372 | 372 | /** @var $user \OC\User\User */ |
373 | 373 | \OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID())); |
374 | 374 | }); |
375 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
375 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
376 | 376 | /** @var $user \OC\User\User */ |
377 | 377 | \OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
378 | 378 | }); |
379 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
379 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
380 | 380 | /** @var $user \OC\User\User */ |
381 | 381 | \OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
382 | 382 | }); |
383 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
383 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
384 | 384 | \OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password)); |
385 | 385 | }); |
386 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $password) { |
|
386 | + $userSession->listen('\OC\User', 'postLogin', function($user, $password) { |
|
387 | 387 | /** @var $user \OC\User\User */ |
388 | 388 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
389 | 389 | }); |
390 | - $userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) { |
|
390 | + $userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) { |
|
391 | 391 | /** @var $user \OC\User\User */ |
392 | 392 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
393 | 393 | }); |
394 | - $userSession->listen('\OC\User', 'logout', function () { |
|
394 | + $userSession->listen('\OC\User', 'logout', function() { |
|
395 | 395 | \OC_Hook::emit('OC_User', 'logout', array()); |
396 | 396 | }); |
397 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) { |
|
397 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) { |
|
398 | 398 | /** @var $user \OC\User\User */ |
399 | 399 | \OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue)); |
400 | 400 | }); |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | }); |
403 | 403 | $this->registerAlias('UserSession', \OCP\IUserSession::class); |
404 | 404 | |
405 | - $this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function (Server $c) { |
|
405 | + $this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function(Server $c) { |
|
406 | 406 | return new \OC\Authentication\TwoFactorAuth\Manager( |
407 | 407 | $c->getAppManager(), |
408 | 408 | $c->getSession(), |
@@ -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(); |
@@ -457,18 +457,18 @@ discard block |
||
457 | 457 | }); |
458 | 458 | $this->registerAlias('URLGenerator', \OCP\IURLGenerator::class); |
459 | 459 | |
460 | - $this->registerService('AppHelper', function ($c) { |
|
460 | + $this->registerService('AppHelper', function($c) { |
|
461 | 461 | return new \OC\AppHelper(); |
462 | 462 | }); |
463 | 463 | $this->registerAlias('AppFetcher', AppFetcher::class); |
464 | 464 | $this->registerAlias('CategoryFetcher', CategoryFetcher::class); |
465 | 465 | |
466 | - $this->registerService(\OCP\ICache::class, function ($c) { |
|
466 | + $this->registerService(\OCP\ICache::class, function($c) { |
|
467 | 467 | return new Cache\File(); |
468 | 468 | }); |
469 | 469 | $this->registerAlias('UserCache', \OCP\ICache::class); |
470 | 470 | |
471 | - $this->registerService(Factory::class, function (Server $c) { |
|
471 | + $this->registerService(Factory::class, function(Server $c) { |
|
472 | 472 | |
473 | 473 | $arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(), |
474 | 474 | '\\OC\\Memcache\\ArrayCache', |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | $version = implode(',', $v); |
486 | 486 | $instanceId = \OC_Util::getInstanceId(); |
487 | 487 | $path = \OC::$SERVERROOT; |
488 | - $prefix = md5($instanceId . '-' . $version . '-' . $path . '-' . $urlGenerator->getBaseUrl()); |
|
488 | + $prefix = md5($instanceId.'-'.$version.'-'.$path.'-'.$urlGenerator->getBaseUrl()); |
|
489 | 489 | return new \OC\Memcache\Factory($prefix, $c->getLogger(), |
490 | 490 | $config->getSystemValue('memcache.local', null), |
491 | 491 | $config->getSystemValue('memcache.distributed', null), |
@@ -498,12 +498,12 @@ discard block |
||
498 | 498 | $this->registerAlias('MemCacheFactory', Factory::class); |
499 | 499 | $this->registerAlias(ICacheFactory::class, Factory::class); |
500 | 500 | |
501 | - $this->registerService('RedisFactory', function (Server $c) { |
|
501 | + $this->registerService('RedisFactory', function(Server $c) { |
|
502 | 502 | $systemConfig = $c->getSystemConfig(); |
503 | 503 | return new RedisFactory($systemConfig); |
504 | 504 | }); |
505 | 505 | |
506 | - $this->registerService(\OCP\Activity\IManager::class, function (Server $c) { |
|
506 | + $this->registerService(\OCP\Activity\IManager::class, function(Server $c) { |
|
507 | 507 | return new \OC\Activity\Manager( |
508 | 508 | $c->getRequest(), |
509 | 509 | $c->getUserSession(), |
@@ -513,14 +513,14 @@ discard block |
||
513 | 513 | }); |
514 | 514 | $this->registerAlias('ActivityManager', \OCP\Activity\IManager::class); |
515 | 515 | |
516 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
516 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
517 | 517 | return new \OC\Activity\EventMerger( |
518 | 518 | $c->getL10N('lib') |
519 | 519 | ); |
520 | 520 | }); |
521 | 521 | $this->registerAlias(IValidator::class, Validator::class); |
522 | 522 | |
523 | - $this->registerService(\OCP\IAvatarManager::class, function (Server $c) { |
|
523 | + $this->registerService(\OCP\IAvatarManager::class, function(Server $c) { |
|
524 | 524 | return new AvatarManager( |
525 | 525 | $c->getUserManager(), |
526 | 526 | $c->getAppDataDir('avatar'), |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | |
534 | 534 | $this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class); |
535 | 535 | |
536 | - $this->registerService(\OCP\ILogger::class, function (Server $c) { |
|
536 | + $this->registerService(\OCP\ILogger::class, function(Server $c) { |
|
537 | 537 | $logType = $c->query('AllConfig')->getSystemValue('log_type', 'file'); |
538 | 538 | $logger = Log::getLogClass($logType); |
539 | 539 | call_user_func(array($logger, 'init')); |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | }); |
545 | 545 | $this->registerAlias('Logger', \OCP\ILogger::class); |
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->isAvailableLowLatency()) { |
@@ -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 ($c) { |
|
574 | + $this->registerService(\OC\Security\RateLimiting\Limiter::class, function($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'); |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | }); |
621 | 621 | $this->registerAlias('DatabaseConnection', IDBConnection::class); |
622 | 622 | |
623 | - $this->registerService('HTTPHelper', function (Server $c) { |
|
623 | + $this->registerService('HTTPHelper', function(Server $c) { |
|
624 | 624 | $config = $c->getConfig(); |
625 | 625 | return new HTTPHelper( |
626 | 626 | $config, |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | ); |
629 | 629 | }); |
630 | 630 | |
631 | - $this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) { |
|
631 | + $this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) { |
|
632 | 632 | $user = \OC_User::getUser(); |
633 | 633 | $uid = $user ? $user : null; |
634 | 634 | return new ClientService( |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | ); |
644 | 644 | }); |
645 | 645 | $this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class); |
646 | - $this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) { |
|
646 | + $this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) { |
|
647 | 647 | $eventLogger = new EventLogger(); |
648 | 648 | if ($c->getSystemConfig()->getValue('debug', false)) { |
649 | 649 | // In debug mode, module is being activated by default |
@@ -653,7 +653,7 @@ discard block |
||
653 | 653 | }); |
654 | 654 | $this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class); |
655 | 655 | |
656 | - $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) { |
|
656 | + $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) { |
|
657 | 657 | $queryLogger = new QueryLogger(); |
658 | 658 | if ($c->getSystemConfig()->getValue('debug', false)) { |
659 | 659 | // In debug mode, module is being activated by default |
@@ -663,7 +663,7 @@ discard block |
||
663 | 663 | }); |
664 | 664 | $this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class); |
665 | 665 | |
666 | - $this->registerService(TempManager::class, function (Server $c) { |
|
666 | + $this->registerService(TempManager::class, function(Server $c) { |
|
667 | 667 | return new TempManager( |
668 | 668 | $c->getLogger(), |
669 | 669 | $c->getConfig() |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | $this->registerAlias('TempManager', TempManager::class); |
673 | 673 | $this->registerAlias(ITempManager::class, TempManager::class); |
674 | 674 | |
675 | - $this->registerService(AppManager::class, function (Server $c) { |
|
675 | + $this->registerService(AppManager::class, function(Server $c) { |
|
676 | 676 | return new \OC\App\AppManager( |
677 | 677 | $c->getUserSession(), |
678 | 678 | $c->getAppConfig(), |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | $this->registerAlias('AppManager', AppManager::class); |
685 | 685 | $this->registerAlias(IAppManager::class, AppManager::class); |
686 | 686 | |
687 | - $this->registerService(\OCP\IDateTimeZone::class, function (Server $c) { |
|
687 | + $this->registerService(\OCP\IDateTimeZone::class, function(Server $c) { |
|
688 | 688 | return new DateTimeZone( |
689 | 689 | $c->getConfig(), |
690 | 690 | $c->getSession() |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | }); |
693 | 693 | $this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class); |
694 | 694 | |
695 | - $this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) { |
|
695 | + $this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) { |
|
696 | 696 | $language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null); |
697 | 697 | |
698 | 698 | return new DateTimeFormatter( |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | }); |
703 | 703 | $this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class); |
704 | 704 | |
705 | - $this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) { |
|
705 | + $this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) { |
|
706 | 706 | $mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger()); |
707 | 707 | $listener = new UserMountCacheListener($mountCache); |
708 | 708 | $listener->listen($c->getUserManager()); |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | }); |
711 | 711 | $this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class); |
712 | 712 | |
713 | - $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) { |
|
713 | + $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) { |
|
714 | 714 | $loader = \OC\Files\Filesystem::getLoader(); |
715 | 715 | $mountCache = $c->query('UserMountCache'); |
716 | 716 | $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
@@ -726,10 +726,10 @@ discard block |
||
726 | 726 | }); |
727 | 727 | $this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class); |
728 | 728 | |
729 | - $this->registerService('IniWrapper', function ($c) { |
|
729 | + $this->registerService('IniWrapper', function($c) { |
|
730 | 730 | return new IniGetWrapper(); |
731 | 731 | }); |
732 | - $this->registerService('AsyncCommandBus', function (Server $c) { |
|
732 | + $this->registerService('AsyncCommandBus', function(Server $c) { |
|
733 | 733 | $busClass = $c->getConfig()->getSystemValue('commandbus'); |
734 | 734 | if ($busClass) { |
735 | 735 | list($app, $class) = explode('::', $busClass, 2); |
@@ -744,10 +744,10 @@ discard block |
||
744 | 744 | return new CronBus($jobList); |
745 | 745 | } |
746 | 746 | }); |
747 | - $this->registerService('TrustedDomainHelper', function ($c) { |
|
747 | + $this->registerService('TrustedDomainHelper', function($c) { |
|
748 | 748 | return new TrustedDomainHelper($this->getConfig()); |
749 | 749 | }); |
750 | - $this->registerService('Throttler', function (Server $c) { |
|
750 | + $this->registerService('Throttler', function(Server $c) { |
|
751 | 751 | return new Throttler( |
752 | 752 | $c->getDatabaseConnection(), |
753 | 753 | new TimeFactory(), |
@@ -755,7 +755,7 @@ discard block |
||
755 | 755 | $c->getConfig() |
756 | 756 | ); |
757 | 757 | }); |
758 | - $this->registerService('IntegrityCodeChecker', function (Server $c) { |
|
758 | + $this->registerService('IntegrityCodeChecker', function(Server $c) { |
|
759 | 759 | // IConfig and IAppManager requires a working database. This code |
760 | 760 | // might however be called when ownCloud is not yet setup. |
761 | 761 | if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
@@ -776,7 +776,7 @@ discard block |
||
776 | 776 | $c->getTempManager() |
777 | 777 | ); |
778 | 778 | }); |
779 | - $this->registerService(\OCP\IRequest::class, function ($c) { |
|
779 | + $this->registerService(\OCP\IRequest::class, function($c) { |
|
780 | 780 | if (isset($this['urlParams'])) { |
781 | 781 | $urlParams = $this['urlParams']; |
782 | 782 | } else { |
@@ -812,7 +812,7 @@ discard block |
||
812 | 812 | }); |
813 | 813 | $this->registerAlias('Request', \OCP\IRequest::class); |
814 | 814 | |
815 | - $this->registerService(\OCP\Mail\IMailer::class, function (Server $c) { |
|
815 | + $this->registerService(\OCP\Mail\IMailer::class, function(Server $c) { |
|
816 | 816 | return new Mailer( |
817 | 817 | $c->getConfig(), |
818 | 818 | $c->getLogger(), |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | }); |
824 | 824 | $this->registerAlias('Mailer', \OCP\Mail\IMailer::class); |
825 | 825 | |
826 | - $this->registerService('LDAPProvider', function (Server $c) { |
|
826 | + $this->registerService('LDAPProvider', function(Server $c) { |
|
827 | 827 | $config = $c->getConfig(); |
828 | 828 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
829 | 829 | if (is_null($factoryClass)) { |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | $factory = new $factoryClass($this); |
834 | 834 | return $factory->getLDAPProvider(); |
835 | 835 | }); |
836 | - $this->registerService(ILockingProvider::class, function (Server $c) { |
|
836 | + $this->registerService(ILockingProvider::class, function(Server $c) { |
|
837 | 837 | $ini = $c->getIniWrapper(); |
838 | 838 | $config = $c->getConfig(); |
839 | 839 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -850,49 +850,49 @@ discard block |
||
850 | 850 | }); |
851 | 851 | $this->registerAlias('LockingProvider', ILockingProvider::class); |
852 | 852 | |
853 | - $this->registerService(\OCP\Files\Mount\IMountManager::class, function () { |
|
853 | + $this->registerService(\OCP\Files\Mount\IMountManager::class, function() { |
|
854 | 854 | return new \OC\Files\Mount\Manager(); |
855 | 855 | }); |
856 | 856 | $this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class); |
857 | 857 | |
858 | - $this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) { |
|
858 | + $this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) { |
|
859 | 859 | return new \OC\Files\Type\Detection( |
860 | 860 | $c->getURLGenerator(), |
861 | 861 | \OC::$configDir, |
862 | - \OC::$SERVERROOT . '/resources/config/' |
|
862 | + \OC::$SERVERROOT.'/resources/config/' |
|
863 | 863 | ); |
864 | 864 | }); |
865 | 865 | $this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class); |
866 | 866 | |
867 | - $this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) { |
|
867 | + $this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) { |
|
868 | 868 | return new \OC\Files\Type\Loader( |
869 | 869 | $c->getDatabaseConnection() |
870 | 870 | ); |
871 | 871 | }); |
872 | 872 | $this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class); |
873 | - $this->registerService(BundleFetcher::class, function () { |
|
873 | + $this->registerService(BundleFetcher::class, function() { |
|
874 | 874 | return new BundleFetcher($this->getL10N('lib')); |
875 | 875 | }); |
876 | - $this->registerService(\OCP\Notification\IManager::class, function (Server $c) { |
|
876 | + $this->registerService(\OCP\Notification\IManager::class, function(Server $c) { |
|
877 | 877 | return new Manager( |
878 | 878 | $c->query(IValidator::class) |
879 | 879 | ); |
880 | 880 | }); |
881 | 881 | $this->registerAlias('NotificationManager', \OCP\Notification\IManager::class); |
882 | 882 | |
883 | - $this->registerService(\OC\CapabilitiesManager::class, function (Server $c) { |
|
883 | + $this->registerService(\OC\CapabilitiesManager::class, function(Server $c) { |
|
884 | 884 | $manager = new \OC\CapabilitiesManager($c->getLogger()); |
885 | - $manager->registerCapability(function () use ($c) { |
|
885 | + $manager->registerCapability(function() use ($c) { |
|
886 | 886 | return new \OC\OCS\CoreCapabilities($c->getConfig()); |
887 | 887 | }); |
888 | - $manager->registerCapability(function () use ($c) { |
|
888 | + $manager->registerCapability(function() use ($c) { |
|
889 | 889 | return $c->query(\OC\Security\Bruteforce\Capabilities::class); |
890 | 890 | }); |
891 | 891 | return $manager; |
892 | 892 | }); |
893 | 893 | $this->registerAlias('CapabilitiesManager', \OC\CapabilitiesManager::class); |
894 | 894 | |
895 | - $this->registerService(\OCP\Comments\ICommentsManager::class, function (Server $c) { |
|
895 | + $this->registerService(\OCP\Comments\ICommentsManager::class, function(Server $c) { |
|
896 | 896 | $config = $c->getConfig(); |
897 | 897 | $factoryClass = $config->getSystemValue('comments.managerFactory', '\OC\Comments\ManagerFactory'); |
898 | 898 | /** @var \OCP\Comments\ICommentsManagerFactory $factory */ |
@@ -902,7 +902,7 @@ discard block |
||
902 | 902 | $manager->registerDisplayNameResolver('user', function($id) use ($c) { |
903 | 903 | $manager = $c->getUserManager(); |
904 | 904 | $user = $manager->get($id); |
905 | - if(is_null($user)) { |
|
905 | + if (is_null($user)) { |
|
906 | 906 | $l = $c->getL10N('core'); |
907 | 907 | $displayName = $l->t('Unknown user'); |
908 | 908 | } else { |
@@ -915,7 +915,7 @@ discard block |
||
915 | 915 | }); |
916 | 916 | $this->registerAlias('CommentsManager', \OCP\Comments\ICommentsManager::class); |
917 | 917 | |
918 | - $this->registerService('ThemingDefaults', function (Server $c) { |
|
918 | + $this->registerService('ThemingDefaults', function(Server $c) { |
|
919 | 919 | /* |
920 | 920 | * Dark magic for autoloader. |
921 | 921 | * If we do a class_exists it will try to load the class which will |
@@ -942,7 +942,7 @@ discard block |
||
942 | 942 | } |
943 | 943 | return new \OC_Defaults(); |
944 | 944 | }); |
945 | - $this->registerService(SCSSCacher::class, function (Server $c) { |
|
945 | + $this->registerService(SCSSCacher::class, function(Server $c) { |
|
946 | 946 | /** @var Factory $cacheFactory */ |
947 | 947 | $cacheFactory = $c->query(Factory::class); |
948 | 948 | return new SCSSCacher( |
@@ -955,13 +955,13 @@ discard block |
||
955 | 955 | $cacheFactory->create('SCSS') |
956 | 956 | ); |
957 | 957 | }); |
958 | - $this->registerService(EventDispatcher::class, function () { |
|
958 | + $this->registerService(EventDispatcher::class, function() { |
|
959 | 959 | return new EventDispatcher(); |
960 | 960 | }); |
961 | 961 | $this->registerAlias('EventDispatcher', EventDispatcher::class); |
962 | 962 | $this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class); |
963 | 963 | |
964 | - $this->registerService('CryptoWrapper', function (Server $c) { |
|
964 | + $this->registerService('CryptoWrapper', function(Server $c) { |
|
965 | 965 | // FIXME: Instantiiated here due to cyclic dependency |
966 | 966 | $request = new Request( |
967 | 967 | [ |
@@ -986,7 +986,7 @@ discard block |
||
986 | 986 | $request |
987 | 987 | ); |
988 | 988 | }); |
989 | - $this->registerService('CsrfTokenManager', function (Server $c) { |
|
989 | + $this->registerService('CsrfTokenManager', function(Server $c) { |
|
990 | 990 | $tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom()); |
991 | 991 | |
992 | 992 | return new CsrfTokenManager( |
@@ -994,22 +994,22 @@ discard block |
||
994 | 994 | $c->query(SessionStorage::class) |
995 | 995 | ); |
996 | 996 | }); |
997 | - $this->registerService(SessionStorage::class, function (Server $c) { |
|
997 | + $this->registerService(SessionStorage::class, function(Server $c) { |
|
998 | 998 | return new SessionStorage($c->getSession()); |
999 | 999 | }); |
1000 | - $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) { |
|
1000 | + $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) { |
|
1001 | 1001 | return new ContentSecurityPolicyManager(); |
1002 | 1002 | }); |
1003 | 1003 | $this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class); |
1004 | 1004 | |
1005 | - $this->registerService('ContentSecurityPolicyNonceManager', function (Server $c) { |
|
1005 | + $this->registerService('ContentSecurityPolicyNonceManager', function(Server $c) { |
|
1006 | 1006 | return new ContentSecurityPolicyNonceManager( |
1007 | 1007 | $c->getCsrfTokenManager(), |
1008 | 1008 | $c->getRequest() |
1009 | 1009 | ); |
1010 | 1010 | }); |
1011 | 1011 | |
1012 | - $this->registerService(\OCP\Share\IManager::class, function (Server $c) { |
|
1012 | + $this->registerService(\OCP\Share\IManager::class, function(Server $c) { |
|
1013 | 1013 | $config = $c->getConfig(); |
1014 | 1014 | $factoryClass = $config->getSystemValue('sharing.managerFactory', '\OC\Share20\ProviderFactory'); |
1015 | 1015 | /** @var \OCP\Share\IProviderFactory $factory */ |
@@ -1052,7 +1052,7 @@ discard block |
||
1052 | 1052 | |
1053 | 1053 | $this->registerAlias(\OCP\Collaboration\AutoComplete\IManager::class, \OC\Collaboration\AutoComplete\Manager::class); |
1054 | 1054 | |
1055 | - $this->registerService('SettingsManager', function (Server $c) { |
|
1055 | + $this->registerService('SettingsManager', function(Server $c) { |
|
1056 | 1056 | $manager = new \OC\Settings\Manager( |
1057 | 1057 | $c->getLogger(), |
1058 | 1058 | $c->getDatabaseConnection(), |
@@ -1072,29 +1072,29 @@ discard block |
||
1072 | 1072 | ); |
1073 | 1073 | return $manager; |
1074 | 1074 | }); |
1075 | - $this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) { |
|
1075 | + $this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) { |
|
1076 | 1076 | return new \OC\Files\AppData\Factory( |
1077 | 1077 | $c->getRootFolder(), |
1078 | 1078 | $c->getSystemConfig() |
1079 | 1079 | ); |
1080 | 1080 | }); |
1081 | 1081 | |
1082 | - $this->registerService('LockdownManager', function (Server $c) { |
|
1083 | - return new LockdownManager(function () use ($c) { |
|
1082 | + $this->registerService('LockdownManager', function(Server $c) { |
|
1083 | + return new LockdownManager(function() use ($c) { |
|
1084 | 1084 | return $c->getSession(); |
1085 | 1085 | }); |
1086 | 1086 | }); |
1087 | 1087 | |
1088 | - $this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) { |
|
1088 | + $this->registerService(\OCP\OCS\IDiscoveryService::class, function(Server $c) { |
|
1089 | 1089 | return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService()); |
1090 | 1090 | }); |
1091 | 1091 | |
1092 | - $this->registerService(ICloudIdManager::class, function (Server $c) { |
|
1092 | + $this->registerService(ICloudIdManager::class, function(Server $c) { |
|
1093 | 1093 | return new CloudIdManager(); |
1094 | 1094 | }); |
1095 | 1095 | |
1096 | 1096 | /* To trick DI since we don't extend the DIContainer here */ |
1097 | - $this->registerService(CleanPreviewsBackgroundJob::class, function (Server $c) { |
|
1097 | + $this->registerService(CleanPreviewsBackgroundJob::class, function(Server $c) { |
|
1098 | 1098 | return new CleanPreviewsBackgroundJob( |
1099 | 1099 | $c->getRootFolder(), |
1100 | 1100 | $c->getLogger(), |
@@ -1109,18 +1109,18 @@ discard block |
||
1109 | 1109 | $this->registerAlias(\OCP\AppFramework\Utility\ITimeFactory::class, \OC\AppFramework\Utility\TimeFactory::class); |
1110 | 1110 | $this->registerAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class); |
1111 | 1111 | |
1112 | - $this->registerService(Defaults::class, function (Server $c) { |
|
1112 | + $this->registerService(Defaults::class, function(Server $c) { |
|
1113 | 1113 | return new Defaults( |
1114 | 1114 | $c->getThemingDefaults() |
1115 | 1115 | ); |
1116 | 1116 | }); |
1117 | 1117 | $this->registerAlias('Defaults', \OCP\Defaults::class); |
1118 | 1118 | |
1119 | - $this->registerService(\OCP\ISession::class, function (SimpleContainer $c) { |
|
1119 | + $this->registerService(\OCP\ISession::class, function(SimpleContainer $c) { |
|
1120 | 1120 | return $c->query(\OCP\IUserSession::class)->getSession(); |
1121 | 1121 | }); |
1122 | 1122 | |
1123 | - $this->registerService(IShareHelper::class, function (Server $c) { |
|
1123 | + $this->registerService(IShareHelper::class, function(Server $c) { |
|
1124 | 1124 | return new ShareHelper( |
1125 | 1125 | $c->query(\OCP\Share\IManager::class) |
1126 | 1126 | ); |
@@ -1182,7 +1182,7 @@ discard block |
||
1182 | 1182 | // no avatar to remove |
1183 | 1183 | } catch (\Exception $e) { |
1184 | 1184 | // Ignore exceptions |
1185 | - $logger->info('Could not cleanup avatar of ' . $user->getUID()); |
|
1185 | + $logger->info('Could not cleanup avatar of '.$user->getUID()); |
|
1186 | 1186 | } |
1187 | 1187 | }); |
1188 | 1188 | } |
@@ -1321,7 +1321,7 @@ discard block |
||
1321 | 1321 | * @deprecated since 9.2.0 use IAppData |
1322 | 1322 | */ |
1323 | 1323 | public function getAppFolder() { |
1324 | - $dir = '/' . \OC_App::getCurrentApp(); |
|
1324 | + $dir = '/'.\OC_App::getCurrentApp(); |
|
1325 | 1325 | $root = $this->getRootFolder(); |
1326 | 1326 | if (!$root->nodeExists($dir)) { |
1327 | 1327 | $folder = $root->newFolder($dir); |
@@ -1905,7 +1905,7 @@ discard block |
||
1905 | 1905 | /** |
1906 | 1906 | * @return \OCP\Collaboration\AutoComplete\IManager |
1907 | 1907 | */ |
1908 | - public function getAutoCompleteManager(){ |
|
1908 | + public function getAutoCompleteManager() { |
|
1909 | 1909 | return $this->query(IManager::class); |
1910 | 1910 | } |
1911 | 1911 |
@@ -47,14 +47,14 @@ |
||
47 | 47 | $application = new \OCP\AppFramework\App('comments'); |
48 | 48 | return $application->getContainer()->query(\OCA\Comments\Notification\Notifier::class); |
49 | 49 | }, |
50 | - function () { |
|
50 | + function() { |
|
51 | 51 | $l = \OC::$server->getL10N('comments'); |
52 | 52 | return ['id' => 'comments', 'name' => $l->t('Comments')]; |
53 | 53 | } |
54 | 54 | ); |
55 | 55 | |
56 | 56 | $commentsManager = \OC::$server->getCommentsManager(); |
57 | -$commentsManager->registerEventHandler(function () { |
|
57 | +$commentsManager->registerEventHandler(function() { |
|
58 | 58 | $application = new \OCP\AppFramework\App('comments'); |
59 | 59 | /** @var \OCA\Comments\EventHandler $handler */ |
60 | 60 | $handler = $application->getContainer()->query(\OCA\Comments\EventHandler::class); |