Completed
Pull Request — master (#9293)
by Blizzz
18:49
created
lib/private/Log.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 		// interpolate $message as defined in PSR-3
211 211
 		$replace = [];
212 212
 		foreach ($context as $key => $val) {
213
-			$replace['{' . $key . '}'] = $val;
213
+			$replace['{'.$key.'}'] = $val;
214 214
 		}
215 215
 		$message = strtr($message, $replace);
216 216
 
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 	}
318 318
 
319 319
 	public function getLogPath():string {
320
-		if($this->logger instanceof IFileBased) {
320
+		if ($this->logger instanceof IFileBased) {
321 321
 			return $this->logger->getLogFilePath();
322 322
 		}
323 323
 		throw new \RuntimeException('Log implementation has no path');
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -36,13 +36,11 @@
 block discarded – undo
36 36
 namespace OC;
37 37
 
38 38
 use InterfaSys\LogNormalizer\Normalizer;
39
-
40 39
 use OC\Log\ExceptionSerializer;
41 40
 use OCP\Log\IFileBased;
42 41
 use OCP\Log\IWriter;
43 42
 use OCP\ILogger;
44 43
 use OCP\Support\CrashReport\IRegistry;
45
-use OCP\Util;
46 44
 
47 45
 /**
48 46
  * logging utilities
Please login to merge, or discard this patch.
settings/Controller/LogSettingsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 	 * @return StreamResponse
56 56
 	 */
57 57
 	public function download() {
58
-		if(!$this->log instanceof Log) {
58
+		if (!$this->log instanceof Log) {
59 59
 			throw new \UnexpectedValueException('Log file not available');
60 60
 		}
61 61
 		$resp = new StreamResponse($this->log->getLogPath());
Please login to merge, or discard this patch.
lib/private/Server.php 1 patch
Spacing   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		parent::__construct();
164 164
 		$this->webRoot = $webRoot;
165 165
 
166
-		$this->registerService(\OCP\IServerContainer::class, function (IServerContainer $c) {
166
+		$this->registerService(\OCP\IServerContainer::class, function(IServerContainer $c) {
167 167
 			return $c;
168 168
 		});
169 169
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 		$this->registerAlias(IActionFactory::class, ActionFactory::class);
177 177
 
178 178
 
179
-		$this->registerService(\OCP\IPreview::class, function (Server $c) {
179
+		$this->registerService(\OCP\IPreview::class, function(Server $c) {
180 180
 			return new PreviewManager(
181 181
 				$c->getConfig(),
182 182
 				$c->getRootFolder(),
@@ -187,13 +187,13 @@  discard block
 block discarded – undo
187 187
 		});
188 188
 		$this->registerAlias('PreviewManager', \OCP\IPreview::class);
189 189
 
190
-		$this->registerService(\OC\Preview\Watcher::class, function (Server $c) {
190
+		$this->registerService(\OC\Preview\Watcher::class, function(Server $c) {
191 191
 			return new \OC\Preview\Watcher(
192 192
 				$c->getAppDataDir('preview')
193 193
 			);
194 194
 		});
195 195
 
196
-		$this->registerService('EncryptionManager', function (Server $c) {
196
+		$this->registerService('EncryptionManager', function(Server $c) {
197 197
 			$view = new View();
198 198
 			$util = new Encryption\Util(
199 199
 				$view,
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 			);
212 212
 		});
213 213
 
214
-		$this->registerService('EncryptionFileHelper', function (Server $c) {
214
+		$this->registerService('EncryptionFileHelper', function(Server $c) {
215 215
 			$util = new Encryption\Util(
216 216
 				new View(),
217 217
 				$c->getUserManager(),
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 			);
226 226
 		});
227 227
 
228
-		$this->registerService('EncryptionKeyStorage', function (Server $c) {
228
+		$this->registerService('EncryptionKeyStorage', function(Server $c) {
229 229
 			$view = new View();
230 230
 			$util = new Encryption\Util(
231 231
 				$view,
@@ -236,30 +236,30 @@  discard block
 block discarded – undo
236 236
 
237 237
 			return new Encryption\Keys\Storage($view, $util);
238 238
 		});
239
-		$this->registerService('TagMapper', function (Server $c) {
239
+		$this->registerService('TagMapper', function(Server $c) {
240 240
 			return new TagMapper($c->getDatabaseConnection());
241 241
 		});
242 242
 
243
-		$this->registerService(\OCP\ITagManager::class, function (Server $c) {
243
+		$this->registerService(\OCP\ITagManager::class, function(Server $c) {
244 244
 			$tagMapper = $c->query('TagMapper');
245 245
 			return new TagManager($tagMapper, $c->getUserSession());
246 246
 		});
247 247
 		$this->registerAlias('TagManager', \OCP\ITagManager::class);
248 248
 
249
-		$this->registerService('SystemTagManagerFactory', function (Server $c) {
249
+		$this->registerService('SystemTagManagerFactory', function(Server $c) {
250 250
 			$config = $c->getConfig();
251 251
 			$factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class);
252 252
 			return new $factoryClass($this);
253 253
 		});
254
-		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) {
254
+		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) {
255 255
 			return $c->query('SystemTagManagerFactory')->getManager();
256 256
 		});
257 257
 		$this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class);
258 258
 
259
-		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) {
259
+		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) {
260 260
 			return $c->query('SystemTagManagerFactory')->getObjectMapper();
261 261
 		});
262
-		$this->registerService('RootFolder', function (Server $c) {
262
+		$this->registerService('RootFolder', function(Server $c) {
263 263
 			$manager = \OC\Files\Filesystem::getMountManager(null);
264 264
 			$view = new View();
265 265
 			$root = new Root(
@@ -280,38 +280,38 @@  discard block
 block discarded – undo
280 280
 		});
281 281
 		$this->registerAlias('SystemTagObjectMapper', \OCP\SystemTag\ISystemTagObjectMapper::class);
282 282
 
283
-		$this->registerService(\OCP\Files\IRootFolder::class, function (Server $c) {
284
-			return new LazyRoot(function () use ($c) {
283
+		$this->registerService(\OCP\Files\IRootFolder::class, function(Server $c) {
284
+			return new LazyRoot(function() use ($c) {
285 285
 				return $c->query('RootFolder');
286 286
 			});
287 287
 		});
288 288
 		$this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class);
289 289
 
290
-		$this->registerService(\OC\User\Manager::class, function (Server $c) {
290
+		$this->registerService(\OC\User\Manager::class, function(Server $c) {
291 291
 			$config = $c->getConfig();
292 292
 			return new \OC\User\Manager($config);
293 293
 		});
294 294
 		$this->registerAlias('UserManager', \OC\User\Manager::class);
295 295
 		$this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class);
296 296
 
297
-		$this->registerService(\OCP\IGroupManager::class, function (Server $c) {
297
+		$this->registerService(\OCP\IGroupManager::class, function(Server $c) {
298 298
 			$groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger());
299
-			$groupManager->listen('\OC\Group', 'preCreate', function ($gid) {
299
+			$groupManager->listen('\OC\Group', 'preCreate', function($gid) {
300 300
 				\OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid));
301 301
 			});
302
-			$groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) {
302
+			$groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) {
303 303
 				\OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID()));
304 304
 			});
305
-			$groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) {
305
+			$groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) {
306 306
 				\OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID()));
307 307
 			});
308
-			$groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) {
308
+			$groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) {
309 309
 				\OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID()));
310 310
 			});
311
-			$groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
311
+			$groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
312 312
 				\OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID()));
313 313
 			});
314
-			$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
314
+			$groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
315 315
 				\OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
316 316
 				//Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks
317 317
 				\OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 		});
321 321
 		$this->registerAlias('GroupManager', \OCP\IGroupManager::class);
322 322
 
323
-		$this->registerService(Store::class, function (Server $c) {
323
+		$this->registerService(Store::class, function(Server $c) {
324 324
 			$session = $c->getSession();
325 325
 			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
326 326
 				$tokenProvider = $c->query(IProvider::class);
@@ -331,11 +331,11 @@  discard block
 block discarded – undo
331 331
 			return new Store($session, $logger, $tokenProvider);
332 332
 		});
333 333
 		$this->registerAlias(IStore::class, Store::class);
334
-		$this->registerService(Authentication\Token\DefaultTokenMapper::class, function (Server $c) {
334
+		$this->registerService(Authentication\Token\DefaultTokenMapper::class, function(Server $c) {
335 335
 			$dbConnection = $c->getDatabaseConnection();
336 336
 			return new Authentication\Token\DefaultTokenMapper($dbConnection);
337 337
 		});
338
-		$this->registerService(Authentication\Token\DefaultTokenProvider::class, function (Server $c) {
338
+		$this->registerService(Authentication\Token\DefaultTokenProvider::class, function(Server $c) {
339 339
 			$mapper = $c->query(Authentication\Token\DefaultTokenMapper::class);
340 340
 			$crypto = $c->getCrypto();
341 341
 			$config = $c->getConfig();
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 		});
346 346
 		$this->registerAlias(IProvider::class, Authentication\Token\DefaultTokenProvider::class);
347 347
 
348
-		$this->registerService(\OCP\IUserSession::class, function (Server $c) {
348
+		$this->registerService(\OCP\IUserSession::class, function(Server $c) {
349 349
 			$manager = $c->getUserManager();
350 350
 			$session = new \OC\Session\Memory('');
351 351
 			$timeFactory = new TimeFactory();
@@ -369,45 +369,45 @@  discard block
 block discarded – undo
369 369
 				$c->getLockdownManager(),
370 370
 				$c->getLogger()
371 371
 			);
372
-			$userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) {
372
+			$userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) {
373 373
 				\OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password));
374 374
 			});
375
-			$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
375
+			$userSession->listen('\OC\User', 'postCreateUser', function($user, $password) {
376 376
 				/** @var $user \OC\User\User */
377 377
 				\OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password));
378 378
 			});
379
-			$userSession->listen('\OC\User', 'preDelete', function ($user) use ($dispatcher) {
379
+			$userSession->listen('\OC\User', 'preDelete', function($user) use ($dispatcher) {
380 380
 				/** @var $user \OC\User\User */
381 381
 				\OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID()));
382 382
 				$dispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user));
383 383
 			});
384
-			$userSession->listen('\OC\User', 'postDelete', function ($user) {
384
+			$userSession->listen('\OC\User', 'postDelete', function($user) {
385 385
 				/** @var $user \OC\User\User */
386 386
 				\OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID()));
387 387
 			});
388
-			$userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) {
388
+			$userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) {
389 389
 				/** @var $user \OC\User\User */
390 390
 				\OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
391 391
 			});
392
-			$userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) {
392
+			$userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) {
393 393
 				/** @var $user \OC\User\User */
394 394
 				\OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
395 395
 			});
396
-			$userSession->listen('\OC\User', 'preLogin', function ($uid, $password) {
396
+			$userSession->listen('\OC\User', 'preLogin', function($uid, $password) {
397 397
 				\OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password));
398 398
 			});
399
-			$userSession->listen('\OC\User', 'postLogin', function ($user, $password) {
399
+			$userSession->listen('\OC\User', 'postLogin', 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', 'postRememberedLogin', function ($user, $password) {
403
+			$userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) {
404 404
 				/** @var $user \OC\User\User */
405 405
 				\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
406 406
 			});
407
-			$userSession->listen('\OC\User', 'logout', function () {
407
+			$userSession->listen('\OC\User', 'logout', function() {
408 408
 				\OC_Hook::emit('OC_User', 'logout', array());
409 409
 			});
410
-			$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) use ($dispatcher) {
410
+			$userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) use ($dispatcher) {
411 411
 				/** @var $user \OC\User\User */
412 412
 				\OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue));
413 413
 				$dispatcher->dispatch('OCP\IUser::changeUser', new GenericEvent($user, ['feature' => $feature, 'oldValue' => $oldValue, 'value' => $value]));
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
 		});
417 417
 		$this->registerAlias('UserSession', \OCP\IUserSession::class);
418 418
 
419
-		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function (Server $c) {
419
+		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function(Server $c) {
420 420
 			return new \OC\Authentication\TwoFactorAuth\Manager(
421 421
 				$c->getAppManager(),
422 422
 				$c->getSession(),
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 		$this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class);
433 433
 		$this->registerAlias('NavigationManager', \OCP\INavigationManager::class);
434 434
 
435
-		$this->registerService(\OC\AllConfig::class, function (Server $c) {
435
+		$this->registerService(\OC\AllConfig::class, function(Server $c) {
436 436
 			return new \OC\AllConfig(
437 437
 				$c->getSystemConfig()
438 438
 			);
@@ -440,17 +440,17 @@  discard block
 block discarded – undo
440 440
 		$this->registerAlias('AllConfig', \OC\AllConfig::class);
441 441
 		$this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class);
442 442
 
443
-		$this->registerService('SystemConfig', function ($c) use ($config) {
443
+		$this->registerService('SystemConfig', function($c) use ($config) {
444 444
 			return new \OC\SystemConfig($config);
445 445
 		});
446 446
 
447
-		$this->registerService(\OC\AppConfig::class, function (Server $c) {
447
+		$this->registerService(\OC\AppConfig::class, function(Server $c) {
448 448
 			return new \OC\AppConfig($c->getDatabaseConnection());
449 449
 		});
450 450
 		$this->registerAlias('AppConfig', \OC\AppConfig::class);
451 451
 		$this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class);
452 452
 
453
-		$this->registerService(\OCP\L10N\IFactory::class, function (Server $c) {
453
+		$this->registerService(\OCP\L10N\IFactory::class, function(Server $c) {
454 454
 			return new \OC\L10N\Factory(
455 455
 				$c->getConfig(),
456 456
 				$c->getRequest(),
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 		});
461 461
 		$this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class);
462 462
 
463
-		$this->registerService(\OCP\IURLGenerator::class, function (Server $c) {
463
+		$this->registerService(\OCP\IURLGenerator::class, function(Server $c) {
464 464
 			$config = $c->getConfig();
465 465
 			$cacheFactory = $c->getMemCacheFactory();
466 466
 			$request = $c->getRequest();
@@ -475,12 +475,12 @@  discard block
 block discarded – undo
475 475
 		$this->registerAlias('AppFetcher', AppFetcher::class);
476 476
 		$this->registerAlias('CategoryFetcher', CategoryFetcher::class);
477 477
 
478
-		$this->registerService(\OCP\ICache::class, function ($c) {
478
+		$this->registerService(\OCP\ICache::class, function($c) {
479 479
 			return new Cache\File();
480 480
 		});
481 481
 		$this->registerAlias('UserCache', \OCP\ICache::class);
482 482
 
483
-		$this->registerService(Factory::class, function (Server $c) {
483
+		$this->registerService(Factory::class, function(Server $c) {
484 484
 
485 485
 			$arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(),
486 486
 				ArrayCache::class,
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
 				$version = implode(',', $v);
498 498
 				$instanceId = \OC_Util::getInstanceId();
499 499
 				$path = \OC::$SERVERROOT;
500
-				$prefix = md5($instanceId . '-' . $version . '-' . $path);
500
+				$prefix = md5($instanceId.'-'.$version.'-'.$path);
501 501
 				return new \OC\Memcache\Factory($prefix, $c->getLogger(),
502 502
 					$config->getSystemValue('memcache.local', null),
503 503
 					$config->getSystemValue('memcache.distributed', null),
@@ -510,12 +510,12 @@  discard block
 block discarded – undo
510 510
 		$this->registerAlias('MemCacheFactory', Factory::class);
511 511
 		$this->registerAlias(ICacheFactory::class, Factory::class);
512 512
 
513
-		$this->registerService('RedisFactory', function (Server $c) {
513
+		$this->registerService('RedisFactory', function(Server $c) {
514 514
 			$systemConfig = $c->getSystemConfig();
515 515
 			return new RedisFactory($systemConfig);
516 516
 		});
517 517
 
518
-		$this->registerService(\OCP\Activity\IManager::class, function (Server $c) {
518
+		$this->registerService(\OCP\Activity\IManager::class, function(Server $c) {
519 519
 			return new \OC\Activity\Manager(
520 520
 				$c->getRequest(),
521 521
 				$c->getUserSession(),
@@ -525,14 +525,14 @@  discard block
 block discarded – undo
525 525
 		});
526 526
 		$this->registerAlias('ActivityManager', \OCP\Activity\IManager::class);
527 527
 
528
-		$this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) {
528
+		$this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) {
529 529
 			return new \OC\Activity\EventMerger(
530 530
 				$c->getL10N('lib')
531 531
 			);
532 532
 		});
533 533
 		$this->registerAlias(IValidator::class, Validator::class);
534 534
 
535
-		$this->registerService(\OCP\IAvatarManager::class, function (Server $c) {
535
+		$this->registerService(\OCP\IAvatarManager::class, function(Server $c) {
536 536
 			return new AvatarManager(
537 537
 				$c->query(\OC\User\Manager::class),
538 538
 				$c->getAppDataDir('avatar'),
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
 
546 546
 		$this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class);
547 547
 
548
-		$this->registerService(\OCP\ILogger::class, function (Server $c) {
548
+		$this->registerService(\OCP\ILogger::class, function(Server $c) {
549 549
 			$logType = $c->query('AllConfig')->getSystemValue('log_type', 'file');
550 550
 			$factory = new LogFactory($c);
551 551
 			$logger = $factory->get($logType);
@@ -556,12 +556,12 @@  discard block
 block discarded – undo
556 556
 		});
557 557
 		$this->registerAlias('Logger', \OCP\ILogger::class);
558 558
 
559
-		$this->registerService(ILogFactory::class, function (Server $c) {
559
+		$this->registerService(ILogFactory::class, function(Server $c) {
560 560
 			return new LogFactory($c);
561 561
 		});
562 562
 		$this->registerAlias('LogFactory', ILogFactory::class);
563 563
 
564
-		$this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) {
564
+		$this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) {
565 565
 			$config = $c->getConfig();
566 566
 			return new \OC\BackgroundJob\JobList(
567 567
 				$c->getDatabaseConnection(),
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
 		});
572 572
 		$this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class);
573 573
 
574
-		$this->registerService(\OCP\Route\IRouter::class, function (Server $c) {
574
+		$this->registerService(\OCP\Route\IRouter::class, function(Server $c) {
575 575
 			$cacheFactory = $c->getMemCacheFactory();
576 576
 			$logger = $c->getLogger();
577 577
 			if ($cacheFactory->isLocalCacheAvailable()) {
@@ -583,12 +583,12 @@  discard block
 block discarded – undo
583 583
 		});
584 584
 		$this->registerAlias('Router', \OCP\Route\IRouter::class);
585 585
 
586
-		$this->registerService(\OCP\ISearch::class, function ($c) {
586
+		$this->registerService(\OCP\ISearch::class, function($c) {
587 587
 			return new Search();
588 588
 		});
589 589
 		$this->registerAlias('Search', \OCP\ISearch::class);
590 590
 
591
-		$this->registerService(\OC\Security\RateLimiting\Limiter::class, function (Server $c) {
591
+		$this->registerService(\OC\Security\RateLimiting\Limiter::class, function(Server $c) {
592 592
 			return new \OC\Security\RateLimiting\Limiter(
593 593
 				$this->getUserSession(),
594 594
 				$this->getRequest(),
@@ -596,34 +596,34 @@  discard block
 block discarded – undo
596 596
 				$c->query(\OC\Security\RateLimiting\Backend\IBackend::class)
597 597
 			);
598 598
 		});
599
-		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) {
599
+		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) {
600 600
 			return new \OC\Security\RateLimiting\Backend\MemoryCache(
601 601
 				$this->getMemCacheFactory(),
602 602
 				new \OC\AppFramework\Utility\TimeFactory()
603 603
 			);
604 604
 		});
605 605
 
606
-		$this->registerService(\OCP\Security\ISecureRandom::class, function ($c) {
606
+		$this->registerService(\OCP\Security\ISecureRandom::class, function($c) {
607 607
 			return new SecureRandom();
608 608
 		});
609 609
 		$this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class);
610 610
 
611
-		$this->registerService(\OCP\Security\ICrypto::class, function (Server $c) {
611
+		$this->registerService(\OCP\Security\ICrypto::class, function(Server $c) {
612 612
 			return new Crypto($c->getConfig(), $c->getSecureRandom());
613 613
 		});
614 614
 		$this->registerAlias('Crypto', \OCP\Security\ICrypto::class);
615 615
 
616
-		$this->registerService(\OCP\Security\IHasher::class, function (Server $c) {
616
+		$this->registerService(\OCP\Security\IHasher::class, function(Server $c) {
617 617
 			return new Hasher($c->getConfig());
618 618
 		});
619 619
 		$this->registerAlias('Hasher', \OCP\Security\IHasher::class);
620 620
 
621
-		$this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) {
621
+		$this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) {
622 622
 			return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection());
623 623
 		});
624 624
 		$this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class);
625 625
 
626
-		$this->registerService(IDBConnection::class, function (Server $c) {
626
+		$this->registerService(IDBConnection::class, function(Server $c) {
627 627
 			$systemConfig = $c->getSystemConfig();
628 628
 			$factory = new \OC\DB\ConnectionFactory($systemConfig);
629 629
 			$type = $systemConfig->getValue('dbtype', 'sqlite');
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
 		$this->registerAlias('DatabaseConnection', IDBConnection::class);
639 639
 
640 640
 
641
-		$this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) {
641
+		$this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) {
642 642
 			$user = \OC_User::getUser();
643 643
 			$uid = $user ? $user : null;
644 644
 			return new ClientService(
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
 			);
654 654
 		});
655 655
 		$this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class);
656
-		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) {
656
+		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) {
657 657
 			$eventLogger = new EventLogger();
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
 block discarded – undo
663 663
 		});
664 664
 		$this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class);
665 665
 
666
-		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) {
666
+		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) {
667 667
 			$queryLogger = new QueryLogger();
668 668
 			if ($c->getSystemConfig()->getValue('debug', false)) {
669 669
 				// In debug mode, module is being activated by default
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
 		});
674 674
 		$this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class);
675 675
 
676
-		$this->registerService(TempManager::class, function (Server $c) {
676
+		$this->registerService(TempManager::class, function(Server $c) {
677 677
 			return new TempManager(
678 678
 				$c->getLogger(),
679 679
 				$c->getConfig()
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
 		$this->registerAlias('TempManager', TempManager::class);
683 683
 		$this->registerAlias(ITempManager::class, TempManager::class);
684 684
 
685
-		$this->registerService(AppManager::class, function (Server $c) {
685
+		$this->registerService(AppManager::class, function(Server $c) {
686 686
 			return new \OC\App\AppManager(
687 687
 				$c->getUserSession(),
688 688
 				$c->query(\OC\AppConfig::class),
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
 		$this->registerAlias('AppManager', AppManager::class);
695 695
 		$this->registerAlias(IAppManager::class, AppManager::class);
696 696
 
697
-		$this->registerService(\OCP\IDateTimeZone::class, function (Server $c) {
697
+		$this->registerService(\OCP\IDateTimeZone::class, function(Server $c) {
698 698
 			return new DateTimeZone(
699 699
 				$c->getConfig(),
700 700
 				$c->getSession()
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
 		});
703 703
 		$this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class);
704 704
 
705
-		$this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) {
705
+		$this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) {
706 706
 			$language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null);
707 707
 
708 708
 			return new DateTimeFormatter(
@@ -712,7 +712,7 @@  discard block
 block discarded – undo
712 712
 		});
713 713
 		$this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class);
714 714
 
715
-		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) {
715
+		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) {
716 716
 			$mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger());
717 717
 			$listener = new UserMountCacheListener($mountCache);
718 718
 			$listener->listen($c->getUserManager());
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
 		});
721 721
 		$this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class);
722 722
 
723
-		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) {
723
+		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) {
724 724
 			$loader = \OC\Files\Filesystem::getLoader();
725 725
 			$mountCache = $c->query('UserMountCache');
726 726
 			$manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache);
@@ -736,10 +736,10 @@  discard block
 block discarded – undo
736 736
 		});
737 737
 		$this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class);
738 738
 
739
-		$this->registerService('IniWrapper', function ($c) {
739
+		$this->registerService('IniWrapper', function($c) {
740 740
 			return new IniGetWrapper();
741 741
 		});
742
-		$this->registerService('AsyncCommandBus', function (Server $c) {
742
+		$this->registerService('AsyncCommandBus', function(Server $c) {
743 743
 			$busClass = $c->getConfig()->getSystemValue('commandbus');
744 744
 			if ($busClass) {
745 745
 				list($app, $class) = explode('::', $busClass, 2);
@@ -754,10 +754,10 @@  discard block
 block discarded – undo
754 754
 				return new CronBus($jobList);
755 755
 			}
756 756
 		});
757
-		$this->registerService('TrustedDomainHelper', function ($c) {
757
+		$this->registerService('TrustedDomainHelper', function($c) {
758 758
 			return new TrustedDomainHelper($this->getConfig());
759 759
 		});
760
-		$this->registerService('Throttler', function (Server $c) {
760
+		$this->registerService('Throttler', function(Server $c) {
761 761
 			return new Throttler(
762 762
 				$c->getDatabaseConnection(),
763 763
 				new TimeFactory(),
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
 				$c->getConfig()
766 766
 			);
767 767
 		});
768
-		$this->registerService('IntegrityCodeChecker', function (Server $c) {
768
+		$this->registerService('IntegrityCodeChecker', function(Server $c) {
769 769
 			// IConfig and IAppManager requires a working database. This code
770 770
 			// might however be called when ownCloud is not yet setup.
771 771
 			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
 				$c->getTempManager()
787 787
 			);
788 788
 		});
789
-		$this->registerService(\OCP\IRequest::class, function ($c) {
789
+		$this->registerService(\OCP\IRequest::class, function($c) {
790 790
 			if (isset($this['urlParams'])) {
791 791
 				$urlParams = $this['urlParams'];
792 792
 			} else {
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
 		});
823 823
 		$this->registerAlias('Request', \OCP\IRequest::class);
824 824
 
825
-		$this->registerService(\OCP\Mail\IMailer::class, function (Server $c) {
825
+		$this->registerService(\OCP\Mail\IMailer::class, function(Server $c) {
826 826
 			return new Mailer(
827 827
 				$c->getConfig(),
828 828
 				$c->getLogger(),
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
 		});
834 834
 		$this->registerAlias('Mailer', \OCP\Mail\IMailer::class);
835 835
 
836
-		$this->registerService('LDAPProvider', function (Server $c) {
836
+		$this->registerService('LDAPProvider', function(Server $c) {
837 837
 			$config = $c->getConfig();
838 838
 			$factoryClass = $config->getSystemValue('ldapProviderFactory', null);
839 839
 			if (is_null($factoryClass)) {
@@ -843,7 +843,7 @@  discard block
 block discarded – undo
843 843
 			$factory = new $factoryClass($this);
844 844
 			return $factory->getLDAPProvider();
845 845
 		});
846
-		$this->registerService(ILockingProvider::class, function (Server $c) {
846
+		$this->registerService(ILockingProvider::class, function(Server $c) {
847 847
 			$ini = $c->getIniWrapper();
848 848
 			$config = $c->getConfig();
849 849
 			$ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time')));
@@ -866,49 +866,49 @@  discard block
 block discarded – undo
866 866
 		});
867 867
 		$this->registerAlias('LockingProvider', ILockingProvider::class);
868 868
 
869
-		$this->registerService(\OCP\Files\Mount\IMountManager::class, function () {
869
+		$this->registerService(\OCP\Files\Mount\IMountManager::class, function() {
870 870
 			return new \OC\Files\Mount\Manager();
871 871
 		});
872 872
 		$this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class);
873 873
 
874
-		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) {
874
+		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) {
875 875
 			return new \OC\Files\Type\Detection(
876 876
 				$c->getURLGenerator(),
877 877
 				\OC::$configDir,
878
-				\OC::$SERVERROOT . '/resources/config/'
878
+				\OC::$SERVERROOT.'/resources/config/'
879 879
 			);
880 880
 		});
881 881
 		$this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class);
882 882
 
883
-		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) {
883
+		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) {
884 884
 			return new \OC\Files\Type\Loader(
885 885
 				$c->getDatabaseConnection()
886 886
 			);
887 887
 		});
888 888
 		$this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class);
889
-		$this->registerService(BundleFetcher::class, function () {
889
+		$this->registerService(BundleFetcher::class, function() {
890 890
 			return new BundleFetcher($this->getL10N('lib'));
891 891
 		});
892
-		$this->registerService(\OCP\Notification\IManager::class, function (Server $c) {
892
+		$this->registerService(\OCP\Notification\IManager::class, function(Server $c) {
893 893
 			return new Manager(
894 894
 				$c->query(IValidator::class)
895 895
 			);
896 896
 		});
897 897
 		$this->registerAlias('NotificationManager', \OCP\Notification\IManager::class);
898 898
 
899
-		$this->registerService(\OC\CapabilitiesManager::class, function (Server $c) {
899
+		$this->registerService(\OC\CapabilitiesManager::class, function(Server $c) {
900 900
 			$manager = new \OC\CapabilitiesManager($c->getLogger());
901
-			$manager->registerCapability(function () use ($c) {
901
+			$manager->registerCapability(function() use ($c) {
902 902
 				return new \OC\OCS\CoreCapabilities($c->getConfig());
903 903
 			});
904
-			$manager->registerCapability(function () use ($c) {
904
+			$manager->registerCapability(function() use ($c) {
905 905
 				return $c->query(\OC\Security\Bruteforce\Capabilities::class);
906 906
 			});
907 907
 			return $manager;
908 908
 		});
909 909
 		$this->registerAlias('CapabilitiesManager', \OC\CapabilitiesManager::class);
910 910
 
911
-		$this->registerService(\OCP\Comments\ICommentsManager::class, function (Server $c) {
911
+		$this->registerService(\OCP\Comments\ICommentsManager::class, function(Server $c) {
912 912
 			$config = $c->getConfig();
913 913
 			$factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class);
914 914
 			/** @var \OCP\Comments\ICommentsManagerFactory $factory */
@@ -918,7 +918,7 @@  discard block
 block discarded – undo
918 918
 			$manager->registerDisplayNameResolver('user', function($id) use ($c) {
919 919
 				$manager = $c->getUserManager();
920 920
 				$user = $manager->get($id);
921
-				if(is_null($user)) {
921
+				if (is_null($user)) {
922 922
 					$l = $c->getL10N('core');
923 923
 					$displayName = $l->t('Unknown user');
924 924
 				} else {
@@ -931,7 +931,7 @@  discard block
 block discarded – undo
931 931
 		});
932 932
 		$this->registerAlias('CommentsManager', \OCP\Comments\ICommentsManager::class);
933 933
 
934
-		$this->registerService('ThemingDefaults', function (Server $c) {
934
+		$this->registerService('ThemingDefaults', function(Server $c) {
935 935
 			/*
936 936
 			 * Dark magic for autoloader.
937 937
 			 * If we do a class_exists it will try to load the class which will
@@ -958,7 +958,7 @@  discard block
 block discarded – undo
958 958
 			}
959 959
 			return new \OC_Defaults();
960 960
 		});
961
-		$this->registerService(SCSSCacher::class, function (Server $c) {
961
+		$this->registerService(SCSSCacher::class, function(Server $c) {
962 962
 			/** @var Factory $cacheFactory */
963 963
 			$cacheFactory = $c->query(Factory::class);
964 964
 			return new SCSSCacher(
@@ -971,7 +971,7 @@  discard block
 block discarded – undo
971 971
 				$this->getMemCacheFactory()
972 972
 			);
973 973
 		});
974
-		$this->registerService(JSCombiner::class, function (Server $c) {
974
+		$this->registerService(JSCombiner::class, function(Server $c) {
975 975
 			/** @var Factory $cacheFactory */
976 976
 			$cacheFactory = $c->query(Factory::class);
977 977
 			return new JSCombiner(
@@ -982,13 +982,13 @@  discard block
 block discarded – undo
982 982
 				$c->getLogger()
983 983
 			);
984 984
 		});
985
-		$this->registerService(EventDispatcher::class, function () {
985
+		$this->registerService(EventDispatcher::class, function() {
986 986
 			return new EventDispatcher();
987 987
 		});
988 988
 		$this->registerAlias('EventDispatcher', EventDispatcher::class);
989 989
 		$this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class);
990 990
 
991
-		$this->registerService('CryptoWrapper', function (Server $c) {
991
+		$this->registerService('CryptoWrapper', function(Server $c) {
992 992
 			// FIXME: Instantiiated here due to cyclic dependency
993 993
 			$request = new Request(
994 994
 				[
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
 				$request
1014 1014
 			);
1015 1015
 		});
1016
-		$this->registerService('CsrfTokenManager', function (Server $c) {
1016
+		$this->registerService('CsrfTokenManager', function(Server $c) {
1017 1017
 			$tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom());
1018 1018
 
1019 1019
 			return new CsrfTokenManager(
@@ -1021,22 +1021,22 @@  discard block
 block discarded – undo
1021 1021
 				$c->query(SessionStorage::class)
1022 1022
 			);
1023 1023
 		});
1024
-		$this->registerService(SessionStorage::class, function (Server $c) {
1024
+		$this->registerService(SessionStorage::class, function(Server $c) {
1025 1025
 			return new SessionStorage($c->getSession());
1026 1026
 		});
1027
-		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) {
1027
+		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) {
1028 1028
 			return new ContentSecurityPolicyManager();
1029 1029
 		});
1030 1030
 		$this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class);
1031 1031
 
1032
-		$this->registerService('ContentSecurityPolicyNonceManager', function (Server $c) {
1032
+		$this->registerService('ContentSecurityPolicyNonceManager', function(Server $c) {
1033 1033
 			return new ContentSecurityPolicyNonceManager(
1034 1034
 				$c->getCsrfTokenManager(),
1035 1035
 				$c->getRequest()
1036 1036
 			);
1037 1037
 		});
1038 1038
 
1039
-		$this->registerService(\OCP\Share\IManager::class, function (Server $c) {
1039
+		$this->registerService(\OCP\Share\IManager::class, function(Server $c) {
1040 1040
 			$config = $c->getConfig();
1041 1041
 			$factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class);
1042 1042
 			/** @var \OCP\Share\IProviderFactory $factory */
@@ -1079,7 +1079,7 @@  discard block
 block discarded – undo
1079 1079
 
1080 1080
 		$this->registerAlias(\OCP\Collaboration\AutoComplete\IManager::class, \OC\Collaboration\AutoComplete\Manager::class);
1081 1081
 
1082
-		$this->registerService('SettingsManager', function (Server $c) {
1082
+		$this->registerService('SettingsManager', function(Server $c) {
1083 1083
 			$manager = new \OC\Settings\Manager(
1084 1084
 				$c->getLogger(),
1085 1085
 				$c->getDatabaseConnection(),
@@ -1097,24 +1097,24 @@  discard block
 block discarded – undo
1097 1097
 			);
1098 1098
 			return $manager;
1099 1099
 		});
1100
-		$this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) {
1100
+		$this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) {
1101 1101
 			return new \OC\Files\AppData\Factory(
1102 1102
 				$c->getRootFolder(),
1103 1103
 				$c->getSystemConfig()
1104 1104
 			);
1105 1105
 		});
1106 1106
 
1107
-		$this->registerService('LockdownManager', function (Server $c) {
1108
-			return new LockdownManager(function () use ($c) {
1107
+		$this->registerService('LockdownManager', function(Server $c) {
1108
+			return new LockdownManager(function() use ($c) {
1109 1109
 				return $c->getSession();
1110 1110
 			});
1111 1111
 		});
1112 1112
 
1113
-		$this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) {
1113
+		$this->registerService(\OCP\OCS\IDiscoveryService::class, function(Server $c) {
1114 1114
 			return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService());
1115 1115
 		});
1116 1116
 
1117
-		$this->registerService(ICloudIdManager::class, function (Server $c) {
1117
+		$this->registerService(ICloudIdManager::class, function(Server $c) {
1118 1118
 			return new CloudIdManager();
1119 1119
 		});
1120 1120
 
@@ -1124,18 +1124,18 @@  discard block
 block discarded – undo
1124 1124
 		$this->registerAlias(\OCP\AppFramework\Utility\ITimeFactory::class, \OC\AppFramework\Utility\TimeFactory::class);
1125 1125
 		$this->registerAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class);
1126 1126
 
1127
-		$this->registerService(Defaults::class, function (Server $c) {
1127
+		$this->registerService(Defaults::class, function(Server $c) {
1128 1128
 			return new Defaults(
1129 1129
 				$c->getThemingDefaults()
1130 1130
 			);
1131 1131
 		});
1132 1132
 		$this->registerAlias('Defaults', \OCP\Defaults::class);
1133 1133
 
1134
-		$this->registerService(\OCP\ISession::class, function (SimpleContainer $c) {
1134
+		$this->registerService(\OCP\ISession::class, function(SimpleContainer $c) {
1135 1135
 			return $c->query(\OCP\IUserSession::class)->getSession();
1136 1136
 		});
1137 1137
 
1138
-		$this->registerService(IShareHelper::class, function (Server $c) {
1138
+		$this->registerService(IShareHelper::class, function(Server $c) {
1139 1139
 			return new ShareHelper(
1140 1140
 				$c->query(\OCP\Share\IManager::class)
1141 1141
 			);
@@ -1197,11 +1197,11 @@  discard block
 block discarded – undo
1197 1197
 				// no avatar to remove
1198 1198
 			} catch (\Exception $e) {
1199 1199
 				// Ignore exceptions
1200
-				$logger->info('Could not cleanup avatar of ' . $user->getUID());
1200
+				$logger->info('Could not cleanup avatar of '.$user->getUID());
1201 1201
 			}
1202 1202
 		});
1203 1203
 
1204
-		$dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) {
1204
+		$dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) {
1205 1205
 			$manager = $this->getAvatarManager();
1206 1206
 			/** @var IUser $user */
1207 1207
 			$user = $e->getSubject();
@@ -1352,7 +1352,7 @@  discard block
 block discarded – undo
1352 1352
 	 * @deprecated since 9.2.0 use IAppData
1353 1353
 	 */
1354 1354
 	public function getAppFolder() {
1355
-		$dir = '/' . \OC_App::getCurrentApp();
1355
+		$dir = '/'.\OC_App::getCurrentApp();
1356 1356
 		$root = $this->getRootFolder();
1357 1357
 		if (!$root->nodeExists($dir)) {
1358 1358
 			$folder = $root->newFolder($dir);
@@ -1927,7 +1927,7 @@  discard block
 block discarded – undo
1927 1927
 	/**
1928 1928
 	 * @return \OCP\Collaboration\AutoComplete\IManager
1929 1929
 	 */
1930
-	public function getAutoCompleteManager(){
1930
+	public function getAutoCompleteManager() {
1931 1931
 		return $this->query(IManager::class);
1932 1932
 	}
1933 1933
 
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php 1 patch
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -29,17 +29,13 @@  discard block
 block discarded – undo
29 29
 
30 30
 namespace OCA\FederatedFileSharing\Controller;
31 31
 
32
-use OC\Files\Filesystem;
33 32
 use OC\HintException;
34
-use OC\Share\Helper;
35 33
 use OCA\FederatedFileSharing\AddressHandler;
36 34
 use OCA\FederatedFileSharing\FederatedShareProvider;
37
-use OCA\Files_Sharing\External\Manager;
38 35
 use OCP\AppFramework\Controller;
39 36
 use OCP\AppFramework\Http;
40 37
 use OCP\AppFramework\Http\JSONResponse;
41 38
 use OCP\Federation\ICloudIdManager;
42
-use OCP\Files\StorageInvalidException;
43 39
 use OCP\Http\Client\IClientService;
44 40
 use OCP\IL10N;
45 41
 use OCP\ILogger;
@@ -47,7 +43,6 @@  discard block
 block discarded – undo
47 43
 use OCP\ISession;
48 44
 use OCP\IUserSession;
49 45
 use OCP\Share\IManager;
50
-use OCP\Util;
51 46
 
52 47
 /**
53 48
  * Class MountPublicLinkController
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/Storage/SMB.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,6 @@
 block discarded – undo
53 53
 use OCP\Files\Storage\INotifyStorage;
54 54
 use OCP\Files\StorageNotAvailableException;
55 55
 use OCP\ILogger;
56
-use OCP\Util;
57 56
 
58 57
 class SMB extends Common implements INotifyStorage {
59 58
 	/**
Please login to merge, or discard this patch.
lib/private/App/AppStore/Fetcher/Fetcher.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,6 @@
 block discarded – undo
36 36
 use OCP\Http\Client\IClientService;
37 37
 use OCP\IConfig;
38 38
 use OCP\ILogger;
39
-use OCP\Util;
40 39
 
41 40
 abstract class Fetcher {
42 41
 	const INVALIDATE_AFTER_SECONDS = 300;
Please login to merge, or discard this patch.
lib/private/Files/Storage/DAV.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,6 @@
 block discarded – undo
34 34
 namespace OC\Files\Storage;
35 35
 
36 36
 use Exception;
37
-use GuzzleHttp\Exception\RequestException;
38 37
 use OCP\ILogger;
39 38
 use Psr\Http\Message\ResponseInterface;
40 39
 use Icewind\Streams\CallbackWrapper;
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 				if (is_string($params['secure'])) {
104 104
 					$this->secure = ($params['secure'] === 'true');
105 105
 				} else {
106
-					$this->secure = (bool)$params['secure'];
106
+					$this->secure = (bool) $params['secure'];
107 107
 				}
108 108
 			} else {
109 109
 				$this->secure = false;
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
 				}
121 121
 			}
122 122
 			$this->root = $params['root'] ?? '/';
123
-			$this->root = '/' . ltrim($this->root, '/');
124
-			$this->root = rtrim($this->root, '/') . '/';
123
+			$this->root = '/'.ltrim($this->root, '/');
124
+			$this->root = rtrim($this->root, '/').'/';
125 125
 		} else {
126 126
 			throw new \Exception('Invalid webdav storage configuration');
127 127
 		}
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
 	/** {@inheritdoc} */
165 165
 	public function getId() {
166
-		return 'webdav::' . $this->user . '@' . $this->host . '/' . $this->root;
166
+		return 'webdav::'.$this->user.'@'.$this->host.'/'.$this->root;
167 167
 	}
168 168
 
169 169
 	/** {@inheritdoc} */
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 		if ($this->secure) {
173 173
 			$baseUri .= 's';
174 174
 		}
175
-		$baseUri .= '://' . $this->host . $this->root;
175
+		$baseUri .= '://'.$this->host.$this->root;
176 176
 		return $baseUri;
177 177
 	}
178 178
 
@@ -193,8 +193,8 @@  discard block
 block discarded – undo
193 193
 		$path = $this->cleanPath($path);
194 194
 		// FIXME: some WebDAV impl return 403 when trying to DELETE
195 195
 		// a non-empty folder
196
-		$result = $this->simpleResponse('DELETE', $path . '/', null, 204);
197
-		$this->statCache->clear($path . '/');
196
+		$result = $this->simpleResponse('DELETE', $path.'/', null, 204);
197
+		$this->statCache->clear($path.'/');
198 198
 		$this->statCache->remove($path);
199 199
 		return $result;
200 200
 	}
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 				$this->statCache->set($path, $response);
270 270
 			} catch (ClientHttpException $e) {
271 271
 				if ($e->getHttpStatus() === 404) {
272
-					$this->statCache->clear($path . '/');
272
+					$this->statCache->clear($path.'/');
273 273
 					$this->statCache->set($path, false);
274 274
 					return false;
275 275
 				}
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 		$this->init();
327 327
 		$path = $this->cleanPath($path);
328 328
 		$result = $this->simpleResponse('DELETE', $path, null, 204);
329
-		$this->statCache->clear($path . '/');
329
+		$this->statCache->clear($path.'/');
330 330
 		$this->statCache->remove($path);
331 331
 		return $result;
332 332
 	}
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 				try {
342 342
 					$response = $this->httpClientService
343 343
 						->newClient()
344
-						->get($this->createBaseUri() . $this->encodePath($path), [
344
+						->get($this->createBaseUri().$this->encodePath($path), [
345 345
 							'auth' => [$this->user, $this->password],
346 346
 							'stream' => true
347 347
 						]);
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 					if ($response->getStatusCode() === Http::STATUS_LOCKED) {
359 359
 						throw new \OCP\Lock\LockedException($path);
360 360
 					} else {
361
-						Util::writeLog("webdav client", 'Guzzle get returned status code ' . $response->getStatusCode(), ILogger::ERROR);
361
+						Util::writeLog("webdav client", 'Guzzle get returned status code '.$response->getStatusCode(), ILogger::ERROR);
362 362
 					}
363 363
 				}
364 364
 
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 					$tmpFile = $tempManager->getTemporaryFile($ext);
399 399
 				}
400 400
 				$handle = fopen($tmpFile, $mode);
401
-				return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) {
401
+				return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) {
402 402
 					$this->writeBack($tmpFile, $path);
403 403
 				});
404 404
 		}
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 				return FileInfo::SPACE_UNKNOWN;
424 424
 			}
425 425
 			if (isset($response['{DAV:}quota-available-bytes'])) {
426
-				return (int)$response['{DAV:}quota-available-bytes'];
426
+				return (int) $response['{DAV:}quota-available-bytes'];
427 427
 			} else {
428 428
 				return FileInfo::SPACE_UNKNOWN;
429 429
 			}
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 
500 500
 		$this->httpClientService
501 501
 			->newClient()
502
-			->put($this->createBaseUri() . $this->encodePath($target), [
502
+			->put($this->createBaseUri().$this->encodePath($target), [
503 503
 				'body' => $source,
504 504
 				'auth' => [$this->user, $this->password]
505 505
 			]);
@@ -516,18 +516,18 @@  discard block
 block discarded – undo
516 516
 			// overwrite directory ?
517 517
 			if ($this->is_dir($path2)) {
518 518
 				// needs trailing slash in destination
519
-				$path2 = rtrim($path2, '/') . '/';
519
+				$path2 = rtrim($path2, '/').'/';
520 520
 			}
521 521
 			$this->client->request(
522 522
 				'MOVE',
523 523
 				$this->encodePath($path1),
524 524
 				null,
525 525
 				[
526
-					'Destination' => $this->createBaseUri() . $this->encodePath($path2),
526
+					'Destination' => $this->createBaseUri().$this->encodePath($path2),
527 527
 				]
528 528
 			);
529
-			$this->statCache->clear($path1 . '/');
530
-			$this->statCache->clear($path2 . '/');
529
+			$this->statCache->clear($path1.'/');
530
+			$this->statCache->clear($path2.'/');
531 531
 			$this->statCache->set($path1, false);
532 532
 			$this->statCache->set($path2, true);
533 533
 			$this->removeCachedFile($path1);
@@ -548,17 +548,17 @@  discard block
 block discarded – undo
548 548
 			// overwrite directory ?
549 549
 			if ($this->is_dir($path2)) {
550 550
 				// needs trailing slash in destination
551
-				$path2 = rtrim($path2, '/') . '/';
551
+				$path2 = rtrim($path2, '/').'/';
552 552
 			}
553 553
 			$this->client->request(
554 554
 				'COPY',
555 555
 				$this->encodePath($path1),
556 556
 				null,
557 557
 				[
558
-					'Destination' => $this->createBaseUri() . $this->encodePath($path2),
558
+					'Destination' => $this->createBaseUri().$this->encodePath($path2),
559 559
 				]
560 560
 			);
561
-			$this->statCache->clear($path2 . '/');
561
+			$this->statCache->clear($path2.'/');
562 562
 			$this->statCache->set($path2, true);
563 563
 			$this->removeCachedFile($path2);
564 564
 			return true;
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
 			}
578 578
 			return [
579 579
 				'mtime' => strtotime($response['{DAV:}getlastmodified']),
580
-				'size' => (int)isset($response['{DAV:}getcontentlength']) ? $response['{DAV:}getcontentlength'] : 0,
580
+				'size' => (int) isset($response['{DAV:}getcontentlength']) ? $response['{DAV:}getcontentlength'] : 0,
581 581
 			];
582 582
 		} catch (\Exception $e) {
583 583
 			$this->convertException($e, $path);
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
 			return $response['statusCode'] == $expected;
660 660
 		} catch (ClientHttpException $e) {
661 661
 			if ($e->getHttpStatus() === 404 && $method === 'DELETE') {
662
-				$this->statCache->clear($path . '/');
662
+				$this->statCache->clear($path.'/');
663 663
 				$this->statCache->set($path, false);
664 664
 				return false;
665 665
 			}
@@ -680,22 +680,22 @@  discard block
 block discarded – undo
680 680
 
681 681
 	/** {@inheritdoc} */
682 682
 	public function isUpdatable($path) {
683
-		return (bool)($this->getPermissions($path) & Constants::PERMISSION_UPDATE);
683
+		return (bool) ($this->getPermissions($path) & Constants::PERMISSION_UPDATE);
684 684
 	}
685 685
 
686 686
 	/** {@inheritdoc} */
687 687
 	public function isCreatable($path) {
688
-		return (bool)($this->getPermissions($path) & Constants::PERMISSION_CREATE);
688
+		return (bool) ($this->getPermissions($path) & Constants::PERMISSION_CREATE);
689 689
 	}
690 690
 
691 691
 	/** {@inheritdoc} */
692 692
 	public function isSharable($path) {
693
-		return (bool)($this->getPermissions($path) & Constants::PERMISSION_SHARE);
693
+		return (bool) ($this->getPermissions($path) & Constants::PERMISSION_SHARE);
694 694
 	}
695 695
 
696 696
 	/** {@inheritdoc} */
697 697
 	public function isDeletable($path) {
698
-		return (bool)($this->getPermissions($path) & Constants::PERMISSION_DELETE);
698
+		return (bool) ($this->getPermissions($path) & Constants::PERMISSION_DELETE);
699 699
 	}
700 700
 
701 701
 	/** {@inheritdoc} */
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
 				if (!empty($etag) && $cachedData['etag'] !== $etag) {
785 785
 					return true;
786 786
 				} else if (isset($response['{http://open-collaboration-services.org/ns}share-permissions'])) {
787
-					$sharePermissions = (int)$response['{http://open-collaboration-services.org/ns}share-permissions'];
787
+					$sharePermissions = (int) $response['{http://open-collaboration-services.org/ns}share-permissions'];
788 788
 					return $sharePermissions !== $cachedData['permissions'];
789 789
 				} else if (isset($response['{http://owncloud.org/ns}permissions'])) {
790 790
 					$permissions = $this->parsePermissions($response['{http://owncloud.org/ns}permissions']);
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
 			if ($e->getHttpStatus() === 405) {
801 801
 				if ($path === '') {
802 802
 					// if root is gone it means the storage is not available
803
-					throw new StorageNotAvailableException(get_class($e) . ': ' . $e->getMessage());
803
+					throw new StorageNotAvailableException(get_class($e).': '.$e->getMessage());
804 804
 				}
805 805
 				return false;
806 806
 			}
@@ -834,19 +834,19 @@  discard block
 block discarded – undo
834 834
 			}
835 835
 			if ($e->getHttpStatus() === Http::STATUS_UNAUTHORIZED) {
836 836
 				// either password was changed or was invalid all along
837
-				throw new StorageInvalidException(get_class($e) . ': ' . $e->getMessage());
837
+				throw new StorageInvalidException(get_class($e).': '.$e->getMessage());
838 838
 			} else if ($e->getHttpStatus() === Http::STATUS_METHOD_NOT_ALLOWED) {
839 839
 				// ignore exception for MethodNotAllowed, false will be returned
840 840
 				return;
841 841
 			}
842
-			throw new StorageNotAvailableException(get_class($e) . ': ' . $e->getMessage());
842
+			throw new StorageNotAvailableException(get_class($e).': '.$e->getMessage());
843 843
 		} else if ($e instanceof ClientException) {
844 844
 			// connection timeout or refused, server could be temporarily down
845
-			throw new StorageNotAvailableException(get_class($e) . ': ' . $e->getMessage());
845
+			throw new StorageNotAvailableException(get_class($e).': '.$e->getMessage());
846 846
 		} else if ($e instanceof \InvalidArgumentException) {
847 847
 			// parse error because the server returned HTML instead of XML,
848 848
 			// possibly temporarily down
849
-			throw new StorageNotAvailableException(get_class($e) . ': ' . $e->getMessage());
849
+			throw new StorageNotAvailableException(get_class($e).': '.$e->getMessage());
850 850
 		} else if (($e instanceof StorageNotAvailableException) || ($e instanceof StorageInvalidException)) {
851 851
 			// rethrow
852 852
 			throw $e;
Please login to merge, or discard this patch.
lib/private/Settings/Manager.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,6 @@
 block discarded – undo
46 46
 use OCP\Settings\ISettings;
47 47
 use OCP\Settings\IManager;
48 48
 use OCP\Settings\ISection;
49
-use OCP\Util;
50 49
 
51 50
 class Manager implements IManager {
52 51
 	/** @var ILogger */
Please login to merge, or discard this patch.
core/ajax/update.php 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 // need to send an initial message to force-init the event source,
45 45
 // which will then trigger its own CSRF check and produces its own CSRF error
46 46
 // message
47
-$eventSource->send('success', (string)$l->t('Preparing update'));
47
+$eventSource->send('success', (string) $l->t('Preparing update'));
48 48
 
49 49
 class FeedBackHandler {
50 50
 	/** @var integer */
@@ -80,21 +80,21 @@  discard block
 block discarded – undo
80 80
 				if (empty($desc)) {
81 81
 					$desc = $this->currentStep;
82 82
 				}
83
-				$this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc]));
83
+				$this->eventSource->send('success', (string) $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc]));
84 84
 				break;
85 85
 			case '\OC\Repair::finishProgress':
86 86
 				$this->progressStateMax = $this->progressStateStep;
87
-				$this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep]));
87
+				$this->eventSource->send('success', (string) $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep]));
88 88
 				break;
89 89
 			case '\OC\Repair::step':
90 90
 				break;
91 91
 			case '\OC\Repair::info':
92 92
 				break;
93 93
 			case '\OC\Repair::warning':
94
-				$this->eventSource->send('notice', (string)$this->l10n->t('Repair warning: ') . $event->getArgument(0));
94
+				$this->eventSource->send('notice', (string) $this->l10n->t('Repair warning: ').$event->getArgument(0));
95 95
 				break;
96 96
 			case '\OC\Repair::error':
97
-				$this->eventSource->send('notice', (string)$this->l10n->t('Repair error: ') . $event->getArgument(0));
97
+				$this->eventSource->send('notice', (string) $this->l10n->t('Repair error: ').$event->getArgument(0));
98 98
 				break;
99 99
 		}
100 100
 	}
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
 	$config = \OC::$server->getSystemConfig();
106 106
 	if ($config->getValue('upgrade.disable-web', false)) {
107
-		$eventSource->send('failure', (string)$l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
107
+		$eventSource->send('failure', (string) $l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
108 108
 		$eventSource->close();
109 109
 		exit();
110 110
 	}
@@ -126,12 +126,12 @@  discard block
 block discarded – undo
126 126
 	$dispatcher = \OC::$server->getEventDispatcher();
127 127
 	$dispatcher->addListener('\OC\DB\Migrator::executeSql', function($event) use ($eventSource, $l) {
128 128
 		if ($event instanceof GenericEvent) {
129
-			$eventSource->send('success', (string)$l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()]));
129
+			$eventSource->send('success', (string) $l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()]));
130 130
 		}
131 131
 	});
132 132
 	$dispatcher->addListener('\OC\DB\Migrator::checkTable', function($event) use ($eventSource, $l) {
133 133
 		if ($event instanceof GenericEvent) {
134
-			$eventSource->send('success', (string)$l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()]));
134
+			$eventSource->send('success', (string) $l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()]));
135 135
 		}
136 136
 	});
137 137
 	$feedBack = new FeedBackHandler($eventSource, $l);
@@ -143,67 +143,67 @@  discard block
 block discarded – undo
143 143
 	$dispatcher->addListener('\OC\Repair::warning', [$feedBack, 'handleRepairFeedback']);
144 144
 	$dispatcher->addListener('\OC\Repair::error', [$feedBack, 'handleRepairFeedback']);
145 145
 
146
-	$updater->listen('\OC\Updater', 'maintenanceEnabled', function () use ($eventSource, $l) {
147
-		$eventSource->send('success', (string)$l->t('Turned on maintenance mode'));
146
+	$updater->listen('\OC\Updater', 'maintenanceEnabled', function() use ($eventSource, $l) {
147
+		$eventSource->send('success', (string) $l->t('Turned on maintenance mode'));
148 148
 	});
149
-	$updater->listen('\OC\Updater', 'maintenanceDisabled', function () use ($eventSource, $l) {
150
-		$eventSource->send('success', (string)$l->t('Turned off maintenance mode'));
149
+	$updater->listen('\OC\Updater', 'maintenanceDisabled', function() use ($eventSource, $l) {
150
+		$eventSource->send('success', (string) $l->t('Turned off maintenance mode'));
151 151
 	});
152
-	$updater->listen('\OC\Updater', 'maintenanceActive', function () use ($eventSource, $l) {
153
-		$eventSource->send('success', (string)$l->t('Maintenance mode is kept active'));
152
+	$updater->listen('\OC\Updater', 'maintenanceActive', function() use ($eventSource, $l) {
153
+		$eventSource->send('success', (string) $l->t('Maintenance mode is kept active'));
154 154
 	});
155
-	$updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($eventSource, $l) {
156
-		$eventSource->send('success', (string)$l->t('Updating database schema'));
155
+	$updater->listen('\OC\Updater', 'dbUpgradeBefore', function() use($eventSource, $l) {
156
+		$eventSource->send('success', (string) $l->t('Updating database schema'));
157 157
 	});
158
-	$updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource, $l) {
159
-		$eventSource->send('success', (string)$l->t('Updated database'));
158
+	$updater->listen('\OC\Updater', 'dbUpgrade', function() use ($eventSource, $l) {
159
+		$eventSource->send('success', (string) $l->t('Updated database'));
160 160
 	});
161
-	$updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($eventSource, $l) {
162
-		$eventSource->send('success', (string)$l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)'));
161
+	$updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function() use($eventSource, $l) {
162
+		$eventSource->send('success', (string) $l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)'));
163 163
 	});
164
-	$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($eventSource, $l) {
165
-		$eventSource->send('success', (string)$l->t('Checked database schema update'));
164
+	$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function() use ($eventSource, $l) {
165
+		$eventSource->send('success', (string) $l->t('Checked database schema update'));
166 166
 	});
167
-	$updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($eventSource, $l) {
168
-		$eventSource->send('success', (string)$l->t('Checking updates of apps'));
167
+	$updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function() use ($eventSource, $l) {
168
+		$eventSource->send('success', (string) $l->t('Checking updates of apps'));
169 169
 	});
170
-	$updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use ($eventSource, $l) {
171
-		$eventSource->send('success', (string)$l->t('Checking for update of app "%s" in appstore', [$app]));
170
+	$updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function($app) use ($eventSource, $l) {
171
+		$eventSource->send('success', (string) $l->t('Checking for update of app "%s" in appstore', [$app]));
172 172
 	});
173
-	$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($eventSource, $l) {
174
-		$eventSource->send('success', (string)$l->t('Update app "%s" from appstore', [$app]));
173
+	$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function($app) use ($eventSource, $l) {
174
+		$eventSource->send('success', (string) $l->t('Update app "%s" from appstore', [$app]));
175 175
 	});
176
-	$updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($eventSource, $l) {
177
-		$eventSource->send('success', (string)$l->t('Checked for update of app "%s" in appstore', [$app]));
176
+	$updater->listen('\OC\Updater', 'checkAppStoreApp', function($app) use ($eventSource, $l) {
177
+		$eventSource->send('success', (string) $l->t('Checked for update of app "%s" in appstore', [$app]));
178 178
 	});
179
-	$updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($eventSource, $l) {
180
-		$eventSource->send('success', (string)$l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app]));
179
+	$updater->listen('\OC\Updater', 'appSimulateUpdate', function($app) use ($eventSource, $l) {
180
+		$eventSource->send('success', (string) $l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app]));
181 181
 	});
182
-	$updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($eventSource, $l) {
183
-		$eventSource->send('success', (string)$l->t('Checked database schema update for apps'));
182
+	$updater->listen('\OC\Updater', 'appUpgradeCheck', function() use ($eventSource, $l) {
183
+		$eventSource->send('success', (string) $l->t('Checked database schema update for apps'));
184 184
 	});
185
-	$updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($eventSource, $l) {
186
-		$eventSource->send('success', (string)$l->t('Updated "%s" to %s', array($app, $version)));
185
+	$updater->listen('\OC\Updater', 'appUpgrade', function($app, $version) use ($eventSource, $l) {
186
+		$eventSource->send('success', (string) $l->t('Updated "%s" to %s', array($app, $version)));
187 187
 	});
188
-	$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps) {
189
-		$incompatibleApps[]= $app;
188
+	$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function($app) use (&$incompatibleApps) {
189
+		$incompatibleApps[] = $app;
190 190
 	});
191
-	$updater->listen('\OC\Updater', 'failure', function ($message) use ($eventSource, $config) {
191
+	$updater->listen('\OC\Updater', 'failure', function($message) use ($eventSource, $config) {
192 192
 		$eventSource->send('failure', $message);
193 193
 		$eventSource->close();
194 194
 		$config->setSystemValue('maintenance', false);
195 195
 	});
196
-	$updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) {
197
-		$eventSource->send('success', (string)$l->t('Set log level to debug'));
196
+	$updater->listen('\OC\Updater', 'setDebugLogLevel', function($logLevel, $logLevelName) use($eventSource, $l) {
197
+		$eventSource->send('success', (string) $l->t('Set log level to debug'));
198 198
 	});
199
-	$updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) {
200
-		$eventSource->send('success', (string)$l->t('Reset log level'));
199
+	$updater->listen('\OC\Updater', 'resetLogLevel', function($logLevel, $logLevelName) use($eventSource, $l) {
200
+		$eventSource->send('success', (string) $l->t('Reset log level'));
201 201
 	});
202
-	$updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($eventSource, $l) {
203
-		$eventSource->send('success', (string)$l->t('Starting code integrity check'));
202
+	$updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function() use($eventSource, $l) {
203
+		$eventSource->send('success', (string) $l->t('Starting code integrity check'));
204 204
 	});
205
-	$updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($eventSource, $l) {
206
-		$eventSource->send('success', (string)$l->t('Finished code integrity check'));
205
+	$updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function() use($eventSource, $l) {
206
+		$eventSource->send('success', (string) $l->t('Finished code integrity check'));
207 207
 	});
208 208
 
209 209
 	try {
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 			'level' => ILogger::ERROR,
214 214
 			'app' => 'update',
215 215
 		]);
216
-		$eventSource->send('failure', get_class($e) . ': ' . $e->getMessage());
216
+		$eventSource->send('failure', get_class($e).': '.$e->getMessage());
217 217
 		$eventSource->close();
218 218
 		exit();
219 219
 	}
@@ -225,10 +225,10 @@  discard block
 block discarded – undo
225 225
 
226 226
 	if (!empty($disabledApps)) {
227 227
 		$eventSource->send('notice',
228
-			(string)$l->t('Following apps have been disabled: %s', [implode(', ', $disabledApps)]));
228
+			(string) $l->t('Following apps have been disabled: %s', [implode(', ', $disabledApps)]));
229 229
 	}
230 230
 } else {
231
-	$eventSource->send('notice', (string)$l->t('Already up to date'));
231
+	$eventSource->send('notice', (string) $l->t('Already up to date'));
232 232
 }
233 233
 
234 234
 $eventSource->send('done', '');
Please login to merge, or discard this patch.