Completed
Pull Request — master (#758)
by Maxence
38s
created
lib/Service/ConfigService.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 			return $value;
220 220
 		}
221 221
 
222
-		if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') {
222
+		if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') {
223 223
 			return $value;
224 224
 		}
225 225
 
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
 	 */
439 439
 	public function getTrustedDomains(): array {
440 440
 		return array_map(
441
-			function (string $address) {
441
+			function(string $address) {
442 442
 				return strtolower($address);
443 443
 			}, $this->config->getSystemValue('trusted_domains', [])
444 444
 		);
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
 		}
475 475
 
476 476
 		if (array_key_exists('port', $loopback)) {
477
-			$loopbackCloudId = $loopback['host'] . ':' . $loopback['port'];
477
+			$loopbackCloudId = $loopback['host'].':'.$loopback['port'];
478 478
 		} else {
479 479
 			$loopbackCloudId = $loopback['host'];
480 480
 		}
@@ -513,13 +513,13 @@  discard block
 block discarded – undo
513 513
 			$path = $this->getAppValue(self::LOOPBACK_CLOUD_PATH);
514 514
 		}
515 515
 
516
-		$base = $scheme . '://' . $instance . $path;
516
+		$base = $scheme.'://'.$instance.$path;
517 517
 
518 518
 		if ($route === '') {
519 519
 			return $base;
520 520
 		}
521 521
 
522
-		return $base . $this->urlGenerator->linkToRoute($route, $args);
522
+		return $base.$this->urlGenerator->linkToRoute($route, $args);
523 523
 	}
524 524
 
525 525
 
@@ -620,10 +620,10 @@  discard block
 block discarded – undo
620 620
 		$name = ($displayName) ? $federatedUser->getDisplayName() : $federatedUser->getUserId();
621 621
 
622 622
 		if ($federatedUser->getUserType() === Member::TYPE_MAIL) {
623
-			return $name . ' (' . $this->displayInstance($federatedUser->getInstance(), false) . ')';
623
+			return $name.' ('.$this->displayInstance($federatedUser->getInstance(), false).')';
624 624
 		}
625 625
 
626
-		return $name . $this->displayInstance($federatedUser->getInstance(), true);
626
+		return $name.$this->displayInstance($federatedUser->getInstance(), true);
627 627
 	}
628 628
 
