@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | throw new Exception('Please specify a --type for the test'); |
178 | 178 | } |
179 | 179 | if ($test !== '' && !in_array($type, self::$checks)) { |
180 | - throw new Exception('Unknown type: ' . implode(', ', self::$checks)); |
|
180 | + throw new Exception('Unknown type: '.implode(', ', self::$checks)); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | // $this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | $output->writeln(''); |
238 | - $output->writeln('* testing current address: ' . $test); |
|
238 | + $output->writeln('* testing current address: '.$test); |
|
239 | 239 | |
240 | 240 | try { |
241 | 241 | $this->setupLoopback($input, $output, $test); |
@@ -271,8 +271,8 @@ discard block |
||
271 | 271 | continue; |
272 | 272 | } |
273 | 273 | |
274 | - $loopback = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
275 | - $output->writeln('* testing address: ' . $loopback . ' '); |
|
274 | + $loopback = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
275 | + $output->writeln('* testing address: '.$loopback.' '); |
|
276 | 276 | |
277 | 277 | try { |
278 | 278 | $this->setupLoopback($input, $output, $loopback); |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | $test = new FederatedEvent(LoopbackTest::class); |
345 | 345 | $this->federatedEventService->newEvent($test); |
346 | 346 | |
347 | - $output->writeln('<info>' . $test->getWrapperToken() . '</info>'); |
|
347 | + $output->writeln('<info>'.$test->getWrapperToken().'</info>'); |
|
348 | 348 | |
349 | 349 | $output->writeln('- Waiting for async process to finish (5s)'); |
350 | 350 | sleep(5); |
@@ -359,18 +359,18 @@ discard block |
||
359 | 359 | |
360 | 360 | $checkVerify = $wrapper->getEvent()->getData()->gInt('verify'); |
361 | 361 | if ($checkVerify === LoopbackTest::VERIFY) { |
362 | - $output->write('<info>verify=' . $checkVerify . '</info> '); |
|
362 | + $output->write('<info>verify='.$checkVerify.'</info> '); |
|
363 | 363 | } else { |
364 | - $output->writeln('<error>verify=' . $checkVerify . '</error>'); |
|
364 | + $output->writeln('<error>verify='.$checkVerify.'</error>'); |
|
365 | 365 | |
366 | 366 | return false; |
367 | 367 | } |
368 | 368 | |
369 | 369 | $checkManage = $wrapper->getResult()->gInt('manage'); |
370 | 370 | if ($checkManage === LoopbackTest::MANAGE) { |
371 | - $output->write('<info>manage=' . $checkManage . '</info> '); |
|
371 | + $output->write('<info>manage='.$checkManage.'</info> '); |
|
372 | 372 | } else { |
373 | - $output->writeln('<error>manage=' . $checkManage . '</error>'); |
|
373 | + $output->writeln('<error>manage='.$checkManage.'</error>'); |
|
374 | 374 | |
375 | 375 | return false; |
376 | 376 | } |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId); |
410 | 410 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_PATH, $path); |
411 | 411 | $output->writeln( |
412 | - '- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>' |
|
412 | + '- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>' |
|
413 | 413 | ); |
414 | 414 | } |
415 | 415 | |
@@ -461,8 +461,8 @@ discard block |
||
461 | 461 | continue; |
462 | 462 | } |
463 | 463 | |
464 | - $internal = rtrim($scheme . '://' . $cloudId, '/'); |
|
465 | - $fullInternal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
464 | + $internal = rtrim($scheme.'://'.$cloudId, '/'); |
|
465 | + $fullInternal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
466 | 466 | |
467 | 467 | $question = new ConfirmationQuestion( |
468 | 468 | '<comment>Do you want to run a series of test to confirm the validity of this internal address?</comment> (Y/n) ', |
@@ -482,9 +482,9 @@ discard block |
||
482 | 482 | 'You will need to run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
483 | 483 | ); |
484 | 484 | $output->writeln( |
485 | - ' curl -L "' . $internal |
|
485 | + ' curl -L "'.$internal |
|
486 | 486 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
487 | - . $testToken . '"' |
|
487 | + . $testToken.'"' |
|
488 | 488 | ); |
489 | 489 | |
490 | 490 | $output->writeln('paste the result here: '); |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | |
519 | 519 | if ($pastedHref !== $href) { |
520 | 520 | $output->writeln( |
521 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
521 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
522 | 522 | . $href |
523 | 523 | ); |
524 | 524 | continue; |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | 'Now, please run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
531 | 531 | ); |
532 | 532 | $output->writeln( |
533 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
533 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
534 | 534 | ); |
535 | 535 | |
536 | 536 | $output->writeln('paste the result here: '); |
@@ -547,9 +547,9 @@ discard block |
||
547 | 547 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
548 | 548 | $output->writeln( |
549 | 549 | '<error>The returned data (' |
550 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
550 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
551 | 551 | . ') are not the one expected: </error>' |
552 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
552 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
553 | 553 | ); |
554 | 554 | continue; |
555 | 555 | } |
@@ -594,7 +594,7 @@ discard block |
||
594 | 594 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_PATH, $path); |
595 | 595 | |
596 | 596 | $output->writeln( |
597 | - '- Address <info>' . $internal . '</info> is now used as <info>internal</info>' |
|
597 | + '- Address <info>'.$internal.'</info> is now used as <info>internal</info>' |
|
598 | 598 | ); |
599 | 599 | } |
600 | 600 | |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | continue; |
648 | 648 | } |
649 | 649 | |
650 | - $frontal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
650 | + $frontal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
651 | 651 | break; |
652 | 652 | } |
653 | 653 | |
@@ -661,13 +661,13 @@ discard block |
||
661 | 661 | 'You will need to run this <info>curl</info> command from a remote terminal and paste its result: ' |
662 | 662 | ); |
663 | 663 | $output->writeln( |
664 | - ' curl ' . $frontal . '/.well-known/webfinger?resource=http://nextcloud.com/' |
|
664 | + ' curl '.$frontal.'/.well-known/webfinger?resource=http://nextcloud.com/' |
|
665 | 665 | ); |
666 | 666 | |
667 | 667 | $question = new Question('result: ', ''); |
668 | 668 | $pasteWebfinger = $helper->ask($input, $output, $question); |
669 | 669 | |
670 | - echo '__ ' . $pasteWebfinger; |
|
670 | + echo '__ '.$pasteWebfinger; |
|
671 | 671 | |
672 | 672 | $output->writeln('TESTING !!'); |
673 | 673 | $output->writeln('TESTING !!'); |
@@ -794,7 +794,7 @@ discard block |
||
794 | 794 | $request->setDataSerialize(new SimpleDataStore(['empty' => 1])); |
795 | 795 | } |
796 | 796 | |
797 | - $output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
797 | + $output->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
798 | 798 | |
799 | 799 | try { |
800 | 800 | $this->doRequest($request); |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | $color = 'info'; |
806 | 806 | } |
807 | 807 | |
808 | - $output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>'); |
|
808 | + $output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>'); |
|
809 | 809 | if ($result->getStatusCode() === 200) { |
810 | 810 | return true; |
811 | 811 | } |
@@ -829,7 +829,7 @@ discard block |
||
829 | 829 | |
830 | 830 | $output->writeln(''); |
831 | 831 | $output->writeln( |
832 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
832 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
833 | 833 | ); |
834 | 834 | |
835 | 835 | $helper = $this->getHelper('question'); |
@@ -846,8 +846,8 @@ discard block |
||
846 | 846 | |
847 | 847 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
848 | 848 | $output->writeln( |
849 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
850 | - . $address . '\'</info> stored in database' |
|
849 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
850 | + . $address.'\'</info> stored in database' |
|
851 | 851 | ); |
852 | 852 | } |
853 | 853 | |
@@ -875,7 +875,7 @@ discard block |
||
875 | 875 | $path = rtrim($path, '/'); |
876 | 876 | |
877 | 877 | if (!is_null($cloudIdPort)) { |
878 | - $cloudId = $cloudId . ':' . $cloudIdPort; |
|
878 | + $cloudId = $cloudId.':'.$cloudIdPort; |
|
879 | 879 | } |
880 | 880 | |
881 | 881 | return [$scheme, $cloudId, $path]; |
@@ -95,6 +95,6 @@ |
||
95 | 95 | * @param array $results |
96 | 96 | */ |
97 | 97 | public function result(FederatedEvent $event, array $results): void { |
98 | - \OC::$server->getLogger()->log(3, '### RESULT: ' . json_encode($results)); |
|
98 | + \OC::$server->getLogger()->log(3, '### RESULT: '.json_encode($results)); |
|
99 | 99 | } |
100 | 100 | } |