Completed
Pull Request — master (#9293)
by Blizzz
15:19
created
lib/private/Log.php 1 patch
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.
lib/private/Server.php 1 patch
Spacing   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 		parent::__construct();
163 163
 		$this->webRoot = $webRoot;
164 164
 
165
-		$this->registerService(\OCP\IServerContainer::class, function (IServerContainer $c) {
165
+		$this->registerService(\OCP\IServerContainer::class, function(IServerContainer $c) {
166 166
 			return $c;
167 167
 		});
168 168
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		$this->registerAlias(IActionFactory::class, ActionFactory::class);
176 176
 
177 177
 
178
-		$this->registerService(\OCP\IPreview::class, function (Server $c) {
178
+		$this->registerService(\OCP\IPreview::class, function(Server $c) {
179 179
 			return new PreviewManager(
180 180
 				$c->getConfig(),
181 181
 				$c->getRootFolder(),
@@ -186,13 +186,13 @@  discard block
 block discarded – undo
186 186
 		});
187 187
 		$this->registerAlias('PreviewManager', \OCP\IPreview::class);
188 188
 
189
-		$this->registerService(\OC\Preview\Watcher::class, function (Server $c) {
189
+		$this->registerService(\OC\Preview\Watcher::class, function(Server $c) {
190 190
 			return new \OC\Preview\Watcher(
191 191
 				$c->getAppDataDir('preview')
192 192
 			);
193 193
 		});
194 194
 
195
-		$this->registerService('EncryptionManager', function (Server $c) {
195
+		$this->registerService('EncryptionManager', function(Server $c) {
196 196
 			$view = new View();
197 197
 			$util = new Encryption\Util(
198 198
 				$view,
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 			);
211 211
 		});
212 212
 
213
-		$this->registerService('EncryptionFileHelper', function (Server $c) {
213
+		$this->registerService('EncryptionFileHelper', function(Server $c) {
214 214
 			$util = new Encryption\Util(
215 215
 				new View(),
216 216
 				$c->getUserManager(),
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 			);
225 225
 		});
226 226
 
227
-		$this->registerService('EncryptionKeyStorage', function (Server $c) {
227
+		$this->registerService('EncryptionKeyStorage', function(Server $c) {
228 228
 			$view = new View();
229 229
 			$util = new Encryption\Util(
230 230
 				$view,
@@ -235,30 +235,30 @@  discard block
 block discarded – undo
235 235
 
236 236
 			return new Encryption\Keys\Storage($view, $util);
237 237
 		});
238
-		$this->registerService('TagMapper', function (Server $c) {
238
+		$this->registerService('TagMapper', function(Server $c) {
239 239
 			return new TagMapper($c->getDatabaseConnection());
240 240
 		});
241 241
 
242
-		$this->registerService(\OCP\ITagManager::class, function (Server $c) {
242
+		$this->registerService(\OCP\ITagManager::class, function(Server $c) {
243 243
 			$tagMapper = $c->query('TagMapper');
244 244
 			return new TagManager($tagMapper, $c->getUserSession());
245 245
 		});
246 246
 		$this->registerAlias('TagManager', \OCP\ITagManager::class);
247 247
 
248
-		$this->registerService('SystemTagManagerFactory', function (Server $c) {
248
+		$this->registerService('SystemTagManagerFactory', function(Server $c) {
249 249
 			$config = $c->getConfig();
250 250
 			$factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class);
251 251
 			return new $factoryClass($this);
252 252
 		});
253
-		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) {
253
+		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) {
254 254
 			return $c->query('SystemTagManagerFactory')->getManager();
255 255
 		});
256 256
 		$this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class);
257 257
 
258
-		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) {
258
+		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) {
259 259
 			return $c->query('SystemTagManagerFactory')->getObjectMapper();
260 260
 		});
261
-		$this->registerService('RootFolder', function (Server $c) {
261
+		$this->registerService('RootFolder', function(Server $c) {
262 262
 			$manager = \OC\Files\Filesystem::getMountManager(null);
263 263
 			$view = new View();
264 264
 			$root = new Root(
@@ -279,38 +279,38 @@  discard block
 block discarded – undo
279 279
 		});
280 280
 		$this->registerAlias('SystemTagObjectMapper', \OCP\SystemTag\ISystemTagObjectMapper::class);
281 281
 
282
-		$this->registerService(\OCP\Files\IRootFolder::class, function (Server $c) {
283
-			return new LazyRoot(function () use ($c) {
282
+		$this->registerService(\OCP\Files\IRootFolder::class, function(Server $c) {
283
+			return new LazyRoot(function() use ($c) {
284 284
 				return $c->query('RootFolder');
285 285
 			});
286 286
 		});
287 287
 		$this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class);
288 288
 
289
-		$this->registerService(\OC\User\Manager::class, function (Server $c) {
289
+		$this->registerService(\OC\User\Manager::class, function(Server $c) {
290 290
 			$config = $c->getConfig();
291 291
 			return new \OC\User\Manager($config);
292 292
 		});
293 293
 		$this->registerAlias('UserManager', \OC\User\Manager::class);
294 294
 		$this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class);
295 295
 
296
-		$this->registerService(\OCP\IGroupManager::class, function (Server $c) {
296
+		$this->registerService(\OCP\IGroupManager::class, function(Server $c) {
297 297
 			$groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger());
298
-			$groupManager->listen('\OC\Group', 'preCreate', function ($gid) {
298
+			$groupManager->listen('\OC\Group', 'preCreate', function($gid) {
299 299
 				\OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid));
300 300
 			});
301
-			$groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) {
301
+			$groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) {
302 302
 				\OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID()));
303 303
 			});
304
-			$groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) {
304
+			$groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) {
305 305
 				\OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID()));
306 306
 			});
307
-			$groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) {
307
+			$groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) {
308 308
 				\OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID()));
309 309
 			});
310
-			$groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
310
+			$groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
311 311
 				\OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID()));
312 312
 			});
313
-			$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
313
+			$groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
314 314
 				\OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
315 315
 				//Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks
316 316
 				\OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 		});
320 320
 		$this->registerAlias('GroupManager', \OCP\IGroupManager::class);
321 321
 
322
-		$this->registerService(Store::class, function (Server $c) {
322
+		$this->registerService(Store::class, function(Server $c) {
323 323
 			$session = $c->getSession();
324 324
 			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
325 325
 				$tokenProvider = $c->query(IProvider::class);
@@ -330,11 +330,11 @@  discard block
 block discarded – undo
330 330
 			return new Store($session, $logger, $tokenProvider);
331 331
 		});
332 332
 		$this->registerAlias(IStore::class, Store::class);
333
-		$this->registerService(Authentication\Token\DefaultTokenMapper::class, function (Server $c) {
333
+		$this->registerService(Authentication\Token\DefaultTokenMapper::class, function(Server $c) {
334 334
 			$dbConnection = $c->getDatabaseConnection();
335 335
 			return new Authentication\Token\DefaultTokenMapper($dbConnection);
336 336
 		});
337
-		$this->registerService(Authentication\Token\DefaultTokenProvider::class, function (Server $c) {
337
+		$this->registerService(Authentication\Token\DefaultTokenProvider::class, function(Server $c) {
338 338
 			$mapper = $c->query(Authentication\Token\DefaultTokenMapper::class);
339 339
 			$crypto = $c->getCrypto();
340 340
 			$config = $c->getConfig();
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 		});
345 345
 		$this->registerAlias(IProvider::class, Authentication\Token\DefaultTokenProvider::class);
346 346
 
347
-		$this->registerService(\OCP\IUserSession::class, function (Server $c) {
347
+		$this->registerService(\OCP\IUserSession::class, function(Server $c) {
348 348
 			$manager = $c->getUserManager();
349 349
 			$session = new \OC\Session\Memory('');
350 350
 			$timeFactory = new TimeFactory();
@@ -368,45 +368,45 @@  discard block
 block discarded – undo
368 368
 				$c->getLockdownManager(),
369 369
 				$c->getLogger()
370 370
 			);
371
-			$userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) {
371
+			$userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) {
372 372
 				\OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password));
373 373
 			});
374
-			$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
374
+			$userSession->listen('\OC\User', 'postCreateUser', function($user, $password) {
375 375
 				/** @var $user \OC\User\User */
376 376
 				\OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password));
377 377
 			});
378
-			$userSession->listen('\OC\User', 'preDelete', function ($user) use ($dispatcher) {
378
+			$userSession->listen('\OC\User', 'preDelete', function($user) use ($dispatcher) {
379 379
 				/** @var $user \OC\User\User */
380 380
 				\OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID()));
381 381
 				$dispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user));
382 382
 			});
383
-			$userSession->listen('\OC\User', 'postDelete', function ($user) {
383
+			$userSession->listen('\OC\User', 'postDelete', function($user) {
384 384
 				/** @var $user \OC\User\User */
385 385
 				\OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID()));
386 386
 			});
387
-			$userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) {
387
+			$userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) {
388 388
 				/** @var $user \OC\User\User */
389 389
 				\OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
390 390
 			});
391
-			$userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) {
391
+			$userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) {
392 392
 				/** @var $user \OC\User\User */
393 393
 				\OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
394 394
 			});
395
-			$userSession->listen('\OC\User', 'preLogin', function ($uid, $password) {
395
+			$userSession->listen('\OC\User', 'preLogin', function($uid, $password) {
396 396
 				\OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password));
397 397
 			});
398
-			$userSession->listen('\OC\User', 'postLogin', function ($user, $password) {
398
+			$userSession->listen('\OC\User', 'postLogin', function($user, $password) {
399 399
 				/** @var $user \OC\User\User */
400 400
 				\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
401 401
 			});
402
-			$userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) {
402
+			$userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) {
403 403
 				/** @var $user \OC\User\User */
404 404
 				\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
405 405
 			});
406
-			$userSession->listen('\OC\User', 'logout', function () {
406
+			$userSession->listen('\OC\User', 'logout', function() {
407 407
 				\OC_Hook::emit('OC_User', 'logout', array());
408 408
 			});
409
-			$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) use ($dispatcher) {
409
+			$userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) use ($dispatcher) {
410 410
 				/** @var $user \OC\User\User */
411 411
 				\OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue));
412 412
 				$dispatcher->dispatch('OCP\IUser::changeUser', new GenericEvent($user, ['feature' => $feature, 'oldValue' => $oldValue, 'value' => $value]));
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 		});
416 416
 		$this->registerAlias('UserSession', \OCP\IUserSession::class);
417 417
 
418
-		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function (Server $c) {
418
+		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function(Server $c) {
419 419
 			return new \OC\Authentication\TwoFactorAuth\Manager(
420 420
 				$c->getAppManager(),
421 421
 				$c->getSession(),
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
 		$this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class);
432 432
 		$this->registerAlias('NavigationManager', \OCP\INavigationManager::class);
433 433
 
434
-		$this->registerService(\OC\AllConfig::class, function (Server $c) {
434
+		$this->registerService(\OC\AllConfig::class, function(Server $c) {
435 435
 			return new \OC\AllConfig(
436 436
 				$c->getSystemConfig()
437 437
 			);
@@ -439,17 +439,17 @@  discard block
 block discarded – undo
439 439
 		$this->registerAlias('AllConfig', \OC\AllConfig::class);
440 440
 		$this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class);
441 441
 
442
-		$this->registerService('SystemConfig', function ($c) use ($config) {
442
+		$this->registerService('SystemConfig', function($c) use ($config) {
443 443
 			return new \OC\SystemConfig($config);
444 444
 		});
445 445
 
446
-		$this->registerService(\OC\AppConfig::class, function (Server $c) {
446
+		$this->registerService(\OC\AppConfig::class, function(Server $c) {
447 447
 			return new \OC\AppConfig($c->getDatabaseConnection());
448 448
 		});
449 449
 		$this->registerAlias('AppConfig', \OC\AppConfig::class);
450 450
 		$this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class);
451 451
 
452
-		$this->registerService(\OCP\L10N\IFactory::class, function (Server $c) {
452
+		$this->registerService(\OCP\L10N\IFactory::class, function(Server $c) {
453 453
 			return new \OC\L10N\Factory(
454 454
 				$c->getConfig(),
455 455
 				$c->getRequest(),
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
 		});
460 460
 		$this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class);
461 461
 
462
-		$this->registerService(\OCP\IURLGenerator::class, function (Server $c) {
462
+		$this->registerService(\OCP\IURLGenerator::class, function(Server $c) {
463 463
 			$config = $c->getConfig();
464 464
 			$cacheFactory = $c->getMemCacheFactory();
465 465
 			$request = $c->getRequest();
@@ -474,12 +474,12 @@  discard block
 block discarded – undo
474 474
 		$this->registerAlias('AppFetcher', AppFetcher::class);
475 475
 		$this->registerAlias('CategoryFetcher', CategoryFetcher::class);
476 476
 
477
-		$this->registerService(\OCP\ICache::class, function ($c) {
477
+		$this->registerService(\OCP\ICache::class, function($c) {
478 478
 			return new Cache\File();
479 479
 		});
480 480
 		$this->registerAlias('UserCache', \OCP\ICache::class);
481 481
 
482
-		$this->registerService(Factory::class, function (Server $c) {
482
+		$this->registerService(Factory::class, function(Server $c) {
483 483
 
484 484
 			$arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(),
485 485
 				ArrayCache::class,
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 				$version = implode(',', $v);
497 497
 				$instanceId = \OC_Util::getInstanceId();
498 498
 				$path = \OC::$SERVERROOT;
499
-				$prefix = md5($instanceId . '-' . $version . '-' . $path);
499
+				$prefix = md5($instanceId.'-'.$version.'-'.$path);
500 500
 				return new \OC\Memcache\Factory($prefix, $c->getLogger(),
501 501
 					$config->getSystemValue('memcache.local', null),
502 502
 					$config->getSystemValue('memcache.distributed', null),
@@ -509,12 +509,12 @@  discard block
 block discarded – undo
509 509
 		$this->registerAlias('MemCacheFactory', Factory::class);
510 510
 		$this->registerAlias(ICacheFactory::class, Factory::class);
511 511
 
512
-		$this->registerService('RedisFactory', function (Server $c) {
512
+		$this->registerService('RedisFactory', function(Server $c) {
513 513
 			$systemConfig = $c->getSystemConfig();
514 514
 			return new RedisFactory($systemConfig);
515 515
 		});
516 516
 
517
-		$this->registerService(\OCP\Activity\IManager::class, function (Server $c) {
517
+		$this->registerService(\OCP\Activity\IManager::class, function(Server $c) {
518 518
 			return new \OC\Activity\Manager(
519 519
 				$c->getRequest(),
520 520
 				$c->getUserSession(),
@@ -524,14 +524,14 @@  discard block
 block discarded – undo
524 524
 		});
525 525
 		$this->registerAlias('ActivityManager', \OCP\Activity\IManager::class);
526 526
 
527
-		$this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) {
527
+		$this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) {
528 528
 			return new \OC\Activity\EventMerger(
529 529
 				$c->getL10N('lib')
530 530
 			);
531 531
 		});
532 532
 		$this->registerAlias(IValidator::class, Validator::class);
533 533
 
534
-		$this->registerService(\OCP\IAvatarManager::class, function (Server $c) {
534
+		$this->registerService(\OCP\IAvatarManager::class, function(Server $c) {
535 535
 			return new AvatarManager(
536 536
 				$c->query(\OC\User\Manager::class),
537 537
 				$c->getAppDataDir('avatar'),
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
 
545 545
 		$this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class);
546 546
 
547
-		$this->registerService(\OCP\ILogger::class, function (Server $c) {
547
+		$this->registerService(\OCP\ILogger::class, function(Server $c) {
548 548
 			$logType = $c->query('AllConfig')->getSystemValue('log_type', 'file');
549 549
 			$factory = new LogFactory($c);
550 550
 			$logger = $factory->get($logType);
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 		});
556 556
 		$this->registerAlias('Logger', \OCP\ILogger::class);
557 557
 
558
-		$this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) {
558
+		$this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) {
559 559
 			$config = $c->getConfig();
560 560
 			return new \OC\BackgroundJob\JobList(
561 561
 				$c->getDatabaseConnection(),
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
 		});
566 566
 		$this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class);
567 567
 
568
-		$this->registerService(\OCP\Route\IRouter::class, function (Server $c) {
568
+		$this->registerService(\OCP\Route\IRouter::class, function(Server $c) {
569 569
 			$cacheFactory = $c->getMemCacheFactory();
570 570
 			$logger = $c->getLogger();
571 571
 			if ($cacheFactory->isLocalCacheAvailable()) {
@@ -577,12 +577,12 @@  discard block
 block discarded – undo
577 577
 		});
578 578
 		$this->registerAlias('Router', \OCP\Route\IRouter::class);
579 579
 
580
-		$this->registerService(\OCP\ISearch::class, function ($c) {
580
+		$this->registerService(\OCP\ISearch::class, function($c) {
581 581
 			return new Search();
582 582
 		});
583 583
 		$this->registerAlias('Search', \OCP\ISearch::class);
584 584
 
585
-		$this->registerService(\OC\Security\RateLimiting\Limiter::class, function (Server $c) {
585
+		$this->registerService(\OC\Security\RateLimiting\Limiter::class, function(Server $c) {
586 586
 			return new \OC\Security\RateLimiting\Limiter(
587 587
 				$this->getUserSession(),
588 588
 				$this->getRequest(),
@@ -590,34 +590,34 @@  discard block
 block discarded – undo
590 590
 				$c->query(\OC\Security\RateLimiting\Backend\IBackend::class)
591 591
 			);
592 592
 		});
593
-		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) {
593
+		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) {
594 594
 			return new \OC\Security\RateLimiting\Backend\MemoryCache(
595 595
 				$this->getMemCacheFactory(),
596 596
 				new \OC\AppFramework\Utility\TimeFactory()
597 597
 			);
598 598
 		});
599 599
 
600
-		$this->registerService(\OCP\Security\ISecureRandom::class, function ($c) {
600
+		$this->registerService(\OCP\Security\ISecureRandom::class, function($c) {
601 601
 			return new SecureRandom();
602 602
 		});
603 603
 		$this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class);
604 604
 
605
-		$this->registerService(\OCP\Security\ICrypto::class, function (Server $c) {
605
+		$this->registerService(\OCP\Security\ICrypto::class, function(Server $c) {
606 606
 			return new Crypto($c->getConfig(), $c->getSecureRandom());
607 607
 		});
608 608
 		$this->registerAlias('Crypto', \OCP\Security\ICrypto::class);
609 609
 
610
-		$this->registerService(\OCP\Security\IHasher::class, function (Server $c) {
610
+		$this->registerService(\OCP\Security\IHasher::class, function(Server $c) {
611 611
 			return new Hasher($c->getConfig());
612 612
 		});
613 613
 		$this->registerAlias('Hasher', \OCP\Security\IHasher::class);
614 614
 
615
-		$this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) {
615
+		$this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) {
616 616
 			return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection());
617 617
 		});
618 618
 		$this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class);
619 619
 
620
-		$this->registerService(IDBConnection::class, function (Server $c) {
620
+		$this->registerService(IDBConnection::class, function(Server $c) {
621 621
 			$systemConfig = $c->getSystemConfig();
622 622
 			$factory = new \OC\DB\ConnectionFactory($systemConfig);
623 623
 			$type = $systemConfig->getValue('dbtype', 'sqlite');
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
 		$this->registerAlias('DatabaseConnection', IDBConnection::class);
633 633
 
634 634
 
635
-		$this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) {
635
+		$this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) {
636 636
 			$user = \OC_User::getUser();
637 637
 			$uid = $user ? $user : null;
638 638
 			return new ClientService(
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
 			);
648 648
 		});
649 649
 		$this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class);
650
-		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) {
650
+		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) {
651 651
 			$eventLogger = new EventLogger();
652 652
 			if ($c->getSystemConfig()->getValue('debug', false)) {
653 653
 				// In debug mode, module is being activated by default
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
 		});
658 658
 		$this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class);
659 659
 
660
-		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) {
660
+		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) {
661 661
 			$queryLogger = new QueryLogger();
662 662
 			if ($c->getSystemConfig()->getValue('debug', false)) {
663 663
 				// In debug mode, module is being activated by default
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 		});
668 668
 		$this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class);
669 669
 
670
-		$this->registerService(TempManager::class, function (Server $c) {
670
+		$this->registerService(TempManager::class, function(Server $c) {
671 671
 			return new TempManager(
672 672
 				$c->getLogger(),
673 673
 				$c->getConfig()
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
 		$this->registerAlias('TempManager', TempManager::class);
677 677
 		$this->registerAlias(ITempManager::class, TempManager::class);
678 678
 
679
-		$this->registerService(AppManager::class, function (Server $c) {
679
+		$this->registerService(AppManager::class, function(Server $c) {
680 680
 			return new \OC\App\AppManager(
681 681
 				$c->getUserSession(),
682 682
 				$c->query(\OC\AppConfig::class),
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
 		$this->registerAlias('AppManager', AppManager::class);
689 689
 		$this->registerAlias(IAppManager::class, AppManager::class);
690 690
 
691
-		$this->registerService(\OCP\IDateTimeZone::class, function (Server $c) {
691
+		$this->registerService(\OCP\IDateTimeZone::class, function(Server $c) {
692 692
 			return new DateTimeZone(
693 693
 				$c->getConfig(),
694 694
 				$c->getSession()
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
 		});
697 697
 		$this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class);
698 698
 
699
-		$this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) {
699
+		$this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) {
700 700
 			$language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null);
701 701
 
702 702
 			return new DateTimeFormatter(
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
 		});
707 707
 		$this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class);
708 708
 
709
-		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) {
709
+		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) {
710 710
 			$mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger());
711 711
 			$listener = new UserMountCacheListener($mountCache);
712 712
 			$listener->listen($c->getUserManager());
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
 		});
715 715
 		$this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class);
716 716
 
717
-		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) {
717
+		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) {
718 718
 			$loader = \OC\Files\Filesystem::getLoader();
719 719
 			$mountCache = $c->query('UserMountCache');
720 720
 			$manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache);
@@ -730,10 +730,10 @@  discard block
 block discarded – undo
730 730
 		});
731 731
 		$this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class);
732 732
 
733
-		$this->registerService('IniWrapper', function ($c) {
733
+		$this->registerService('IniWrapper', function($c) {
734 734
 			return new IniGetWrapper();
735 735
 		});
736
-		$this->registerService('AsyncCommandBus', function (Server $c) {
736
+		$this->registerService('AsyncCommandBus', function(Server $c) {
737 737
 			$busClass = $c->getConfig()->getSystemValue('commandbus');
738 738
 			if ($busClass) {
739 739
 				list($app, $class) = explode('::', $busClass, 2);
@@ -748,10 +748,10 @@  discard block
 block discarded – undo
748 748
 				return new CronBus($jobList);
749 749
 			}
750 750
 		});
751
-		$this->registerService('TrustedDomainHelper', function ($c) {
751
+		$this->registerService('TrustedDomainHelper', function($c) {
752 752
 			return new TrustedDomainHelper($this->getConfig());
753 753
 		});
754
-		$this->registerService('Throttler', function (Server $c) {
754
+		$this->registerService('Throttler', function(Server $c) {
755 755
 			return new Throttler(
756 756
 				$c->getDatabaseConnection(),
757 757
 				new TimeFactory(),
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
 				$c->getConfig()
760 760
 			);
761 761
 		});
762
-		$this->registerService('IntegrityCodeChecker', function (Server $c) {
762
+		$this->registerService('IntegrityCodeChecker', function(Server $c) {
763 763
 			// IConfig and IAppManager requires a working database. This code
764 764
 			// might however be called when ownCloud is not yet setup.
765 765
 			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
 				$c->getTempManager()
781 781
 			);
782 782
 		});
783
-		$this->registerService(\OCP\IRequest::class, function ($c) {
783
+		$this->registerService(\OCP\IRequest::class, function($c) {
784 784
 			if (isset($this['urlParams'])) {
785 785
 				$urlParams = $this['urlParams'];
786 786
 			} else {
@@ -816,7 +816,7 @@  discard block
 block discarded – undo
816 816
 		});
817 817
 		$this->registerAlias('Request', \OCP\IRequest::class);
818 818
 
819
-		$this->registerService(\OCP\Mail\IMailer::class, function (Server $c) {
819
+		$this->registerService(\OCP\Mail\IMailer::class, function(Server $c) {
820 820
 			return new Mailer(
821 821
 				$c->getConfig(),
822 822
 				$c->getLogger(),
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
 		});
828 828
 		$this->registerAlias('Mailer', \OCP\Mail\IMailer::class);
829 829
 
830
-		$this->registerService('LDAPProvider', function (Server $c) {
830
+		$this->registerService('LDAPProvider', function(Server $c) {
831 831
 			$config = $c->getConfig();
832 832
 			$factoryClass = $config->getSystemValue('ldapProviderFactory', null);
833 833
 			if (is_null($factoryClass)) {
@@ -837,7 +837,7 @@  discard block
 block discarded – undo
837 837
 			$factory = new $factoryClass($this);
838 838
 			return $factory->getLDAPProvider();
839 839
 		});
840
-		$this->registerService(ILockingProvider::class, function (Server $c) {
840
+		$this->registerService(ILockingProvider::class, function(Server $c) {
841 841
 			$ini = $c->getIniWrapper();
842 842
 			$config = $c->getConfig();
843 843
 			$ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time')));
@@ -860,49 +860,49 @@  discard block
 block discarded – undo
860 860
 		});
861 861
 		$this->registerAlias('LockingProvider', ILockingProvider::class);
862 862
 
863
-		$this->registerService(\OCP\Files\Mount\IMountManager::class, function () {
863
+		$this->registerService(\OCP\Files\Mount\IMountManager::class, function() {
864 864
 			return new \OC\Files\Mount\Manager();
865 865
 		});
866 866
 		$this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class);
867 867
 
868
-		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) {
868
+		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) {
869 869
 			return new \OC\Files\Type\Detection(
870 870
 				$c->getURLGenerator(),
871 871
 				\OC::$configDir,
872
-				\OC::$SERVERROOT . '/resources/config/'
872
+				\OC::$SERVERROOT.'/resources/config/'
873 873
 			);
874 874
 		});
875 875
 		$this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class);
876 876
 
877
-		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) {
877
+		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) {
878 878
 			return new \OC\Files\Type\Loader(
879 879
 				$c->getDatabaseConnection()
880 880
 			);
881 881
 		});
882 882
 		$this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class);
883
-		$this->registerService(BundleFetcher::class, function () {
883
+		$this->registerService(BundleFetcher::class, function() {
884 884
 			return new BundleFetcher($this->getL10N('lib'));
885 885
 		});
886
-		$this->registerService(\OCP\Notification\IManager::class, function (Server $c) {
886
+		$this->registerService(\OCP\Notification\IManager::class, function(Server $c) {
887 887
 			return new Manager(
888 888
 				$c->query(IValidator::class)
889 889
 			);
890 890
 		});
891 891
 		$this->registerAlias('NotificationManager', \OCP\Notification\IManager::class);
892 892
 
893
-		$this->registerService(\OC\CapabilitiesManager::class, function (Server $c) {
893
+		$this->registerService(\OC\CapabilitiesManager::class, function(Server $c) {
894 894
 			$manager = new \OC\CapabilitiesManager($c->getLogger());
895
-			$manager->registerCapability(function () use ($c) {
895
+			$manager->registerCapability(function() use ($c) {
896 896
 				return new \OC\OCS\CoreCapabilities($c->getConfig());
897 897
 			});
898
-			$manager->registerCapability(function () use ($c) {
898
+			$manager->registerCapability(function() use ($c) {
899 899
 				return $c->query(\OC\Security\Bruteforce\Capabilities::class);
900 900
 			});
901 901
 			return $manager;
902 902
 		});
903 903
 		$this->registerAlias('CapabilitiesManager', \OC\CapabilitiesManager::class);
904 904
 
905
-		$this->registerService(\OCP\Comments\ICommentsManager::class, function (Server $c) {
905
+		$this->registerService(\OCP\Comments\ICommentsManager::class, function(Server $c) {
906 906
 			$config = $c->getConfig();
907 907
 			$factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class);
908 908
 			/** @var \OCP\Comments\ICommentsManagerFactory $factory */
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
 			$manager->registerDisplayNameResolver('user', function($id) use ($c) {
913 913
 				$manager = $c->getUserManager();
914 914
 				$user = $manager->get($id);
915
-				if(is_null($user)) {
915
+				if (is_null($user)) {
916 916
 					$l = $c->getL10N('core');
917 917
 					$displayName = $l->t('Unknown user');
918 918
 				} else {
@@ -925,7 +925,7 @@  discard block
 block discarded – undo
925 925
 		});
926 926
 		$this->registerAlias('CommentsManager', \OCP\Comments\ICommentsManager::class);
927 927
 
928
-		$this->registerService('ThemingDefaults', function (Server $c) {
928
+		$this->registerService('ThemingDefaults', function(Server $c) {
929 929
 			/*
930 930
 			 * Dark magic for autoloader.
931 931
 			 * If we do a class_exists it will try to load the class which will
@@ -952,7 +952,7 @@  discard block
 block discarded – undo
952 952
 			}
953 953
 			return new \OC_Defaults();
954 954
 		});
955
-		$this->registerService(SCSSCacher::class, function (Server $c) {
955
+		$this->registerService(SCSSCacher::class, function(Server $c) {
956 956
 			/** @var Factory $cacheFactory */
957 957
 			$cacheFactory = $c->query(Factory::class);
958 958
 			return new SCSSCacher(
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
 				$this->getMemCacheFactory()
966 966
 			);
967 967
 		});
968
-		$this->registerService(JSCombiner::class, function (Server $c) {
968
+		$this->registerService(JSCombiner::class, function(Server $c) {
969 969
 			/** @var Factory $cacheFactory */
970 970
 			$cacheFactory = $c->query(Factory::class);
971 971
 			return new JSCombiner(
@@ -976,13 +976,13 @@  discard block
 block discarded – undo
976 976
 				$c->getLogger()
977 977
 			);
978 978
 		});
979
-		$this->registerService(EventDispatcher::class, function () {
979
+		$this->registerService(EventDispatcher::class, function() {
980 980
 			return new EventDispatcher();
981 981
 		});
982 982
 		$this->registerAlias('EventDispatcher', EventDispatcher::class);
983 983
 		$this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class);
984 984
 
985
-		$this->registerService('CryptoWrapper', function (Server $c) {
985
+		$this->registerService('CryptoWrapper', function(Server $c) {
986 986
 			// FIXME: Instantiiated here due to cyclic dependency
987 987
 			$request = new Request(
988 988
 				[
@@ -1007,7 +1007,7 @@  discard block
 block discarded – undo
1007 1007
 				$request
1008 1008
 			);
1009 1009
 		});
1010
-		$this->registerService('CsrfTokenManager', function (Server $c) {
1010
+		$this->registerService('CsrfTokenManager', function(Server $c) {
1011 1011
 			$tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom());
1012 1012
 
1013 1013
 			return new CsrfTokenManager(
@@ -1015,22 +1015,22 @@  discard block
 block discarded – undo
1015 1015
 				$c->query(SessionStorage::class)
1016 1016
 			);
1017 1017
 		});
1018
-		$this->registerService(SessionStorage::class, function (Server $c) {
1018
+		$this->registerService(SessionStorage::class, function(Server $c) {
1019 1019
 			return new SessionStorage($c->getSession());
1020 1020
 		});
1021
-		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) {
1021
+		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) {
1022 1022
 			return new ContentSecurityPolicyManager();
1023 1023
 		});
1024 1024
 		$this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class);
1025 1025
 
1026
-		$this->registerService('ContentSecurityPolicyNonceManager', function (Server $c) {
1026
+		$this->registerService('ContentSecurityPolicyNonceManager', function(Server $c) {
1027 1027
 			return new ContentSecurityPolicyNonceManager(
1028 1028
 				$c->getCsrfTokenManager(),
1029 1029
 				$c->getRequest()
1030 1030
 			);
1031 1031
 		});
1032 1032
 
1033
-		$this->registerService(\OCP\Share\IManager::class, function (Server $c) {
1033
+		$this->registerService(\OCP\Share\IManager::class, function(Server $c) {
1034 1034
 			$config = $c->getConfig();
1035 1035
 			$factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class);
1036 1036
 			/** @var \OCP\Share\IProviderFactory $factory */
@@ -1073,7 +1073,7 @@  discard block
 block discarded – undo
1073 1073
 
1074 1074
 		$this->registerAlias(\OCP\Collaboration\AutoComplete\IManager::class, \OC\Collaboration\AutoComplete\Manager::class);
1075 1075
 
1076
-		$this->registerService('SettingsManager', function (Server $c) {
1076
+		$this->registerService('SettingsManager', function(Server $c) {
1077 1077
 			$manager = new \OC\Settings\Manager(
1078 1078
 				$c->getLogger(),
1079 1079
 				$c->getDatabaseConnection(),
@@ -1091,24 +1091,24 @@  discard block
 block discarded – undo
1091 1091
 			);
1092 1092
 			return $manager;
1093 1093
 		});
1094
-		$this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) {
1094
+		$this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) {
1095 1095
 			return new \OC\Files\AppData\Factory(
1096 1096
 				$c->getRootFolder(),
1097 1097
 				$c->getSystemConfig()
1098 1098
 			);
1099 1099
 		});
1100 1100
 
1101
-		$this->registerService('LockdownManager', function (Server $c) {
1102
-			return new LockdownManager(function () use ($c) {
1101
+		$this->registerService('LockdownManager', function(Server $c) {
1102
+			return new LockdownManager(function() use ($c) {
1103 1103
 				return $c->getSession();
1104 1104
 			});
1105 1105
 		});
1106 1106
 
1107
-		$this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) {
1107
+		$this->registerService(\OCP\OCS\IDiscoveryService::class, function(Server $c) {
1108 1108
 			return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService());
1109 1109
 		});
1110 1110
 
1111
-		$this->registerService(ICloudIdManager::class, function (Server $c) {
1111
+		$this->registerService(ICloudIdManager::class, function(Server $c) {
1112 1112
 			return new CloudIdManager();
1113 1113
 		});
1114 1114
 
@@ -1118,18 +1118,18 @@  discard block
 block discarded – undo
1118 1118
 		$this->registerAlias(\OCP\AppFramework\Utility\ITimeFactory::class, \OC\AppFramework\Utility\TimeFactory::class);
1119 1119
 		$this->registerAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class);
1120 1120
 
1121
-		$this->registerService(Defaults::class, function (Server $c) {
1121
+		$this->registerService(Defaults::class, function(Server $c) {
1122 1122
 			return new Defaults(
1123 1123
 				$c->getThemingDefaults()
1124 1124
 			);
1125 1125
 		});
1126 1126
 		$this->registerAlias('Defaults', \OCP\Defaults::class);
1127 1127
 
1128
-		$this->registerService(\OCP\ISession::class, function (SimpleContainer $c) {
1128
+		$this->registerService(\OCP\ISession::class, function(SimpleContainer $c) {
1129 1129
 			return $c->query(\OCP\IUserSession::class)->getSession();
1130 1130
 		});
1131 1131
 
1132
-		$this->registerService(IShareHelper::class, function (Server $c) {
1132
+		$this->registerService(IShareHelper::class, function(Server $c) {
1133 1133
 			return new ShareHelper(
1134 1134
 				$c->query(\OCP\Share\IManager::class)
1135 1135
 			);
@@ -1191,11 +1191,11 @@  discard block
 block discarded – undo
1191 1191
 				// no avatar to remove
1192 1192
 			} catch (\Exception $e) {
1193 1193
 				// Ignore exceptions
1194
-				$logger->info('Could not cleanup avatar of ' . $user->getUID());
1194
+				$logger->info('Could not cleanup avatar of '.$user->getUID());
1195 1195
 			}
1196 1196
 		});
1197 1197
 
1198
-		$dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) {
1198
+		$dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) {
1199 1199
 			$manager = $this->getAvatarManager();
1200 1200
 			/** @var IUser $user */
1201 1201
 			$user = $e->getSubject();
@@ -1346,7 +1346,7 @@  discard block
 block discarded – undo
1346 1346
 	 * @deprecated since 9.2.0 use IAppData
1347 1347
 	 */
1348 1348
 	public function getAppFolder() {
1349
-		$dir = '/' . \OC_App::getCurrentApp();
1349
+		$dir = '/'.\OC_App::getCurrentApp();
1350 1350
 		$root = $this->getRootFolder();
1351 1351
 		if (!$root->nodeExists($dir)) {
1352 1352
 			$folder = $root->newFolder($dir);
@@ -1913,7 +1913,7 @@  discard block
 block discarded – undo
1913 1913
 	/**
1914 1914
 	 * @return \OCP\Collaboration\AutoComplete\IManager
1915 1915
 	 */
1916
-	public function getAutoCompleteManager(){
1916
+	public function getAutoCompleteManager() {
1917 1917
 		return $this->query(IManager::class);
1918 1918
 	}
1919 1919
 
Please login to merge, or discard this patch.
lib/private/Log/IFileBased.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,5 +26,5 @@
 block discarded – undo
26 26
 interface IFileBased {
27 27
 	public function getLogFilePath();
28 28
 
29
-	public function getEntries($limit=50, $offset=0);
29
+	public function getEntries($limit = 50, $offset = 0);
30 30
 }
Please login to merge, or discard this patch.
lib/private/Log/File.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	public function __construct(string $path, string $fallbackPath = '') {
51 51
 		$this->logFile = $path;
52 52
 		if (!file_exists($this->logFile)) {
53
-			if(
53
+			if (
54 54
 				(
55 55
 					!is_writable(dirname($this->logFile))
56 56
 					|| !touch($this->logFile)
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		$time = $time->format($format);
94 94
 		$url = ($request->getRequestUri() !== '') ? $request->getRequestUri() : '--';
95 95
 		$method = is_string($request->getMethod()) ? $request->getMethod() : '--';
96
-		if($config->getValue('installed', false)) {
96
+		if ($config->getValue('installed', false)) {
97 97
 			$user = \OC_User::getUser() ? \OC_User::getUser() : '--';
98 98
 		} else {
99 99
 			$user = '--';
@@ -119,10 +119,10 @@  discard block
 block discarded – undo
119 119
 		// PHP's json_encode only accept proper UTF-8 strings, loop over all
120 120
 		// elements to ensure that they are properly UTF-8 compliant or convert
121 121
 		// them manually.
122
-		foreach($entry as $key => $value) {
123
-			if(is_string($value)) {
122
+		foreach ($entry as $key => $value) {
123
+			if (is_string($value)) {
124 124
 				$testEncode = json_encode($value);
125
-				if($testEncode === false) {
125
+				if ($testEncode === false) {
126 126
 					$entry[$key] = utf8_encode($value);
127 127
 				}
128 128
 			}
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	 * @param int $offset
151 151
 	 * @return array
152 152
 	 */
153
-	public function getEntries($limit=50, $offset=0) {
153
+	public function getEntries($limit = 50, $offset = 0) {
154 154
 		$minLevel = \OC::$server->getSystemConfig()->getValue("loglevel", \OCP\Util::WARN);
155 155
 		$entries = array();
156 156
 		$handle = @fopen($this->logFile, 'rb');
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 			$entriesCount = 0;
162 162
 			$lines = 0;
163 163
 			// Loop through each character of the file looking for new lines
164
-			while ($pos >= 0 && ($limit === null ||$entriesCount < $limit)) {
164
+			while ($pos >= 0 && ($limit === null || $entriesCount < $limit)) {
165 165
 				fseek($handle, $pos);
166 166
 				$ch = fgetc($handle);
167 167
 				if ($ch == "\n" || $pos == 0) {
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.