Completed
Pull Request — master (#758)
by Maxence
40s
created
lib/Service/InterfaceService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -409,12 +409,12 @@  discard block
 block discarded – undo
409 409
 			throw new UnknownInterfaceException('misconfigured scheme');
410 410
 		}
411 411
 
412
-		$base = $scheme . '://' . $this->getCloudInstance($interface) . $path;
412
+		$base = $scheme.'://'.$this->getCloudInstance($interface).$path;
413 413
 		if ($route === '') {
414 414
 			return $base;
415 415
 		}
416 416
 
417
-		return $base . $this->configService->linkToRoute($route, $args);
417
+		return $base.$this->configService->linkToRoute($route, $args);
418 418
 	}
419 419
 
420 420
 
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 			return $this->configService->getLoopbackPath($route, $args);
448 448
 		}
449 449
 
450
-		return rtrim($base, '/') . $this->configService->linkToRoute($route, $args);
450
+		return rtrim($base, '/').$this->configService->linkToRoute($route, $args);
451 451
 	}
452 452
 
453 453
 
Please login to merge, or discard this patch.
lib/Service/ConfigService.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 			return $value;
224 224
 		}
225 225
 
226
-		if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') {
226
+		if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') {
227 227
 			return $value;
228 228
 		}
229 229
 
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 	 */
443 443
 	public function getTrustedDomains(): array {
444 444
 		return array_map(
445
-			function (string $address) {
445
+			function(string $address) {
446 446
 				return strtolower($address);
447 447
 			}, $this->config->getSystemValue('trusted_domains', [])
448 448
 		);
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
 		}
479 479
 
480 480
 		if (array_key_exists('port', $loopback)) {
481
-			$loopbackCloudId = $loopback['host'] . ':' . $loopback['port'];
481
+			$loopbackCloudId = $loopback['host'].':'.$loopback['port'];
482 482
 		} else {
483 483
 			$loopbackCloudId = $loopback['host'];
484 484
 		}
@@ -517,13 +517,13 @@  discard block
 block discarded – undo
517 517
 			$path = $this->getAppValue(self::LOOPBACK_CLOUD_PATH);
518 518
 		}
519 519
 
520
-		$base = $scheme . '://' . $instance . $path;
520
+		$base = $scheme.'://'.$instance.$path;
521 521
 
522 522
 		if ($route === '') {
523 523
 			return $base;
524 524
 		}
525 525
 
526
-		return $base . $this->linkToRoute($route, $args);
526
+		return $base.$this->linkToRoute($route, $args);
527 527
 	}
528 528
 
529 529
 
@@ -624,10 +624,10 @@  discard block
 block discarded – undo
624 624
 		$name = ($displayName) ? $federatedUser->getDisplayName() : $federatedUser->getUserId();
625 625
 
626 626
 		if ($federatedUser->getUserType() === Member::TYPE_MAIL) {
627
-			return $name . ' (' . $this->displayInstance($federatedUser->getInstance(), false) . ')';
627
+			return $name.' ('.$this->displayInstance($federatedUser->getInstance(), false).')';
628 628
 		}
629 629
 
630
-		return $name . $this->displayInstance($federatedUser->getInstance(), true);
630
+		return $name.$this->displayInstance($federatedUser->getInstance(), true);
631 631
 	}
632 632
 
