Passed
Push — master ( c9639f...ec07ca )
by Morris
24:32 queued 11:33
created
lib/private/App/DependencyAnalyzer.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -157,19 +157,19 @@  discard block
 block discarded – undo
157 157
 		if (isset($dependencies['php']['@attributes']['min-version'])) {
158 158
 			$minVersion = $dependencies['php']['@attributes']['min-version'];
159 159
 			if ($this->compareSmaller($this->platform->getPhpVersion(), $minVersion)) {
160
-				$missing[] = (string)$this->l->t('PHP %s or higher is required.', [$minVersion]);
160
+				$missing[] = (string) $this->l->t('PHP %s or higher is required.', [$minVersion]);
161 161
 			}
162 162
 		}
163 163
 		if (isset($dependencies['php']['@attributes']['max-version'])) {
164 164
 			$maxVersion = $dependencies['php']['@attributes']['max-version'];
165 165
 			if ($this->compareBigger($this->platform->getPhpVersion(), $maxVersion)) {
166
-				$missing[] = (string)$this->l->t('PHP with a version lower than %s is required.', [$maxVersion]);
166
+				$missing[] = (string) $this->l->t('PHP with a version lower than %s is required.', [$maxVersion]);
167 167
 			}
168 168
 		}
169 169
 		if (isset($dependencies['php']['@attributes']['min-int-size'])) {
170 170
 			$intSize = $dependencies['php']['@attributes']['min-int-size'];
171
-			if ($intSize > $this->platform->getIntSize()*8) {
172
-				$missing[] = (string)$this->l->t('%sbit or higher PHP required.', [$intSize]);
171
+			if ($intSize > $this->platform->getIntSize() * 8) {
172
+				$missing[] = (string) $this->l->t('%sbit or higher PHP required.', [$intSize]);
173 173
 			}
174 174
 		}
175 175
 		return $missing;
@@ -188,12 +188,12 @@  discard block
 block discarded – undo
188 188
 		if (!is_array($supportedArchitectures)) {
189 189
 			$supportedArchitectures = [$supportedArchitectures];
190 190
 		}
191
-		$supportedArchitectures = array_map(function ($architecture) {
191
+		$supportedArchitectures = array_map(function($architecture) {
192 192
 			return $this->getValue($architecture);
193 193
 		}, $supportedArchitectures);
194 194
 		$currentArchitecture = $this->platform->getArchitecture();
195 195
 		if (!in_array($currentArchitecture, $supportedArchitectures, true)) {
196
-			$missing[] = (string)$this->l->t('The following architectures are supported: %s', [implode(', ', $supportedArchitectures)]);
196
+			$missing[] = (string) $this->l->t('The following architectures are supported: %s', [implode(', ', $supportedArchitectures)]);
197 197
 		}
198 198
 		return $missing;
199 199
 	}
@@ -215,12 +215,12 @@  discard block
 block discarded – undo
215 215
 		if (!is_array($supportedDatabases)) {
216 216
 			$supportedDatabases = [$supportedDatabases];
217 217
 		}
218
-		$supportedDatabases = array_map(function ($db) {
218
+		$supportedDatabases = array_map(function($db) {
219 219
 			return $this->getValue($db);
220 220
 		}, $supportedDatabases);
221 221
 		$currentDatabase = $this->platform->getDatabase();
222 222
 		if (!in_array($currentDatabase, $supportedDatabases)) {
223
-			$missing[] = (string)$this->l->t('The following databases are supported: %s', [implode(', ', $supportedDatabases)]);
223
+			$missing[] = (string) $this->l->t('The following databases are supported: %s', [implode(', ', $supportedDatabases)]);
224 224
 		}
225 225
 		return $missing;
226 226
 	}
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 			}
250 250
 			$commandName = $this->getValue($command);
251 251
 			if (!$this->platform->isCommandKnown($commandName)) {
252
-				$missing[] = (string)$this->l->t('The command line tool %s could not be found', [$commandName]);
252
+				$missing[] = (string) $this->l->t('The command line tool %s could not be found', [$commandName]);
253 253
 			}
254 254
 		}
255 255
 		return $missing;
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 			return $missing;
316 316
 		}
