Passed
Push — master ( f1cc6c...fa7364 )
by Julius
15:37 queued 12s
created
lib/private/AppFramework/DependencyInjection/DIContainer.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -121,68 +121,68 @@  discard block
 block discarded – undo
121 121
 		/**
122 122
 		 * Core services
123 123
 		 */
124
-		$this->registerService(IOutput::class, function () {
124
+		$this->registerService(IOutput::class, function() {
125 125
 			return new Output($this->getServer()->getWebRoot());
126 126
 		});
127 127
 
128
-		$this->registerService(Folder::class, function () {
128
+		$this->registerService(Folder::class, function() {
129 129
 			return $this->getServer()->getUserFolder();
130 130
 		});
131 131
 
132
-		$this->registerService(IAppData::class, function (ContainerInterface $c) {
132
+		$this->registerService(IAppData::class, function(ContainerInterface $c) {
133 133
 			return $this->getServer()->getAppDataDir($c->get('AppName'));
134 134
 		});
135 135
 
136
-		$this->registerService(IL10N::class, function (ContainerInterface $c) {
136
+		$this->registerService(IL10N::class, function(ContainerInterface $c) {
137 137
 			return $this->getServer()->getL10N($c->get('AppName'));
138 138
 		});
139 139
 
140 140
 		// Log wrappers
141
-		$this->registerService(LoggerInterface::class, function (ContainerInterface $c) {
141
+		$this->registerService(LoggerInterface::class, function(ContainerInterface $c) {
142 142
 			return new ScopedPsrLogger(
143 143
 				$c->get(PsrLoggerAdapter::class),
144 144
 				$c->get('AppName')
145 145
 			);
146 146
 		});
147
-		$this->registerService(ILogger::class, function (ContainerInterface $c) {
147
+		$this->registerService(ILogger::class, function(ContainerInterface $c) {
148 148
 			return new OC\AppFramework\Logger($this->server->query(ILogger::class), $c->get('AppName'));
149 149
 		});
150 150
 
151
-		$this->registerService(IServerContainer::class, function () {
151
+		$this->registerService(IServerContainer::class, function() {
152 152
 			return $this->getServer();
153 153
 		});
154 154
 		$this->registerAlias('ServerContainer', IServerContainer::class);
155 155
 
156
-		$this->registerService(\OCP\WorkflowEngine\IManager::class, function (ContainerInterface $c) {
156
+		$this->registerService(\OCP\WorkflowEngine\IManager::class, function(ContainerInterface $c) {
157 157
 			return $c->get(Manager::class);
158 158
 		});
159 159
 
160
-		$this->registerService(ContainerInterface::class, function (ContainerInterface $c) {
160
+		$this->registerService(ContainerInterface::class, function(ContainerInterface $c) {
161 161
 			return $c;
162 162
 		});
163 163
 		$this->registerAlias(IAppContainer::class, ContainerInterface::class);
164 164
 
165 165
 		// commonly used attributes
166
-		$this->registerService('userId', function (ContainerInterface $c) {
166
+		$this->registerService('userId', function(ContainerInterface $c) {
167 167
 			return $c->get(IUserSession::class)->getSession()->get('user_id');
168 168
 		});
169 169
 
170
-		$this->registerService('webRoot', function (ContainerInterface $c) {
170
+		$this->registerService('webRoot', function(ContainerInterface $c) {
171 171
 			return $c->get(IServerContainer::class)->getWebRoot();
172 172
 		});
173 173
 
174
-		$this->registerService('OC_Defaults', function (ContainerInterface $c) {
174
+		$this->registerService('OC_Defaults', function(ContainerInterface $c) {
175 175
 			return $c->get(IServerContainer::class)->getThemingDefaults();
176 176
 		});
177 177
 
178
-		$this->registerService('Protocol', function (ContainerInterface $c) {
178
+		$this->registerService('Protocol', function(ContainerInterface $c) {
179 179
 			/** @var \OC\Server $server */
180 180
 			$server = $c->get(IServerContainer::class);
181 181
 			$protocol = $server->getRequest()->getHttpProtocol();
182 182
 			return new Http($_SERVER, $protocol);
183 183
 		});
184 184
 
185
-		$this->registerService('Dispatcher', function (ContainerInterface $c) {
185
+		$this->registerService('Dispatcher', function(ContainerInterface $c) {
186 186
 			return new Dispatcher(
187 187
 				$c->get('Protocol'),
188 188
 				$c->get(MiddlewareDispatcher::class),
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 		 * Middleware
207 207
 		 */
208 208
 		$this->registerAlias('MiddlewareDispatcher', MiddlewareDispatcher::class);
209
-		$this->registerService(MiddlewareDispatcher::class, function (ContainerInterface $c) {
209
+		$this->registerService(MiddlewareDispatcher::class, function(ContainerInterface $c) {
210 210
 			$server = $this->getServer();
211 211
 
212 212
 			$dispatcher = new MiddlewareDispatcher();
@@ -327,13 +327,13 @@  discard block
 block discarded – undo
327 327
 			return $dispatcher;
328 328
 		});
329 329
 
330
-		$this->registerService(IAppConfig::class, function (ContainerInterface $c) {
330
+		$this->registerService(IAppConfig::class, function(ContainerInterface $c) {
331 331
 			return new OC\AppFramework\Services\AppConfig(
332 332
 				$c->get(IConfig::class),
333 333
 				$c->get('AppName')
334 334
 			);
335 335
 		});
336
-		$this->registerService(IInitialState::class, function (ContainerInterface $c) {
336
+		$this->registerService(IInitialState::class, function(ContainerInterface $c) {
337 337
 			return new OC\AppFramework\Services\InitialState(
338 338
 				$c->get(IInitialStateService::class),
339 339
 				$c->get('AppName')
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 	 * @param string $serviceName e.g. 'OCA\Files\Capabilities'
422 422
 	 */
423 423
 	public function registerCapability($serviceName) {
424
-		$this->query('OC\CapabilitiesManager')->registerCapability(function () use ($serviceName) {
424
+		$this->query('OC\CapabilitiesManager')->registerCapability(function() use ($serviceName) {
425 425
 			return $this->query($serviceName);
426 426
 		});
427 427
 	}
@@ -476,11 +476,11 @@  discard block
 block discarded – undo
476 476
 			return parent::query($name);
477 477
 		} elseif ($this->appName === 'core' && str_starts_with($name, 'OC\\Core\\')) {
478 478
 			return parent::query($name);
479
-		} elseif (str_starts_with($name, \OC\AppFramework\App::buildAppNamespace($this->appName) . '\\')) {
479
+		} elseif (str_starts_with($name, \OC\AppFramework\App::buildAppNamespace($this->appName).'\\')) {
480 480
 			return parent::query($name);
481 481
 		}
482 482
 
483
-		throw new QueryException('Could not resolve ' . $name . '!' .
483
+		throw new QueryException('Could not resolve '.$name.'!'.
484 484
 			' Class can not be instantiated', 1);
485 485
 	}
486 486
 }
Please login to merge, or discard this patch.
lib/private/TemplateLayout.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 			$this->navigationManager = \OC::$server->get(INavigationManager::class);
100 100
 
101 101
 			parent::__construct('core', 'layout.user');
102
-			if (in_array(\OC_App::getCurrentApp(), ['settings','admin', 'help']) !== false) {
102
+			if (in_array(\OC_App::getCurrentApp(), ['settings', 'admin', 'help']) !== false) {
103 103
 				$this->assign('bodyid', 'body-settings');
104 104
 			} else {
105 105
 				$this->assign('bodyid', 'body-user');
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
 
108 108
 			$this->initialState->provideInitialState('core', 'active-app', $this->navigationManager->getActiveEntry());
109 109
 			$this->initialState->provideInitialState('core', 'apps', $this->navigationManager->getAll());
110
-			$this->initialState->provideInitialState('unified-search', 'limit-default', (int)$this->config->getAppValue('core', 'unified-search.limit-default', (string)SearchQuery::LIMIT_DEFAULT));
111
-			$this->initialState->provideInitialState('unified-search', 'min-search-length', (int)$this->config->getAppValue('core', 'unified-search.min-search-length', (string)1));
110
+			$this->initialState->provideInitialState('unified-search', 'limit-default', (int) $this->config->getAppValue('core', 'unified-search.limit-default', (string) SearchQuery::LIMIT_DEFAULT));
111
+			$this->initialState->provideInitialState('unified-search', 'min-search-length', (int) $this->config->getAppValue('core', 'unified-search.min-search-length', (string) 1));
112 112
 			$this->initialState->provideInitialState('unified-search', 'live-search', $this->config->getAppValue('core', 'unified-search.live-search', 'yes') === 'yes');
113 113
 			Util::addScript('core', 'unified-search', 'core');
114 114
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 		foreach ($jsFiles as $info) {
243 243
 			$web = $info[1];
244 244
 			$file = $info[2];
245
-			$this->append('jsfiles', $web.'/'.$file . $this->getVersionHashSuffix());
245
+			$this->append('jsfiles', $web.'/'.$file.$this->getVersionHashSuffix());
246 246
 		}
247 247
 
248 248
 		try {
@@ -275,14 +275,14 @@  discard block
 block discarded – undo
275 275
 			$file = $info[2];
276 276
 
277 277
 			if (substr($file, -strlen('print.css')) === 'print.css') {
278
-				$this->append('printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix());
278
+				$this->append('printcssfiles', $web.'/'.$file.$this->getVersionHashSuffix());
279 279
 			} else {
280 280
 				$suffix = $this->getVersionHashSuffix($web, $file);
281 281
 
282 282
 				if (strpos($file, '?v=') == false) {
283
-					$this->append('cssfiles', $web.'/'.$file . $suffix);
283
+					$this->append('cssfiles', $web.'/'.$file.$suffix);
284 284
 				} else {
285
-					$this->append('cssfiles', $web.'/'.$file . '-' . substr($suffix, 3));
285
+					$this->append('cssfiles', $web.'/'.$file.'-'.substr($suffix, 3));
286 286
 				}
287 287
 			}
288 288
 		}
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 
309 309
 		if ($this->config->getSystemValue('installed', false)) {
310 310
 			if (\OC::$server->getAppManager()->isInstalled('theming')) {
311
-				$themingSuffix = '-' . $this->config->getAppValue('theming', 'cachebuster', '0');
311
+				$themingSuffix = '-'.$this->config->getAppValue('theming', 'cachebuster', '0');
312 312
 			}
313 313
 			$v = \OC_App::getAppVersions();
314 314
 		}
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 			$appName = $this->getAppNamefromPath($path);
319 319
 			if (array_key_exists($appName, $v)) {
320 320
 				$appVersion = $v[$appName];
321
-				return '?v=' . substr(md5($appVersion), 0, 8) . $themingSuffix;
321
+				return '?v='.substr(md5($appVersion), 0, 8).$themingSuffix;
322 322
 			}
323 323
 		}
324 324
 		// fallback to the file path instead
@@ -326,11 +326,11 @@  discard block
 block discarded – undo
326 326
 			$appName = $this->getAppNamefromPath($file);
327 327
 			if (array_key_exists($appName, $v)) {
328 328
 				$appVersion = $v[$appName];
329
-				return '?v=' . substr(md5($appVersion), 0, 8) . $themingSuffix;
329
+				return '?v='.substr(md5($appVersion), 0, 8).$themingSuffix;
330 330
 			}
331 331
 		}
332 332
 
333
-		return '?v=' . self::$versionHash . $themingSuffix;
333
+		return '?v='.self::$versionHash.$themingSuffix;
334 334
 	}
335 335
 
336 336
 	/**
Please login to merge, or discard this patch.
lib/base.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -143,13 +143,13 @@  discard block
 block discarded – undo
143 143
 	 */
144 144
 	public static function initPaths() {
145 145
 		if (defined('PHPUNIT_CONFIG_DIR')) {
146
-			self::$configDir = OC::$SERVERROOT . '/' . PHPUNIT_CONFIG_DIR . '/';
147
-		} elseif (defined('PHPUNIT_RUN') and PHPUNIT_RUN and is_dir(OC::$SERVERROOT . '/tests/config/')) {
148
-			self::$configDir = OC::$SERVERROOT . '/tests/config/';
146
+			self::$configDir = OC::$SERVERROOT.'/'.PHPUNIT_CONFIG_DIR.'/';
147
+		} elseif (defined('PHPUNIT_RUN') and PHPUNIT_RUN and is_dir(OC::$SERVERROOT.'/tests/config/')) {
148
+			self::$configDir = OC::$SERVERROOT.'/tests/config/';
149 149
 		} elseif ($dir = getenv('NEXTCLOUD_CONFIG_DIR')) {
150
-			self::$configDir = rtrim($dir, '/') . '/';
150
+			self::$configDir = rtrim($dir, '/').'/';
151 151
 		} else {
152
-			self::$configDir = OC::$SERVERROOT . '/config/';
152
+			self::$configDir = OC::$SERVERROOT.'/config/';
153 153
 		}
154 154
 		self::$config = new \OC\Config(self::$configDir);
155 155
 
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
 			//make sure suburi follows the same rules as scriptName
176 176
 			if (substr(OC::$SUBURI, -9) != 'index.php') {
177 177
 				if (substr(OC::$SUBURI, -1) != '/') {
178
-					OC::$SUBURI = OC::$SUBURI . '/';
178
+					OC::$SUBURI = OC::$SUBURI.'/';
179 179
 				}
180
-				OC::$SUBURI = OC::$SUBURI . 'index.php';
180
+				OC::$SUBURI = OC::$SUBURI.'index.php';
181 181
 			}
182 182
 		}
183 183
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 				OC::$WEBROOT = substr($scriptName, 0, 0 - strlen(OC::$SUBURI));
190 190
 
191 191
 				if (OC::$WEBROOT != '' && OC::$WEBROOT[0] !== '/') {
192
-					OC::$WEBROOT = '/' . OC::$WEBROOT;
192
+					OC::$WEBROOT = '/'.OC::$WEBROOT;
193 193
 				}
194 194
 			} else {
195 195
 				// The scriptName is not ending with OC::$SUBURI
@@ -218,8 +218,8 @@  discard block
 block discarded – undo
218 218
 					OC::$APPSROOTS[] = $paths;
219 219
 				}
220 220
 			}
221
-		} elseif (file_exists(OC::$SERVERROOT . '/apps')) {
222
-			OC::$APPSROOTS[] = ['path' => OC::$SERVERROOT . '/apps', 'url' => '/apps', 'writable' => true];
221
+		} elseif (file_exists(OC::$SERVERROOT.'/apps')) {
222
+			OC::$APPSROOTS[] = ['path' => OC::$SERVERROOT.'/apps', 'url' => '/apps', 'writable' => true];
223 223
 		}
224 224
 
225 225
 		if (empty(OC::$APPSROOTS)) {
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 		$l = \OC::$server->getL10N('lib');
246 246
 
247 247
 		// Create config if it does not already exist
248
-		$configFilePath = self::$configDir .'/config.php';
248
+		$configFilePath = self::$configDir.'/config.php';
249 249
 		if (!file_exists($configFilePath)) {
250 250
 			@touch($configFilePath);
251 251
 		}
@@ -261,14 +261,14 @@  discard block
 block discarded – undo
261 261
 				echo $l->t('This can usually be fixed by giving the web server write access to the config directory.')."\n";
262 262
 				echo "\n";
263 263
 				echo $l->t('But, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.')."\n";
264
-				echo $l->t('See %s', [ $urlGenerator->linkToDocs('admin-config') ])."\n";
264
+				echo $l->t('See %s', [$urlGenerator->linkToDocs('admin-config')])."\n";
265 265
 				exit;
266 266
 			} else {
267 267
 				OC_Template::printErrorPage(
268 268
 					$l->t('Cannot write into "config" directory!'),
269
-					$l->t('This can usually be fixed by giving the web server write access to the config directory.') . ' '
270
-					. $l->t('But, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.') . ' '
271
-					. $l->t('See %s', [ $urlGenerator->linkToDocs('admin-config') ]),
269
+					$l->t('This can usually be fixed by giving the web server write access to the config directory.').' '
270
+					. $l->t('But, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.').' '
271
+					. $l->t('See %s', [$urlGenerator->linkToDocs('admin-config')]),
272 272
 					503
273 273
 				);
274 274
 			}
@@ -284,8 +284,8 @@  discard block
 block discarded – undo
284 284
 			if (OC::$CLI) {
285 285
 				throw new Exception('Not installed');
286 286
 			} else {
287
-				$url = OC::$WEBROOT . '/index.php';
288
-				header('Location: ' . $url);
287
+				$url = OC::$WEBROOT.'/index.php';
288
+				header('Location: '.$url);
289 289
 			}
290 290
 			exit();
291 291
 		}
@@ -393,14 +393,14 @@  discard block
 block discarded – undo
393 393
 		$incompatibleShippedApps = [];
394 394
 		foreach ($incompatibleApps as $appInfo) {
395 395
 			if ($appManager->isShipped($appInfo['id'])) {
396
-				$incompatibleShippedApps[] = $appInfo['name'] . ' (' . $appInfo['id'] . ')';
396
+				$incompatibleShippedApps[] = $appInfo['name'].' ('.$appInfo['id'].')';
397 397
 			}
398 398
 		}
399 399
 
400 400
 		if (!empty($incompatibleShippedApps)) {
401 401
 			$l = \OC::$server->getL10N('core');
402 402
 			$hint = $l->t('The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server.', [implode(', ', $incompatibleShippedApps)]);
403
-			throw new \OCP\HintException('The files of the app ' . implode(', ', $incompatibleShippedApps) . ' were not replaced correctly. Make sure it is a version compatible with the server.', $hint);
403
+			throw new \OCP\HintException('The files of the app '.implode(', ', $incompatibleShippedApps).' were not replaced correctly. Make sure it is a version compatible with the server.', $hint);
404 404
 		}
405 405
 
406 406
 		$tmpl->assign('appsToUpgrade', $appManager->getAppsNeedingUpgrade($ocVersion));
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
 		ini_set('session.cookie_httponly', 'true');
425 425
 
426 426
 		// set the cookie path to the Nextcloud directory
427
-		$cookie_path = OC::$WEBROOT ? : '/';
427
+		$cookie_path = OC::$WEBROOT ?: '/';
428 428
 		ini_set('session.cookie_path', $cookie_path);
429 429
 
430 430
 		// Let the session name be changed in the initSession Hook
@@ -448,12 +448,12 @@  discard block
 block discarded – undo
448 448
 
449 449
 		//try to set the session lifetime
450 450
 		$sessionLifeTime = self::getSessionLifeTime();
451
-		@ini_set('gc_maxlifetime', (string)$sessionLifeTime);
451
+		@ini_set('gc_maxlifetime', (string) $sessionLifeTime);
452 452
 
453 453
 		// session timeout
454 454
 		if ($session->exists('LAST_ACTIVITY') && (time() - $session->get('LAST_ACTIVITY') > $sessionLifeTime)) {
455 455
 			if (isset($_COOKIE[session_name()])) {
456
-				setcookie(session_name(), '', -1, self::$WEBROOT ? : '/');
456
+				setcookie(session_name(), '', -1, self::$WEBROOT ?: '/');
457 457
 			}
458 458
 			\OC::$server->getUserSession()->logout();
459 459
 		}
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
 		foreach ($policies as $policy) {
507 507
 			header(
508 508
 				sprintf(
509
-					'Set-Cookie: %snc_sameSiteCookie%s=true; path=%s; httponly;' . $secureCookie . 'expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=%s',
509
+					'Set-Cookie: %snc_sameSiteCookie%s=true; path=%s; httponly;'.$secureCookie.'expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=%s',
510 510
 					$cookiePrefix,
511 511
 					$policy,
512 512
 					$cookieParams['path'],
@@ -580,12 +580,12 @@  discard block
 block discarded – undo
580 580
 
581 581
 		// register autoloader
582 582
 		$loaderStart = microtime(true);
583
-		require_once __DIR__ . '/autoloader.php';
583
+		require_once __DIR__.'/autoloader.php';
584 584
 		self::$loader = new \OC\Autoloader([
585
-			OC::$SERVERROOT . '/lib/private/legacy',
585
+			OC::$SERVERROOT.'/lib/private/legacy',
586 586
 		]);
587 587
 		if (defined('PHPUNIT_RUN')) {
588
-			self::$loader->addValidRoot(OC::$SERVERROOT . '/tests');
588
+			self::$loader->addValidRoot(OC::$SERVERROOT.'/tests');
589 589
 		}
590 590
 		spl_autoload_register([self::$loader, 'load']);
591 591
 		$loaderEnd = microtime(true);
@@ -593,13 +593,13 @@  discard block
 block discarded – undo
593 593
 		self::$CLI = (php_sapi_name() == 'cli');
594 594
 
595 595
 		// Add default composer PSR-4 autoloader
596
-		self::$composerAutoloader = require_once OC::$SERVERROOT . '/lib/composer/autoload.php';
596
+		self::$composerAutoloader = require_once OC::$SERVERROOT.'/lib/composer/autoload.php';
597 597
 		self::$composerAutoloader->setApcuPrefix('composer_autoload');
598 598
 
599 599
 		try {
600 600
 			self::initPaths();
601 601
 			// setup 3rdparty autoloader
602
-			$vendorAutoLoad = OC::$SERVERROOT. '/3rdparty/autoload.php';
602
+			$vendorAutoLoad = OC::$SERVERROOT.'/3rdparty/autoload.php';
603 603
 			if (!file_exists($vendorAutoLoad)) {
604 604
 				throw new \RuntimeException('Composer autoloader not found, unable to continue. Check the folder "3rdparty". Running "git submodule update --init" will initialize the git submodule that handles the subfolder "3rdparty".');
605 605
 			}
@@ -714,11 +714,11 @@  discard block
 block discarded – undo
714 714
 				// Convert l10n string into regular string for usage in database
715 715
 				$staticErrors = [];
716 716
 				foreach ($errors as $error) {
717
-					echo $error['error'] . "\n";
718
-					echo $error['hint'] . "\n\n";
717
+					echo $error['error']."\n";
718
+					echo $error['hint']."\n\n";
719 719
 					$staticErrors[] = [
720
-						'error' => (string)$error['error'],
721
-						'hint' => (string)$error['hint'],
720
+						'error' => (string) $error['error'],
721
+						'hint' => (string) $error['hint'],
722 722
 					];
723 723
 				}
724 724
 
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
 		$eventLogger->log('init', 'OC::init', $loaderStart, microtime(true));
836 836
 		$eventLogger->start('runtime', 'Runtime');
837 837
 		$eventLogger->start('request', 'Full request after boot');
838
-		register_shutdown_function(function () use ($eventLogger) {
838
+		register_shutdown_function(function() use ($eventLogger) {
839 839
 			$eventLogger->end('request');
840 840
 		});
841 841
 	}
@@ -849,7 +849,7 @@  discard block
 block discarded – undo
849 849
 
850 850
 			// NOTE: This will be replaced to use OCP
851 851
 			$userSession = self::$server->getUserSession();
852
-			$userSession->listen('\OC\User', 'postLogin', function () use ($userSession) {
852
+			$userSession->listen('\OC\User', 'postLogin', function() use ($userSession) {
853 853
 				if (!defined('PHPUNIT_RUN') && $userSession->isLoggedIn()) {
854 854
 					// reset brute force delay for this IP address and username
855 855
 					$uid = \OC::$server->getUserSession()->getUser()->getUID();
@@ -901,7 +901,7 @@  discard block
 block discarded – undo
901 901
 	private static function registerAppRestrictionsHooks() {
902 902
 		/** @var \OC\Group\Manager $groupManager */
903 903
 		$groupManager = self::$server->query(\OCP\IGroupManager::class);
904
-		$groupManager->listen('\OC\Group', 'postDelete', function (\OCP\IGroup $group) {
904
+		$groupManager->listen('\OC\Group', 'postDelete', function(\OCP\IGroup $group) {
905 905
 			$appManager = self::$server->getAppManager();
906 906
 			$apps = $appManager->getEnabledAppsForGroup($group);
907 907
 			foreach ($apps as $appId) {
@@ -1006,11 +1006,11 @@  discard block
 block discarded – undo
1006 1006
 		// emergency app disabling
1007 1007
 		if ($requestPath === '/disableapp'
1008 1008
 			&& $request->getMethod() === 'POST'
1009
-			&& ((array)$request->getParam('appid')) !== ''
1009
+			&& ((array) $request->getParam('appid')) !== ''
1010 1010
 		) {
1011 1011
 			\OC_JSON::callCheck();
1012 1012
 			\OC_JSON::checkAdminUser();
1013
-			$appIds = (array)$request->getParam('appid');
1013
+			$appIds = (array) $request->getParam('appid');
1014 1014
 			foreach ($appIds as $appId) {
1015 1015
 				$appId = \OC_App::cleanAppId($appId);
1016 1016
 				\OC::$server->getAppManager()->disableApp($appId);
@@ -1086,10 +1086,10 @@  discard block
 block discarded – undo
1086 1086
 		if ($requestPath === '') {
1087 1087
 			// Someone is logged in
1088 1088
 			if (\OC::$server->getUserSession()->isLoggedIn()) {
1089
-				header('Location: ' . \OC::$server->getURLGenerator()->linkToDefaultPageUrl());
1089
+				header('Location: '.\OC::$server->getURLGenerator()->linkToDefaultPageUrl());
1090 1090
 			} else {
1091 1091
 				// Not handled and not logged in
1092
-				header('Location: ' . \OC::$server->getURLGenerator()->linkToRouteAbsolute('core.login.showLoginForm'));
1092
+				header('Location: '.\OC::$server->getURLGenerator()->linkToRouteAbsolute('core.login.showLoginForm'));
1093 1093
 			}
1094 1094
 			return;
1095 1095
 		}
Please login to merge, or discard this patch.