633 633
 	/**
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
 			return '';
642 642
 		}
643 643
 
644
-		return (($showAt) ? '@' : '') . $instance;
644
+		return (($showAt) ? '@' : '').$instance;
645 645
 	}
646 646
 
647 647
 
Please login to merge, or discard this patch.
lib/Command/CirclesCheck.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 			throw new Exception('Please specify a --type for the test');
176 176
 		}
177 177
 		if ($test !== '' && !in_array($type, self::$checks)) {
178
-			throw new Exception('Unknown type: ' . implode(', ', self::$checks));
178
+			throw new Exception('Unknown type: '.implode(', ', self::$checks));
179 179
 		}
180 180
 
181 181
 //		$this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		}
234 234
 
235 235
 		$output->writeln('');
236
-		$output->writeln('* testing current address: ' . $test);
236
+		$output->writeln('* testing current address: '.$test);
237 237
 
238 238
 		try {
239 239
 			$this->setupLoopback($input, $output, $test);
@@ -269,8 +269,8 @@  discard block
 block discarded – undo
269 269
 				continue;
270 270
 			}
271 271
 
272
-			$loopback = rtrim($scheme . '://' . $cloudId . $path, '/');
273
-			$output->writeln('* testing address: ' . $loopback . ' ');
272
+			$loopback = rtrim($scheme.'://'.$cloudId.$path, '/');
273
+			$output->writeln('* testing address: '.$loopback.' ');
274 274
 
275 275
 			try {
276 276
 				$this->setupLoopback($input, $output, $loopback);
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 		$test = new FederatedEvent(LoopbackTest::class);
343 343
 		$this->federatedEventService->newEvent($test);
344 344
 
345
-		$output->writeln('<info>' . $test->getWrapperToken() . '</info>');
345
+		$output->writeln('<info>'.$test->getWrapperToken().'</info>');
346 346
 
347 347
 		$output->writeln('- Waiting for async process to finish (5s)');
348 348
 		sleep(5);
@@ -357,18 +357,18 @@  discard block
 block discarded – undo
357 357
 
358 358
 		$checkVerify = $wrapper->getEvent()->getData()->gInt('verify');
359 359
 		if ($checkVerify === LoopbackTest::VERIFY) {
360
-			$output->write('<info>verify=' . $checkVerify . '</info> ');
360
+			$output->write('<info>verify='.$checkVerify.'</info> ');
361 361
 		} else {
362
-			$output->writeln('<error>verify=' . $checkVerify . '</error>');
362
+			$output->writeln('<error>verify='.$checkVerify.'</error>');
363 363
 
364 364
 			return false;
365 365
 		}
366 366
 
367 367
 		$checkManage = $wrapper->getResult()->gInt('manage');
368 368
 		if ($checkManage === LoopbackTest::MANAGE) {
369
-			$output->write('<info>manage=' . $checkManage . '</info> ');
369
+			$output->write('<info>manage='.$checkManage.'</info> ');
370 370
 		} else {
371
-			$output->writeln('<error>manage=' . $checkManage . '</error>');
371
+			$output->writeln('<error>manage='.$checkManage.'</error>');
372 372
 
373 373
 			return false;
374 374
 		}
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 		[$scheme, $cloudId, $path] = $this->parseAddress($loopback);
391 391
 
392 392
 		$question = new ConfirmationQuestion(
393
-			'- Do you want to save <info>' . $loopback
393
+			'- Do you want to save <info>'.$loopback
394 394
 			. '</info> as your <info>loopback</info> address ? (y/N) ', false, '/^(y|Y)/i'
395 395
 		);
396 396
 
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 		$this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId);
406 406
 		$this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_PATH, $path);
407 407
 		$output->writeln(
408
-			'- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>'
408
+			'- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>'
409 409
 		);
410 410
 	}
411 411
 
@@ -457,8 +457,8 @@  discard block
 block discarded – undo
457 457
 				continue;
458 458
 			}
459 459
 
460
-			$internal = rtrim($scheme . '://' . $cloudId, '/');
461
-			$fullInternal = rtrim($scheme . '://' . $cloudId . $path, '/');
460
+			$internal = rtrim($scheme.'://'.$cloudId, '/');
461
+			$fullInternal = rtrim($scheme.'://'.$cloudId.$path, '/');
462 462
 
463 463
 			$question = new ConfirmationQuestion(
464 464
 				'<comment>Do you want to check the validity of this internal address?</comment> (Y/n) ', true,
@@ -477,9 +477,9 @@  discard block
 block discarded – undo
477 477
 					'You will need to run this <info>curl</info> command from a terminal on your local network and paste its result: '
478 478
 				);
479 479
 				$output->writeln(
480
-					'     curl -L "' . $internal
480
+					'     curl -L "'.$internal
481 481
 					. '/.well-known/webfinger?resource=http://nextcloud.com/&test='
482
-					. $testToken . '"'
482
+					. $testToken.'"'
483 483
 				);
484 484
 
485 485
 				$question = new Question('result: ', '');
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
 
513 513
 				if ($pastedHref !== $href) {
514 514
 					$output->writeln(
515
-						'<error>The returned data (' . $pastedHref . ') are not the one expected: </error>'
515
+						'<error>The returned data ('.$pastedHref.') are not the one expected: </error>'
516 516
 						. $href
517 517
 					);
518 518
 					continue;
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 					'Now, please run this <info>curl</info> command from a terminal on your local network and paste its result: '
525 525
 				);
526 526
 				$output->writeln(
527
-					'     curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"'
527
+					'     curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"'
528 528
 				);
529 529
 
530 530
 				$question = new Question('result: ', '');
@@ -539,9 +539,9 @@  discard block
 block discarded – undo
539 539
 					|| $appSignatory->getRoot() !== $pastedSignatory->g('root')) {
540 540
 					$output->writeln(
541 541
 						'<error>The returned data ('
542
-						. $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root')
542
+						. $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root')
543 543
 						. ') are not the one expected: </error>'
544
-						. $appSignatory->getUid(true) . '/' . $appSignatory->getRoot()
544
+						. $appSignatory->getUid(true).'/'.$appSignatory->getRoot()
545 545
 					);
546 546
 					continue;
547 547
 				}
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
 
569 569
 		$output->writeln('');
570 570
 		$question = new ConfirmationQuestion(
571
-			'- Do you want to save <info>' . $internal
571
+			'- Do you want to save <info>'.$internal
572 572
 			. '</info> as your <info>internal</info> address ? (y/N) ', false, '/^(y|Y)/i'
573 573
 		);
574 574
 
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
 		$this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_PATH, $path);
585 585
 
586 586
 		$output->writeln(
587
-			'- Address <info>' . $internal . '</info> is now used as <info>internal</info>'
587
+			'- Address <info>'.$internal.'</info> is now used as <info>internal</info>'
588 588
 		);
589 589
 	}
590 590
 
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 				continue;
638 638
 			}
639 639
 
640
-			$frontal = rtrim($scheme . '://' . $cloudId . $path, '/');
640
+			$frontal = rtrim($scheme.'://'.$cloudId.$path, '/');
641 641
 			break;
642 642
 		}
643 643
 
@@ -651,13 +651,13 @@  discard block
 block discarded – undo
651 651
 				'You will need to run this <info>curl</info> command from a remote terminal and paste its result: '
652 652
 			);
653 653
 			$output->writeln(
654
-				'     curl ' . $frontal . '/.well-known/webfinger?resource=http://nextcloud.com/'
654
+				'     curl '.$frontal.'/.well-known/webfinger?resource=http://nextcloud.com/'
655 655
 			);
656 656
 
657 657
 			$question = new Question('result: ', '');
658 658
 			$pasteWebfinger = $helper->ask($input, $output, $question);
659 659
 
660
-			echo '__ ' . $pasteWebfinger;
660
+			echo '__ '.$pasteWebfinger;
661 661
 
662 662
 			$output->writeln('TESTING !!');
663 663
 			$output->writeln('TESTING !!');
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
 			$request->setDataSerialize(new SimpleDataStore(['empty' => 1]));
785 785
 		}
786 786
 
787
-		$output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': ');
787
+		$output->write('- '.$type.' request on '.$request->getCompleteUrl().': ');
788 788
 
789 789
 		try {
790 790
 			$this->doRequest($request);
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
 				$color = 'info';
796 796
 			}
797 797
 
798
-			$output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>');
798
+			$output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>');
799 799
 			if ($result->getStatusCode() === 200) {
800 800
 				return true;
801 801
 			}
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
 
820 820
 		$output->writeln('');
821 821
 		$output->writeln(
822
-			'The address <info>' . $address . '</info> seems to reach your local Nextcloud.'
822
+			'The address <info>'.$address.'</info> seems to reach your local Nextcloud.'
823 823
 		);
824 824
 
825 825
 		$helper = $this->getHelper('question');
@@ -836,8 +836,8 @@  discard block
 block discarded – undo
836 836
 
837 837
 		$this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address);
838 838
 		$output->writeln(
839
-			'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\''
840
-			. $address . '\'</info> stored in database'
839
+			'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\''
840
+			. $address.'\'</info> stored in database'
841 841
 		);
842 842
 	}
843 843
 
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
 		$path = rtrim($path, '/');
866 866
 
867 867
 		if (!is_null($cloudIdPort)) {
868
-			$cloudId = $cloudId . ':' . $cloudIdPort;
868
+			$cloudId = $cloudId.':'.$cloudIdPort;
869 869
 		}
870 870
 
871 871
 		return [$scheme, $cloudId, $path];
Please login to merge, or discard this patch.