317 317
 		if (is_array($oss)) {
318
-			$oss = array_map(function ($os) {
318
+			$oss = array_map(function($os) {
319 319
 				return $this->getValue($os);
320 320
 			}, $oss);
321 321
 		} else {
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 		}
324 324
 		$currentOS = $this->platform->getOS();
325 325
 		if (!in_array($currentOS, $oss)) {
326
-			$missing[] = (string)$this->l->t('The following platforms are supported: %s', [implode(', ', $oss)]);
326
+			$missing[] = (string) $this->l->t('The following platforms are supported: %s', [implode(', ', $oss)]);
327 327
 		}
328 328
 		return $missing;
329 329
 	}
@@ -349,12 +349,12 @@  discard block
 block discarded – undo
349 349
 
350 350
 		if (!is_null($minVersion)) {
351 351
 			if ($this->compareSmaller($this->platform->getOcVersion(), $minVersion)) {
352
-				$missing[] = (string)$this->l->t('Server version %s or higher is required.', [$this->toVisibleVersion($minVersion)]);
352
+				$missing[] = (string) $this->l->t('Server version %s or higher is required.', [$this->toVisibleVersion($minVersion)]);
353 353
 			}
354 354
 		}
355 355
 		if (!$ignoreMax && !is_null($maxVersion)) {
356 356
 			if ($this->compareBigger($this->platform->getOcVersion(), $maxVersion)) {
357
-				$missing[] = (string)$this->l->t('Server version %s or lower is required.', [$this->toVisibleVersion($maxVersion)]);
357
+				$missing[] = (string) $this->l->t('Server version %s or lower is required.', [$this->toVisibleVersion($maxVersion)]);
358 358
 			}
359 359
 		}
360 360
 		return $missing;
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 				return '10';
387 387
 			default:
388 388
 				if (strpos($version, '9.1.') === 0) {
389
-					$version = '10.0.' . substr($version, 4);
389
+					$version = '10.0.'.substr($version, 4);
390 390
 				}
391 391
 				return $version;
392 392
 		}
@@ -400,6 +400,6 @@  discard block
 block discarded – undo
400 400
 		if (isset($element['@value'])) {
401 401
 			return $element['@value'];
402 402
 		}
403
-		return (string)$element;
403
+		return (string) $element;
404 404
 	}
405 405
 }
Please login to merge, or discard this patch.
lib/private/App/AppStore/Bundles/HubBundle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 		$architecture = php_uname('m');
44 44
 		if (PHP_OS_FAMILY === 'Linux' && in_array($architecture, ['x86_64', 'aarch64'])) {
45 45
 			$hubApps[] = 'richdocuments';
46
-			$hubApps[] = 'richdocumentscode' . ($architecture === 'aarch64' ? '_arm64' : '');
46
+			$hubApps[] = 'richdocumentscode'.($architecture === 'aarch64' ? '_arm64' : '');
47 47
 		}
48 48
 
49 49
 		return $hubApps;
