Passed
Push — master ( 5e4469...fe5813 )
by Morris
12:17
created
settings/Controller/CheckSetupController.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 			'www.nextcloud.com', 'www.startpage.com', 'www.eff.org', 'www.edri.org'
137 137
 		]);
138 138
 
139
-		foreach($siteArray as $site) {
139
+		foreach ($siteArray as $site) {
140 140
 			if ($this->isSiteReachable($site)) {
141 141
 				return true;
142 142
 			}
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
 	* @return bool
150 150
 	*/
151 151
 	private function isSiteReachable($sitename) {
152
-		$httpSiteName = 'http://' . $sitename . '/';
153
-		$httpsSiteName = 'https://' . $sitename . '/';
152
+		$httpSiteName = 'http://'.$sitename.'/';
153
+		$httpsSiteName = 'https://'.$sitename.'/';
154 154
 
155 155
 		try {
156 156
 			$client = $this->clientService->newClient();
@@ -207,40 +207,40 @@  discard block
 block discarded – undo
207 207
 		// Don't run check when:
208 208
 		// 1. Server has `has_internet_connection` set to false
209 209
 		// 2. AppStore AND S2S is disabled
210
-		if(!$this->config->getSystemValue('has_internet_connection', true)) {
210
+		if (!$this->config->getSystemValue('has_internet_connection', true)) {
211 211
 			return '';
212 212
 		}
213
-		if(!$this->config->getSystemValue('appstoreenabled', true)
213
+		if (!$this->config->getSystemValue('appstoreenabled', true)
214 214
 			&& $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'no'
215 215
 			&& $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'no') {
216 216
 			return '';
217 217
 		}
218 218
 
219 219
 		$versionString = $this->getCurlVersion();
220
-		if(isset($versionString['ssl_version'])) {
220
+		if (isset($versionString['ssl_version'])) {
221 221
 			$versionString = $versionString['ssl_version'];
222 222
 		} else {
223 223
 			return '';
224 224
 		}
225 225
 
226
-		$features = (string)$this->l10n->t('installing and updating apps via the app store or Federated Cloud Sharing');
227
-		if(!$this->config->getSystemValue('appstoreenabled', true)) {
228
-			$features = (string)$this->l10n->t('Federated Cloud Sharing');
226
+		$features = (string) $this->l10n->t('installing and updating apps via the app store or Federated Cloud Sharing');
227
+		if (!$this->config->getSystemValue('appstoreenabled', true)) {
228
+			$features = (string) $this->l10n->t('Federated Cloud Sharing');
229 229
 		}
230 230
 
231 231
 		// Check if at least OpenSSL after 1.01d or 1.0.2b
232
-		if(strpos($versionString, 'OpenSSL/') === 0) {
232
+		if (strpos($versionString, 'OpenSSL/') === 0) {
233 233
 			$majorVersion = substr($versionString, 8, 5);
234 234
 			$patchRelease = substr($versionString, 13, 6);
235 235
 
236
-			if(($majorVersion === '1.0.1' && ord($patchRelease) < ord('d')) ||
236
+			if (($majorVersion === '1.0.1' && ord($patchRelease) < ord('d')) ||
237 237
 				($majorVersion === '1.0.2' && ord($patchRelease) < ord('b'))) {
238 238
 				return $this->l10n->t('cURL is using an outdated %1$s version (%2$s). Please update your operating system or features such as %3$s will not work reliably.', ['OpenSSL', $versionString, $features]);
239 239
 			}
240 240
 		}
241 241
 
242 242
 		// Check if NSS and perform heuristic check
243
-		if(strpos($versionString, 'NSS/') === 0) {
243
+		if (strpos($versionString, 'NSS/') === 0) {
244 244
 			try {
245 245
 				$firstClient = $this->clientService->newClient();
246 246
 				$firstClient->get('https://nextcloud.com/');
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 				$secondClient = $this->clientService->newClient();
249 249
 				$secondClient->get('https://nextcloud.com/');
250 250
 			} catch (ClientException $e) {
251
-				if($e->getResponse()->getStatusCode() === 400) {
251
+				if ($e->getResponse()->getStatusCode() === 400) {
252 252
 					return $this->l10n->t('cURL is using an outdated %1$s version (%2$s). Please update your operating system or features such as %3$s will not work reliably.', ['NSS', $versionString, $features]);
253 253
 				}
254 254
 			}
@@ -342,13 +342,13 @@  discard block
 block discarded – undo
342 342
 	 * @return DataResponse
343 343
 	 */
344 344
 	public function getFailedIntegrityCheckFiles() {
345
-		if(!$this->checker->isCodeCheckEnforced()) {
345
+		if (!$this->checker->isCodeCheckEnforced()) {
346 346
 			return new DataDisplayResponse('Integrity checker has been disabled. Integrity cannot be verified.');
347 347
 		}
348 348
 
349 349
 		$completeResults = $this->checker->getResults();
350 350
 
351
-		if(!empty($completeResults)) {
351
+		if (!empty($completeResults)) {
352 352
 			$formattedTextResponse = 'Technical information
353 353
 =====================
354 354
 The following list covers which files have failed the integrity check. Please read
@@ -358,12 +358,12 @@  discard block
 block discarded – undo
358 358
 Results
359 359
 =======
360 360
 ';
361
-			foreach($completeResults as $context => $contextResult) {
361
+			foreach ($completeResults as $context => $contextResult) {
362 362
 				$formattedTextResponse .= "- $context\n";
363 363
 
364
-				foreach($contextResult as $category => $result) {
364
+				foreach ($contextResult as $category => $result) {
365 365
 					$formattedTextResponse .= "\t- $category\n";
366
-					if($category !== 'EXCEPTION') {
366
+					if ($category !== 'EXCEPTION') {
367 367
 						foreach ($result as $key => $results) {
368 368
 							$formattedTextResponse .= "\t\t- $key\n";
369 369
 						}
@@ -404,27 +404,27 @@  discard block
 block discarded – undo
404 404
 	protected function isOpcacheProperlySetup() {
405 405
 		$iniWrapper = new IniGetWrapper();
406 406
 
407
-		if(!$iniWrapper->getBool('opcache.enable')) {
407
+		if (!$iniWrapper->getBool('opcache.enable')) {
408 408
 			return false;
409 409
 		}
410 410
 
411
-		if(!$iniWrapper->getBool('opcache.save_comments')) {
411
+		if (!$iniWrapper->getBool('opcache.save_comments')) {
412 412
 			return false;
413 413
 		}
414 414
 
415
-		if(!$iniWrapper->getBool('opcache.enable_cli')) {
415
+		if (!$iniWrapper->getBool('opcache.enable_cli')) {
416 416
 			return false;
417 417
 		}
418 418
 
419
-		if($iniWrapper->getNumeric('opcache.max_accelerated_files') < 10000) {
419
+		if ($iniWrapper->getNumeric('opcache.max_accelerated_files') < 10000) {
420 420
 			return false;
421 421
 		}
422 422
 
423
-		if($iniWrapper->getNumeric('opcache.memory_consumption') < 128) {
423
+		if ($iniWrapper->getNumeric('opcache.memory_consumption') < 128) {
424 424
 			return false;
425 425
 		}
426 426
 
427
-		if($iniWrapper->getNumeric('opcache.interned_strings_buffer') < 8) {
427
+		if ($iniWrapper->getNumeric('opcache.interned_strings_buffer') < 8) {
428 428
 			return false;
429 429
 		}
430 430
 
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 	protected function getSuggestedOverwriteCliURL(): string {
501 501
 		$suggestedOverwriteCliUrl = '';
502 502
 		if ($this->config->getSystemValue('overwrite.cli.url', '') === '') {
503
-			$suggestedOverwriteCliUrl = $this->request->getServerProtocol() . '://' . $this->request->getInsecureServerHost() . \OC::$WEBROOT;
503
+			$suggestedOverwriteCliUrl = $this->request->getServerProtocol().'://'.$this->request->getInsecureServerHost().\OC::$WEBROOT;
504 504
 			if (!$this->config->getSystemValue('config_is_read_only', false)) {
505 505
 				// Set the overwrite URL when it was not set yet.
506 506
 				$this->config->setSystemValue('overwrite.cli.url', $suggestedOverwriteCliUrl);
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
 		return [
516 516
 			'diffInSeconds' => time() - $lastCronRun,
517 517
 			'relativeTime' => $this->dateTimeFormatter->formatTimeSpan($lastCronRun),
518
-			'backgroundJobsUrl' => $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'server']) . '#backgroundjobs',
518
+			'backgroundJobsUrl' => $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'server']).'#backgroundjobs',
519 519
 		];
520 520
 	}
521 521
 
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 
574 574
 		foreach ($appsDir as $fileInfo) {
575 575
 			if ($fileInfo->isDir() && !$fileInfo->isDot()) {
576
-				$absAppPath = $appsPath . DIRECTORY_SEPARATOR . $fileInfo->getFilename();
576
+				$absAppPath = $appsPath.DIRECTORY_SEPARATOR.$fileInfo->getFilename();
577 577
 				$appDirUser = fileowner($absAppPath);
578 578
 				if ($appDirUser !== $currentUser) {
579 579
 					$appDirsWithDifferentOwner[] = $absAppPath;
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
 				$isAutoIncrement = $column->getAutoincrement();
631 631
 				$isAutoIncrementOnSqlite = $isSqlite && $isAutoIncrement;
632 632
 				if ($column->getType()->getName() !== Type::BIGINT && !$isAutoIncrementOnSqlite) {
633
-					$pendingColumns[] = $tableName . '.' . $columnName;
633
+					$pendingColumns[] = $tableName.'.'.$columnName;
634 634
 				}
635 635
 			}
636 636
 		}
Please login to merge, or discard this patch.
core/Command/Db/ConvertFilecacheBigInt.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 					$column->setType(Type::getType(Type::BIGINT));
85 85
 					$column->setOptions(['length' => 20]);
86 86
 
87
-					$updates[] = '* ' . $tableName . '.' . $columnName;
87
+					$updates[] = '* '.$tableName.'.'.$columnName;
88 88
 				}
89 89
 			}
90 90
 		}
Please login to merge, or discard this patch.