@@ -409,12 +409,12 @@ discard block |
||
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 |
||
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 |
@@ -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 | } |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | [$scheme, $cloudId, $path] = $this->parseAddress($loopback); |
393 | 393 | |
394 | 394 | $question = new ConfirmationQuestion( |
395 | - '- Do you want to save <info>' . $loopback |
|
395 | + '- Do you want to save <info>'.$loopback |
|
396 | 396 | . '</info> as your <info>loopback</info> address ? (y/N) ', false, '/^(y|Y)/i' |
397 | 397 | ); |
398 | 398 | |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId); |
408 | 408 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_PATH, $path); |
409 | 409 | $output->writeln( |
410 | - '- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>' |
|
410 | + '- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>' |
|
411 | 411 | ); |
412 | 412 | } |
413 | 413 | |
@@ -459,8 +459,8 @@ discard block |
||
459 | 459 | continue; |
460 | 460 | } |
461 | 461 | |
462 | - $internal = rtrim($scheme . '://' . $cloudId, '/'); |
|
463 | - $fullInternal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
462 | + $internal = rtrim($scheme.'://'.$cloudId, '/'); |
|
463 | + $fullInternal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
464 | 464 | |
465 | 465 | $question = new ConfirmationQuestion( |
466 | 466 | '<comment>Do you want to check the validity of this internal address?</comment> (Y/n) ', true, |
@@ -479,9 +479,9 @@ discard block |
||
479 | 479 | 'You will need to run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
480 | 480 | ); |
481 | 481 | $output->writeln( |
482 | - ' curl -L "' . $internal |
|
482 | + ' curl -L "'.$internal |
|
483 | 483 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
484 | - . $testToken . '"' |
|
484 | + . $testToken.'"' |
|
485 | 485 | ); |
486 | 486 | |
487 | 487 | $output->writeln('paste the result here: '); |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | |
516 | 516 | if ($pastedHref !== $href) { |
517 | 517 | $output->writeln( |
518 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
518 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
519 | 519 | . $href |
520 | 520 | ); |
521 | 521 | continue; |
@@ -527,7 +527,7 @@ discard block |
||
527 | 527 | 'Now, please run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
528 | 528 | ); |
529 | 529 | $output->writeln( |
530 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
530 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
531 | 531 | ); |
532 | 532 | |
533 | 533 | $output->writeln('paste the result here: '); |
@@ -544,9 +544,9 @@ discard block |
||
544 | 544 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
545 | 545 | $output->writeln( |
546 | 546 | '<error>The returned data (' |
547 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
547 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
548 | 548 | . ') are not the one expected: </error>' |
549 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
549 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
550 | 550 | ); |
551 | 551 | continue; |
552 | 552 | } |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | |
574 | 574 | $output->writeln(''); |
575 | 575 | $question = new ConfirmationQuestion( |
576 | - '- Do you want to save <info>' . $internal |
|
576 | + '- Do you want to save <info>'.$internal |
|
577 | 577 | . '</info> as your <info>internal</info> address ? (y/N) ', false, '/^(y|Y)/i' |
578 | 578 | ); |
579 | 579 | |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_PATH, $path); |
590 | 590 | |
591 | 591 | $output->writeln( |
592 | - '- Address <info>' . $internal . '</info> is now used as <info>internal</info>' |
|
592 | + '- Address <info>'.$internal.'</info> is now used as <info>internal</info>' |
|
593 | 593 | ); |
594 | 594 | } |
595 | 595 | |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | continue; |
643 | 643 | } |
644 | 644 | |
645 | - $frontal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
645 | + $frontal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
646 | 646 | break; |
647 | 647 | } |
648 | 648 | |
@@ -656,13 +656,13 @@ discard block |
||
656 | 656 | 'You will need to run this <info>curl</info> command from a remote terminal and paste its result: ' |
657 | 657 | ); |
658 | 658 | $output->writeln( |
659 | - ' curl ' . $frontal . '/.well-known/webfinger?resource=http://nextcloud.com/' |
|
659 | + ' curl '.$frontal.'/.well-known/webfinger?resource=http://nextcloud.com/' |
|
660 | 660 | ); |
661 | 661 | |
662 | 662 | $question = new Question('result: ', ''); |
663 | 663 | $pasteWebfinger = $helper->ask($input, $output, $question); |
664 | 664 | |
665 | - echo '__ ' . $pasteWebfinger; |
|
665 | + echo '__ '.$pasteWebfinger; |
|
666 | 666 | |
667 | 667 | $output->writeln('TESTING !!'); |
668 | 668 | $output->writeln('TESTING !!'); |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | $request->setDataSerialize(new SimpleDataStore(['empty' => 1])); |
790 | 790 | } |
791 | 791 | |
792 | - $output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
792 | + $output->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
793 | 793 | |
794 | 794 | try { |
795 | 795 | $this->doRequest($request); |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | $color = 'info'; |
801 | 801 | } |
802 | 802 | |
803 | - $output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>'); |
|
803 | + $output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>'); |
|
804 | 804 | if ($result->getStatusCode() === 200) { |
805 | 805 | return true; |
806 | 806 | } |
@@ -824,7 +824,7 @@ discard block |
||
824 | 824 | |
825 | 825 | $output->writeln(''); |
826 | 826 | $output->writeln( |
827 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
827 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
828 | 828 | ); |
829 | 829 | |
830 | 830 | $helper = $this->getHelper('question'); |
@@ -841,8 +841,8 @@ discard block |
||
841 | 841 | |
842 | 842 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
843 | 843 | $output->writeln( |
844 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
845 | - . $address . '\'</info> stored in database' |
|
844 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
845 | + . $address.'\'</info> stored in database' |
|
846 | 846 | ); |
847 | 847 | } |
848 | 848 | |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | $path = rtrim($path, '/'); |
871 | 871 | |
872 | 872 | if (!is_null($cloudIdPort)) { |
873 | - $cloudId = $cloudId . ':' . $cloudIdPort; |
|
873 | + $cloudId = $cloudId.':'.$cloudIdPort; |
|
874 | 874 | } |
875 | 875 | |
876 | 876 | return [$scheme, $cloudId, $path]; |
@@ -223,7 +223,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 rtrim($base, '/') . $this->linkToRoute($route, $args); |
|
526 | + return rtrim($base, '/').$this->linkToRoute($route, $args); |
|
527 | 527 | } |
528 | 528 | |
529 | 529 | |
@@ -624,10 +624,10 @@ discard block |
||
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 |
||
641 | 641 | return ''; |
642 | 642 | } |
643 | 643 | |
644 | - return (($showAt) ? '@' : '') . $instance; |
|
644 | + return (($showAt) ? '@' : '').$instance; |
|
645 | 645 | } |
646 | 646 | |
647 | 647 |