Please login to merge, or discard this patch.
lib/private/Setup.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 	public function getSystemInfo($allowAllDatabases = false) {
216 216
 		$databases = $this->getSupportedDatabases($allowAllDatabases);
217 217
 
218
-		$dataDir = $this->config->getValue('datadirectory', \OC::$SERVERROOT . '/data');
218
+		$dataDir = $this->config->getValue('datadirectory', \OC::$SERVERROOT.'/data');
219 219
 
220 220
 		$errors = [];
221 221
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 		if (\OC_Util::runningOnMac()) {
246 246
 			$errors[] = [
247 247
 				'error' => $this->l10n->t(
248
-					'Mac OS X is not supported and %s will not work properly on this platform. ' .
248
+					'Mac OS X is not supported and %s will not work properly on this platform. '.
249 249
 					'Use it at your own risk! ',
250 250
 					[$this->defaults->getName()]
251 251
 				),
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 		if ($this->iniWrapper->getString('open_basedir') !== '' && PHP_INT_SIZE === 4) {
257 257
 			$errors[] = [
258 258
 				'error' => $this->l10n->t(
259
-					'It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. ' .
259
+					'It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. '.
260 260
 					'This will lead to problems with files over 4 GB and is highly discouraged.',
261 261
 					[$this->defaults->getName()]
262 262
 				),
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 			$error[] = $l->t('Set an admin password.');
294 294
 		}
295 295
 		if (empty($options['directory'])) {
296
-			$options['directory'] = \OC::$SERVERROOT . "/data";
296
+			$options['directory'] = \OC::$SERVERROOT."/data";
297 297
 		}
298 298
 
299 299
 		if (!isset(self::$dbSetupClasses[$dbType])) {
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 		];
350 350
 
351 351
 		if ($this->config->getValue('overwrite.cli.url', null) === null) {
352
-			$newConfigValues['overwrite.cli.url'] = $request->getServerProtocol() . '://' . $request->getInsecureServerHost() . \OC::$WEBROOT;
352
+			$newConfigValues['overwrite.cli.url'] = $request->getServerProtocol().'://'.$request->getInsecureServerHost().\OC::$WEBROOT;
353 353
 		}
354 354
 
355 355
 		$this->config->setValues($newConfigValues);
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 			return $error;
366 366
 		} catch (Exception $e) {
367 367
 			$error[] = [
368
-				'error' => 'Error while trying to create admin user: ' . $e->getMessage(),
368
+				'error' => 'Error while trying to create admin user: '.$e->getMessage(),
369 369
 				'hint' => '',
370 370
 			];
371 371
 			return $error;
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 			$dbSetup->runMigrations();
376 376
 		} catch (Exception $e) {
377 377
 			$error[] = [
378
-				'error' => 'Error while trying to initialise the database: ' . $e->getMessage(),
378
+				'error' => 'Error while trying to initialise the database: '.$e->getMessage(),
379 379
 				'hint' => '',
380 380
 			];
381 381
 			return $error;
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
 
417 417
 			// create empty file in data dir, so we can later find
418 418
 			// out that this is indeed an ownCloud data directory
419
-			file_put_contents($config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/.ocdata', '');
419
+			file_put_contents($config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/.ocdata', '');
420 420
 
421 421
 			// Update .htaccess files
422 422
 			self::updateHtaccess();
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
 	 * @return string Absolute path to htaccess
460 460
 	 */
461 461
 	private function pathToHtaccess() {
462
-		return \OC::$SERVERROOT . '/.htaccess';
462
+		return \OC::$SERVERROOT.'/.htaccess';
463 463
 	}
464 464
 
465 465
 	/**
@@ -517,10 +517,10 @@  discard block
 block discarded – undo
517 517
 		$htaccessContent = explode($content, $htaccessContent, 2)[0];
518 518
 
519 519
 		//custom 403 error page
520
-		$content .= "\nErrorDocument 403 " . $webRoot . '/';
520
+		$content .= "\nErrorDocument 403 ".$webRoot.'/';
521 521
 
522 522
 		//custom 404 error page
523
-		$content .= "\nErrorDocument 404 " . $webRoot . '/';
523
+		$content .= "\nErrorDocument 404 ".$webRoot.'/';
524 524
 
525 525
 		// Add rewrite rules if the RewriteBase is configured
526 526
 		$rewriteBase = $config->getValue('htaccess.RewriteBase', '');
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 			$content .= "\n  RewriteCond %{REQUEST_URI} !^/\\.well-known/(acme-challenge|pki-validation)/.*";
547 547
 			$content .= "\n  RewriteCond %{REQUEST_FILENAME} !/richdocumentscode(_arm64)?/proxy.php$";
548 548
 			$content .= "\n  RewriteRule . index.php [PT,E=PATH_INFO:$1]";
549
-			$content .= "\n  RewriteBase " . $rewriteBase;
549
+			$content .= "\n  RewriteBase ".$rewriteBase;
550 550
 			$content .= "\n  <IfModule mod_env.c>";
551 551
 			$content .= "\n    SetEnv front_controller_active true";
552 552
 			$content .= "\n    <IfModule mod_dir.c>";
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 
559 559
 		if ($content !== '') {
560 560
 			//suppress errors in case we don't have permissions for it
561
-			return (bool)@file_put_contents($setupHelper->pathToHtaccess(), $htaccessContent . $content . "\n");
561
+			return (bool) @file_put_contents($setupHelper->pathToHtaccess(), $htaccessContent.$content."\n");
562 562
 		}
563 563
 
564 564
 		return false;
@@ -592,9 +592,9 @@  discard block
 block discarded – undo
592 592
 		$content .= "  IndexIgnore *\n";
593 593
 		$content .= "</IfModule>";
594 594
 
595
-		$baseDir = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
596
-		file_put_contents($baseDir . '/.htaccess', $content);
597
-		file_put_contents($baseDir . '/index.html', '');
595
+		$baseDir = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data');
596
+		file_put_contents($baseDir.'/.htaccess', $content);
597
+		file_put_contents($baseDir.'/index.html', '');
598 598
 	}
599 599
 
600 600
 	/**
@@ -606,8 +606,8 @@  discard block
 block discarded – undo
606 606
 	 */
607 607
 	private function getVendor() {
608 608
 		// this should really be a JSON file
609
-		require \OC::$SERVERROOT . '/version.php';
609
+		require \OC::$SERVERROOT.'/version.php';
610 610
 		/** @var string $vendor */
611
-		return (string)$vendor;
611
+		return (string) $vendor;
612 612
 	}
613 613
 }
Please login to merge, or discard this patch.