@@ -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); |
@@ -345,8 +345,8 @@ discard block |
||
| 345 | 345 | $test = new FederatedEvent(LoopbackTest::class); |
| 346 | 346 | $this->federatedEventService->newEvent($test); |
| 347 | 347 | $output->writeln( |
| 348 | - '<info>' . $test->getWrapperToken() . '</info> ' . |
|
| 349 | - '(took ' . (round(microtime(true) * 1000) - $timer) . 'ms)' |
|
| 348 | + '<info>'.$test->getWrapperToken().'</info> '. |
|
| 349 | + '(took '.(round(microtime(true) * 1000) - $timer).'ms)' |
|
| 350 | 350 | ); |
| 351 | 351 | |
| 352 | 352 | $output->writeln('- Waiting for async process to finish (5s)'); |
@@ -365,18 +365,18 @@ discard block |
||
| 365 | 365 | |
| 366 | 366 | $checkVerify = $wrapper->getEvent()->getData()->gInt('verify'); |
| 367 | 367 | if ($checkVerify === LoopbackTest::VERIFY) { |
| 368 | - $output->write('<info>verify=' . $checkVerify . '</info> '); |
|
| 368 | + $output->write('<info>verify='.$checkVerify.'</info> '); |
|
| 369 | 369 | } else { |
| 370 | - $output->writeln('<error>verify=' . $checkVerify . '</error>'); |
|
| 370 | + $output->writeln('<error>verify='.$checkVerify.'</error>'); |
|
| 371 | 371 | |
| 372 | 372 | return false; |
| 373 | 373 | } |
| 374 | 374 | |
| 375 | 375 | $checkManage = $wrapper->getResult()->gInt('manage'); |
| 376 | 376 | if ($checkManage === LoopbackTest::MANAGE) { |
| 377 | - $output->write('<info>manage=' . $checkManage . '</info> '); |
|
| 377 | + $output->write('<info>manage='.$checkManage.'</info> '); |
|
| 378 | 378 | } else { |
| 379 | - $output->writeln('<error>manage=' . $checkManage . '</error>'); |
|
| 379 | + $output->writeln('<error>manage='.$checkManage.'</error>'); |
|
| 380 | 380 | |
| 381 | 381 | return false; |
| 382 | 382 | } |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId); |
| 416 | 416 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_PATH, $path); |
| 417 | 417 | $output->writeln( |
| 418 | - '- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>' |
|
| 418 | + '- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>' |
|
| 419 | 419 | ); |
| 420 | 420 | } |
| 421 | 421 | |
@@ -467,8 +467,8 @@ discard block |
||
| 467 | 467 | continue; |
| 468 | 468 | } |
| 469 | 469 | |
| 470 | - $internal = rtrim($scheme . '://' . $cloudId, '/'); |
|
| 471 | - $fullInternal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
| 470 | + $internal = rtrim($scheme.'://'.$cloudId, '/'); |
|
| 471 | + $fullInternal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
| 472 | 472 | |
| 473 | 473 | $question = new ConfirmationQuestion( |
| 474 | 474 | '<comment>Do you want to check the validity of this internal address?</comment> (Y/n) ', true, |
@@ -487,9 +487,9 @@ discard block |
||
| 487 | 487 | 'You will need to run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
| 488 | 488 | ); |
| 489 | 489 | $output->writeln( |
| 490 | - ' curl -L "' . $internal |
|
| 490 | + ' curl -L "'.$internal |
|
| 491 | 491 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
| 492 | - . $testToken . '"' |
|
| 492 | + . $testToken.'"' |
|
| 493 | 493 | ); |
| 494 | 494 | |
| 495 | 495 | $output->writeln('paste the result here: '); |
@@ -523,7 +523,7 @@ discard block |
||
| 523 | 523 | |
| 524 | 524 | if ($pastedHref !== $href) { |
| 525 | 525 | $output->writeln( |
| 526 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
| 526 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
| 527 | 527 | . $href |
| 528 | 528 | ); |
| 529 | 529 | continue; |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | 'Next step, please run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
| 536 | 536 | ); |
| 537 | 537 | $output->writeln( |
| 538 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
| 538 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
| 539 | 539 | ); |
| 540 | 540 | |
| 541 | 541 | $output->writeln('paste the result here: '); |
@@ -552,9 +552,9 @@ discard block |
||
| 552 | 552 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
| 553 | 553 | $output->writeln( |
| 554 | 554 | '<error>The returned data (' |
| 555 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
| 555 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
| 556 | 556 | . ') are not the one expected: </error>' |
| 557 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
| 557 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
| 558 | 558 | ); |
| 559 | 559 | continue; |
| 560 | 560 | } |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | |
| 582 | 582 | $output->writeln(''); |
| 583 | 583 | $question = new ConfirmationQuestion( |
| 584 | - '- Do you want to save <info>' . $internal |
|
| 584 | + '- Do you want to save <info>'.$internal |
|
| 585 | 585 | . '</info> as your <info>internal</info> address ? (y/N) ', |
| 586 | 586 | false, '/^(y|Y)/i' |
| 587 | 587 | ); |
@@ -597,7 +597,7 @@ discard block |
||
| 597 | 597 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_ID, $cloudId); |
| 598 | 598 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_PATH, $path); |
| 599 | 599 | |
| 600 | - $output->writeln('- Address <info>' . $internal . '</info> is now used as <info>internal</info>'); |
|
| 600 | + $output->writeln('- Address <info>'.$internal.'</info> is now used as <info>internal</info>'); |
|
| 601 | 601 | } |
| 602 | 602 | |
| 603 | 603 | |
@@ -649,8 +649,8 @@ discard block |
||
| 649 | 649 | continue; |
| 650 | 650 | } |
| 651 | 651 | |
| 652 | - $frontal = rtrim($scheme . '://' . $cloudId, '/'); |
|
| 653 | - $fullFrontal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
| 652 | + $frontal = rtrim($scheme.'://'.$cloudId, '/'); |
|
| 653 | + $fullFrontal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
| 654 | 654 | |
| 655 | 655 | $question = new ConfirmationQuestion( |
| 656 | 656 | '<comment>Do you want to check the validity of this frontal address?</comment> (y/N) ', false, |
@@ -669,9 +669,9 @@ discard block |
||
| 669 | 669 | 'You will need to run this <info>curl</info> command from a remote terminal and paste its result: ' |
| 670 | 670 | ); |
| 671 | 671 | $output->writeln( |
| 672 | - ' curl -L "' . $frontal |
|
| 672 | + ' curl -L "'.$frontal |
|
| 673 | 673 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
| 674 | - . $testToken . '"' |
|
| 674 | + . $testToken.'"' |
|
| 675 | 675 | ); |
| 676 | 676 | |
| 677 | 677 | |
@@ -706,7 +706,7 @@ discard block |
||
| 706 | 706 | |
| 707 | 707 | if ($pastedHref !== $href) { |
| 708 | 708 | $output->writeln( |
| 709 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
| 709 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
| 710 | 710 | . $href |
| 711 | 711 | ); |
| 712 | 712 | continue; |
@@ -718,7 +718,7 @@ discard block |
||
| 718 | 718 | 'Next step, please run this <info>curl</info> command from a remote terminal and paste its result: ' |
| 719 | 719 | ); |
| 720 | 720 | $output->writeln( |
| 721 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
| 721 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
| 722 | 722 | ); |
| 723 | 723 | |
| 724 | 724 | $output->writeln('paste the result here: '); |
@@ -736,9 +736,9 @@ discard block |
||
| 736 | 736 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
| 737 | 737 | $output->writeln( |
| 738 | 738 | '<error>The returned data (' |
| 739 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
| 739 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
| 740 | 740 | . ') are not the one expected: </error>' |
| 741 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
| 741 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
| 742 | 742 | ); |
| 743 | 743 | continue; |
| 744 | 744 | } |
@@ -765,7 +765,7 @@ discard block |
||
| 765 | 765 | |
| 766 | 766 | $output->writeln(''); |
| 767 | 767 | $question = new ConfirmationQuestion( |
| 768 | - '- Do you want to save <info>' . $frontal |
|
| 768 | + '- Do you want to save <info>'.$frontal |
|
| 769 | 769 | . '</info> as your <info>frontal</info> address ? (y/N) ', |
| 770 | 770 | false, '/^(y|Y)/i' |
| 771 | 771 | ); |
@@ -781,7 +781,7 @@ discard block |
||
| 781 | 781 | $this->configService->setAppValue(ConfigService::FRONTAL_CLOUD_ID, $cloudId); |
| 782 | 782 | $this->configService->setAppValue(ConfigService::FRONTAL_CLOUD_PATH, $path); |
| 783 | 783 | |
| 784 | - $output->writeln('- Address <info>' . $frontal . '</info> is now used as <info>frontal</info>'); |
|
| 784 | + $output->writeln('- Address <info>'.$frontal.'</info> is now used as <info>frontal</info>'); |
|
| 785 | 785 | } |
| 786 | 786 | |
| 787 | 787 | |
@@ -807,7 +807,7 @@ discard block |
||
| 807 | 807 | $request->setDataSerialize(new SimpleDataStore(['empty' => 1])); |
| 808 | 808 | } |
| 809 | 809 | |
| 810 | - $output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
| 810 | + $output->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
| 811 | 811 | |
| 812 | 812 | try { |
| 813 | 813 | $this->doRequest($request); |
@@ -818,7 +818,7 @@ discard block |
||
| 818 | 818 | $color = 'info'; |
| 819 | 819 | } |
| 820 | 820 | |
| 821 | - $output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>'); |
|
| 821 | + $output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>'); |
|
| 822 | 822 | if ($result->getStatusCode() === 200) { |
| 823 | 823 | return true; |
| 824 | 824 | } |
@@ -842,7 +842,7 @@ discard block |
||
| 842 | 842 | |
| 843 | 843 | $output->writeln(''); |
| 844 | 844 | $output->writeln( |
| 845 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
| 845 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
| 846 | 846 | ); |
| 847 | 847 | |
| 848 | 848 | $helper = $this->getHelper('question'); |
@@ -859,8 +859,8 @@ discard block |
||
| 859 | 859 | |
| 860 | 860 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
| 861 | 861 | $output->writeln( |
| 862 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
| 863 | - . $address . '\'</info> stored in database' |
|
| 862 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
| 863 | + . $address.'\'</info> stored in database' |
|
| 864 | 864 | ); |
| 865 | 865 | } |
| 866 | 866 | |
@@ -888,7 +888,7 @@ discard block |
||
| 888 | 888 | $path = rtrim($path, '/'); |
| 889 | 889 | |
| 890 | 890 | if (!is_null($cloudIdPort)) { |
| 891 | - $cloudId = $cloudId . ':' . $cloudIdPort; |
|
| 891 | + $cloudId = $cloudId.':'.$cloudIdPort; |
|
| 892 | 892 | } |
| 893 | 893 | |
| 894 | 894 | return [$scheme, $cloudId, $path]; |