629 629
 	/**
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 			return '';
638 638
 		}
639 639
 
640
-		return (($showAt) ? '@' : '') . $instance;
640
+		return (($showAt) ? '@' : '').$instance;
641 641
 	}
642 642
 
643 643
 
Please login to merge, or discard this patch.
lib/Command/CirclesCheck.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 			throw new Exception('Please specify a --type for the test');
174 174
 		}
175 175
 		if ($test !== '' && !in_array($type, self::$checks)) {
176
-			throw new Exception('Unknown type: ' . implode(', ', self::$checks));
176
+			throw new Exception('Unknown type: '.implode(', ', self::$checks));
177 177
 		}
178 178
 
179 179
 //		$this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test);
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 		}
231 231
 
232 232
 		$output->writeln('');
233
-		$output->writeln('* testing current address: ' . $test);
233
+		$output->writeln('* testing current address: '.$test);
234 234
 
235 235
 		try {
236 236
 			$this->setupLoopback($input, $output, $test);
@@ -266,8 +266,8 @@  discard block
 block discarded – undo
266 266
 				continue;
267 267
 			}
268 268
 
269
-			$loopback = rtrim($scheme . '://' . $cloudId . $path, '/');
270
-			$output->writeln('* testing address: ' . $loopback . ' ');
269
+			$loopback = rtrim($scheme.'://'.$cloudId.$path, '/');
270
+			$output->writeln('* testing address: '.$loopback.' ');
271 271
 
272 272
 			try {
273 273
 				$this->setupLoopback($input, $output, $loopback);
@@ -340,9 +340,9 @@  discard block
 block discarded – undo
340 340
 		$test = new FederatedEvent(LoopbackTest::class);
341 341
 		$this->federatedEventService->newEvent($test);
342 342
 
343
-		$output->writeln('<info>' . $test->getWrapperToken() . '</info>');
343
+		$output->writeln('<info>'.$test->getWrapperToken().'</info>');
344 344
 
345
-		$output->writeln('- Waiting for async process to finish (' . $this->delay . 's)');
345
+		$output->writeln('- Waiting for async process to finish ('.$this->delay.'s)');
346 346
 		sleep($this->delay);
347 347
 
348 348
 		$output->write('- Checking status on FederatedEvent ');
@@ -355,18 +355,18 @@  discard block
 block discarded – undo
355 355
 
356 356
 		$checkVerify = $wrapper->getEvent()->getData()->gInt('verify');
357 357
 		if ($checkVerify === LoopbackTest::VERIFY) {
358
-			$output->write('<info>verify=' . $checkVerify . '</info> ');
358
+			$output->write('<info>verify='.$checkVerify.'</info> ');
359 359
 		} else {
360
-			$output->writeln('<error>verify=' . $checkVerify . '</error>');
360
+			$output->writeln('<error>verify='.$checkVerify.'</error>');
361 361
 
362 362
 			return false;
363 363
 		}
364 364
 
365 365
 		$checkManage = $wrapper->getResult()->gInt('manage');
366 366
 		if ($checkManage === LoopbackTest::MANAGE) {
367
-			$output->write('<info>manage=' . $checkManage . '</info> ');
367
+			$output->write('<info>manage='.$checkManage.'</info> ');
368 368
 		} else {
369
-			$output->writeln('<error>manage=' . $checkManage . '</error>');
369
+			$output->writeln('<error>manage='.$checkManage.'</error>');
370 370
 
371 371
 			return false;
372 372
 		}
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 		[$scheme, $cloudId, $path] = $this->parseAddress($loopback);
389 389
 
390 390
 		$question = new ConfirmationQuestion(
391
-			'- Do you want to save <info>' . $loopback
391
+			'- Do you want to save <info>'.$loopback
392 392
 			. '</info> as your <info>loopback</info> address ? (y/N) ', false, '/^(y|Y)/i'
393 393
 		);
394 394
 
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 		$this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId);
404 404
 		$this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_PATH, $path);
405 405
 		$output->writeln(
406
-			'- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>'
406
+			'- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>'
407 407
 		);
408 408
 	}
409 409
 
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 				continue;
471 471
 			}
472 472
 
473
-			$frontal = rtrim($scheme . '://' . $cloudId . $path, '/');
473
+			$frontal = rtrim($scheme.'://'.$cloudId.$path, '/');
474 474
 			break;
475 475
 		}
476 476
 
@@ -484,13 +484,13 @@  discard block
 block discarded – undo
484 484
 				'You will need to run this <info>curl</info> command from a remote terminal and paste its result: '
485 485
 			);
486 486
 			$output->writeln(
487
-				'     curl ' . $frontal . '/.well-known/webfinger?resource=http://nextcloud.com/'
487
+				'     curl '.$frontal.'/.well-known/webfinger?resource=http://nextcloud.com/'
488 488
 			);
489 489
 
490 490
 			$question = new Question('result: ', '');
491 491
 			$pasteWebfinger = $helper->ask($input, $output, $question);
492 492
 
493
-			echo '__ ' . $pasteWebfinger;
493
+			echo '__ '.$pasteWebfinger;
494 494
 
495 495
 			$output->writeln('TESTING !!');
496 496
 			$output->writeln('TESTING !!');
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
 			$request->setDataSerialize(new SimpleDataStore(['empty' => 1]));
618 618
 		}
619 619
 
620
-		$output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': ');
620
+		$output->write('- '.$type.' request on '.$request->getCompleteUrl().': ');
621 621
 
622 622
 		try {
623 623
 			$this->doRequest($request);
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
 				$color = 'info';
629 629
 			}
630 630
 
631
-			$output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>');
631
+			$output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>');
632 632
 			if ($result->getStatusCode() === 200) {
633 633
 				return true;
634 634
 			}
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
 
653 653
 		$output->writeln('');
654 654
 		$output->writeln(
655
-			'The address <info>' . $address . '</info> seems to reach your local Nextcloud.'
655
+			'The address <info>'.$address.'</info> seems to reach your local Nextcloud.'
656 656
 		);
657 657
 
658 658
 		$helper = $this->getHelper('question');
@@ -669,8 +669,8 @@  discard block
 block discarded – undo
669 669
 
670 670
 		$this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address);
671 671
 		$output->writeln(
672
-			'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\''
673
-			. $address . '\'</info> stored in database'
672
+			'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\''
673
+			. $address.'\'</info> stored in database'
674 674
 		);
675 675
 	}
676 676
 
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
 		}
697 697
 
698 698
 		if (!is_null($cloudIdPort)) {
699
-			$cloudId = $cloudId . ':' . $cloudIdPort;
699
+			$cloudId = $cloudId.':'.$cloudIdPort;
700 700
 		}
701 701
 
702 702
 		return [$scheme, $cloudId, $path];
Please login to merge, or discard this patch.