@@ -68,7 +68,7 @@ |
||
68 | 68 | $this->parseAsNonMember($event, $circle); |
69 | 69 | $this->parseAsMember($event, $circle, $params); |
70 | 70 | $this->parseAsModerator($event, $circle, $params); |
71 | - } catch (FakeException|InvalidItemException $e) { |
|
71 | + } catch (FakeException | InvalidItemException $e) { |
|
72 | 72 | /** clean exit */ |
73 | 73 | } |
74 | 74 |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | throw new Exception('Please specify a --type for the test'); |
131 | 131 | } |
132 | 132 | if ($test !== '' && !in_array($type, self::$checks)) { |
133 | - throw new Exception('Unknown type: ' . implode(', ', self::$checks)); |
|
133 | + throw new Exception('Unknown type: '.implode(', ', self::$checks)); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | // $this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | } |
187 | 187 | |
188 | 188 | $output->writeln(''); |
189 | - $output->writeln('* testing current address: ' . $test); |
|
189 | + $output->writeln('* testing current address: '.$test); |
|
190 | 190 | |
191 | 191 | try { |
192 | 192 | $this->setupLoopback($input, $output, $test); |
@@ -220,8 +220,8 @@ discard block |
||
220 | 220 | continue; |
221 | 221 | } |
222 | 222 | |
223 | - $loopback = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
224 | - $output->writeln('* testing address: ' . $loopback . ' '); |
|
223 | + $loopback = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
224 | + $output->writeln('* testing address: '.$loopback.' '); |
|
225 | 225 | |
226 | 226 | try { |
227 | 227 | $this->setupLoopback($input, $output, $loopback); |
@@ -292,8 +292,8 @@ discard block |
||
292 | 292 | $test = new FederatedEvent(LoopbackTest::class); |
293 | 293 | $this->federatedEventService->newEvent($test); |
294 | 294 | $output->writeln( |
295 | - '<info>' . $test->getWrapperToken() . '</info> ' . |
|
296 | - '(took ' . (round(microtime(true) * 1000) - $timer) . 'ms)' |
|
295 | + '<info>'.$test->getWrapperToken().'</info> '. |
|
296 | + '(took '.(round(microtime(true) * 1000) - $timer).'ms)' |
|
297 | 297 | ); |
298 | 298 | |
299 | 299 | $output->writeln('- Waiting for async process to finish (5s)'); |
@@ -312,18 +312,18 @@ discard block |
||
312 | 312 | |
313 | 313 | $checkVerify = $wrapper->getEvent()->getData()->gInt('verify'); |
314 | 314 | if ($checkVerify === LoopbackTest::VERIFY) { |
315 | - $output->write('<info>verify=' . $checkVerify . '</info> '); |
|
315 | + $output->write('<info>verify='.$checkVerify.'</info> '); |
|
316 | 316 | } else { |
317 | - $output->writeln('<error>verify=' . $checkVerify . '</error>'); |
|
317 | + $output->writeln('<error>verify='.$checkVerify.'</error>'); |
|
318 | 318 | |
319 | 319 | return false; |
320 | 320 | } |
321 | 321 | |
322 | 322 | $checkManage = $wrapper->getResult()->gInt('manage'); |
323 | 323 | if ($checkManage === LoopbackTest::MANAGE) { |
324 | - $output->write('<info>manage=' . $checkManage . '</info> '); |
|
324 | + $output->write('<info>manage='.$checkManage.'</info> '); |
|
325 | 325 | } else { |
326 | - $output->writeln('<error>manage=' . $checkManage . '</error>'); |
|
326 | + $output->writeln('<error>manage='.$checkManage.'</error>'); |
|
327 | 327 | |
328 | 328 | return false; |
329 | 329 | } |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId); |
362 | 362 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_PATH, $path); |
363 | 363 | $output->writeln( |
364 | - '- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>' |
|
364 | + '- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>' |
|
365 | 365 | ); |
366 | 366 | } |
367 | 367 | |
@@ -413,8 +413,8 @@ discard block |
||
413 | 413 | continue; |
414 | 414 | } |
415 | 415 | |
416 | - $internal = rtrim($scheme . '://' . $cloudId, '/'); |
|
417 | - $fullInternal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
416 | + $internal = rtrim($scheme.'://'.$cloudId, '/'); |
|
417 | + $fullInternal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
418 | 418 | |
419 | 419 | $question = new ConfirmationQuestion( |
420 | 420 | '<comment>Do you want to check the validity of this internal address?</comment> (Y/n) ', true, |
@@ -433,9 +433,9 @@ discard block |
||
433 | 433 | 'You will need to run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
434 | 434 | ); |
435 | 435 | $output->writeln( |
436 | - ' curl -L "' . $internal |
|
436 | + ' curl -L "'.$internal |
|
437 | 437 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
438 | - . $testToken . '"' |
|
438 | + . $testToken.'"' |
|
439 | 439 | ); |
440 | 440 | |
441 | 441 | $output->writeln('paste the result here: '); |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | |
470 | 470 | if ($pastedHref !== $href) { |
471 | 471 | $output->writeln( |
472 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
472 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
473 | 473 | . $href |
474 | 474 | ); |
475 | 475 | continue; |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | 'Next step, please run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
482 | 482 | ); |
483 | 483 | $output->writeln( |
484 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
484 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
485 | 485 | ); |
486 | 486 | |
487 | 487 | $output->writeln('paste the result here: '); |
@@ -497,9 +497,9 @@ discard block |
||
497 | 497 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
498 | 498 | $output->writeln( |
499 | 499 | '<error>The returned data (' |
500 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
500 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
501 | 501 | . ') are not the one expected: </error>' |
502 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
502 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
503 | 503 | ); |
504 | 504 | continue; |
505 | 505 | } |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | |
526 | 526 | $output->writeln(''); |
527 | 527 | $question = new ConfirmationQuestion( |
528 | - '- Do you want to save <info>' . $internal |
|
528 | + '- Do you want to save <info>'.$internal |
|
529 | 529 | . '</info> as your <info>internal</info> address ? (y/N) ', |
530 | 530 | false, '/^(y|Y)/i' |
531 | 531 | ); |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_ID, $cloudId); |
542 | 542 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_PATH, $path); |
543 | 543 | |
544 | - $output->writeln('- Address <info>' . $internal . '</info> is now used as <info>internal</info>'); |
|
544 | + $output->writeln('- Address <info>'.$internal.'</info> is now used as <info>internal</info>'); |
|
545 | 545 | } |
546 | 546 | |
547 | 547 | /** |
@@ -591,8 +591,8 @@ discard block |
||
591 | 591 | continue; |
592 | 592 | } |
593 | 593 | |
594 | - $frontal = rtrim($scheme . '://' . $cloudId, '/'); |
|
595 | - $fullFrontal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
594 | + $frontal = rtrim($scheme.'://'.$cloudId, '/'); |
|
595 | + $fullFrontal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
596 | 596 | |
597 | 597 | $question = new ConfirmationQuestion( |
598 | 598 | '<comment>Do you want to check the validity of this frontal address?</comment> (y/N) ', false, |
@@ -611,9 +611,9 @@ discard block |
||
611 | 611 | 'You will need to run this <info>curl</info> command from a remote terminal and paste its result: ' |
612 | 612 | ); |
613 | 613 | $output->writeln( |
614 | - ' curl -L "' . $frontal |
|
614 | + ' curl -L "'.$frontal |
|
615 | 615 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
616 | - . $testToken . '"' |
|
616 | + . $testToken.'"' |
|
617 | 617 | ); |
618 | 618 | |
619 | 619 | $output->writeln('paste the result here: '); |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | |
648 | 648 | if ($pastedHref !== $href) { |
649 | 649 | $output->writeln( |
650 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
650 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
651 | 651 | . $href |
652 | 652 | ); |
653 | 653 | continue; |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | 'Next step, please run this <info>curl</info> command from a remote terminal and paste its result: ' |
660 | 660 | ); |
661 | 661 | $output->writeln( |
662 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
662 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
663 | 663 | ); |
664 | 664 | |
665 | 665 | $output->writeln('paste the result here: '); |
@@ -675,9 +675,9 @@ discard block |
||
675 | 675 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
676 | 676 | $output->writeln( |
677 | 677 | '<error>The returned data (' |
678 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
678 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
679 | 679 | . ') are not the one expected: </error>' |
680 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
680 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
681 | 681 | ); |
682 | 682 | continue; |
683 | 683 | } |
@@ -703,7 +703,7 @@ discard block |
||
703 | 703 | |
704 | 704 | $output->writeln(''); |
705 | 705 | $question = new ConfirmationQuestion( |
706 | - '- Do you want to save <info>' . $frontal |
|
706 | + '- Do you want to save <info>'.$frontal |
|
707 | 707 | . '</info> as your <info>frontal</info> address ? (y/N) ', |
708 | 708 | false, '/^(y|Y)/i' |
709 | 709 | ); |
@@ -719,7 +719,7 @@ discard block |
||
719 | 719 | $this->configService->setAppValue(ConfigService::FRONTAL_CLOUD_ID, $cloudId); |
720 | 720 | $this->configService->setAppValue(ConfigService::FRONTAL_CLOUD_PATH, $path); |
721 | 721 | |
722 | - $output->writeln('- Address <info>' . $frontal . '</info> is now used as <info>frontal</info>'); |
|
722 | + $output->writeln('- Address <info>'.$frontal.'</info> is now used as <info>frontal</info>'); |
|
723 | 723 | } |
724 | 724 | |
725 | 725 | /** |
@@ -744,7 +744,7 @@ discard block |
||
744 | 744 | $request->setDataSerialize(new SimpleDataStore(['empty' => 1])); |
745 | 745 | } |
746 | 746 | |
747 | - $output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
747 | + $output->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
748 | 748 | |
749 | 749 | try { |
750 | 750 | $this->doRequest($request); |
@@ -755,7 +755,7 @@ discard block |
||
755 | 755 | $color = 'info'; |
756 | 756 | } |
757 | 757 | |
758 | - $output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>'); |
|
758 | + $output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>'); |
|
759 | 759 | if ($result->getStatusCode() === 200) { |
760 | 760 | return true; |
761 | 761 | } |
@@ -778,7 +778,7 @@ discard block |
||
778 | 778 | |
779 | 779 | $output->writeln(''); |
780 | 780 | $output->writeln( |
781 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
781 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
782 | 782 | ); |
783 | 783 | |
784 | 784 | $helper = $this->getHelper('question'); |
@@ -795,8 +795,8 @@ discard block |
||
795 | 795 | |
796 | 796 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
797 | 797 | $output->writeln( |
798 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
799 | - . $address . '\'</info> stored in database' |
|
798 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
799 | + . $address.'\'</info> stored in database' |
|
800 | 800 | ); |
801 | 801 | } |
802 | 802 | |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | $path = rtrim($path, '/'); |
824 | 824 | |
825 | 825 | if (!is_null($cloudIdPort)) { |
826 | - $cloudId = $cloudId . ':' . $cloudIdPort; |
|
826 | + $cloudId = $cloudId.':'.$cloudIdPort; |
|
827 | 827 | } |
828 | 828 | |
829 | 829 | return [$scheme, $cloudId, $path]; |
@@ -87,7 +87,7 @@ |
||
87 | 87 | 'version' => $this->configService->getAppValue('installed_version'), |
88 | 88 | 'api' => Application::APP_API |
89 | 89 | ]; |
90 | - } catch (UnknownInterfaceException|SignatoryException $e) { |
|
90 | + } catch (UnknownInterfaceException | SignatoryException $e) { |
|
91 | 91 | return $response; |
92 | 92 | } |
93 | 93 |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | $l10n = \OCP\Server::get(IFactory::class)->get('circles'); |
448 | 448 | $display = $l10n->t('%s (Team owned by %s)', [$display, $circle->getOwner()->getDisplayName()]); |
449 | 449 | } else { |
450 | - $display .= ' (' . Circle::$DEF_SOURCE[$circle->getSource()] . ')'; |
|
450 | + $display .= ' ('.Circle::$DEF_SOURCE[$circle->getSource()].')'; |
|
451 | 451 | } |
452 | 452 | |
453 | 453 | $share->setSharedWithDisplayName($display); |
@@ -533,20 +533,20 @@ discard block |
||
533 | 533 | |
534 | 534 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
535 | 535 | $shareTime = new DateTime(); |
536 | - $shareTime->setTimestamp($this->getInt($prefix . 'stime', $data)); |
|
537 | - |
|
538 | - $this->setId($this->get($prefix . 'id', $data)) |
|
539 | - ->setShareType($this->getInt($prefix . 'share_type', $data)) |
|
540 | - ->setPermissions($this->getInt($prefix . 'permissions', $data)) |
|
541 | - ->setItemType($this->get($prefix . 'item_type', $data)) |
|
542 | - ->setItemSource($this->getInt($prefix . 'item_source', $data)) |
|
543 | - ->setItemTarget($this->get($prefix . 'item_target', $data)) |
|
544 | - ->setFileSource($this->getInt($prefix . 'file_source', $data)) |
|
545 | - ->setFileTarget($this->get($prefix . 'file_target', $data)) |
|
546 | - ->setSharedWith($this->get($prefix . 'share_with', $data)) |
|
547 | - ->setSharedBy($this->get($prefix . 'uid_initiator', $data)) |
|
548 | - ->setShareOwner($this->get($prefix . 'uid_owner', $data)) |
|
549 | - ->setToken($this->get($prefix . 'token', $data)) |
|
536 | + $shareTime->setTimestamp($this->getInt($prefix.'stime', $data)); |
|
537 | + |
|
538 | + $this->setId($this->get($prefix.'id', $data)) |
|
539 | + ->setShareType($this->getInt($prefix.'share_type', $data)) |
|
540 | + ->setPermissions($this->getInt($prefix.'permissions', $data)) |
|
541 | + ->setItemType($this->get($prefix.'item_type', $data)) |
|
542 | + ->setItemSource($this->getInt($prefix.'item_source', $data)) |
|
543 | + ->setItemTarget($this->get($prefix.'item_target', $data)) |
|
544 | + ->setFileSource($this->getInt($prefix.'file_source', $data)) |
|
545 | + ->setFileTarget($this->get($prefix.'file_target', $data)) |
|
546 | + ->setSharedWith($this->get($prefix.'share_with', $data)) |
|
547 | + ->setSharedBy($this->get($prefix.'uid_initiator', $data)) |
|
548 | + ->setShareOwner($this->get($prefix.'uid_owner', $data)) |
|
549 | + ->setToken($this->get($prefix.'token', $data)) |
|
550 | 550 | ->setShareTime($shareTime); |
551 | 551 | |
552 | 552 | $this->importAttributesFromDatabase($this->get('attributes', $data)); |
@@ -557,9 +557,9 @@ discard block |
||
557 | 557 | // $share->setPassword($this->get('password', $data, '')); |
558 | 558 | // } |
559 | 559 | |
560 | - $this->setChildId($this->getInt($prefix . 'child_id', $data)) |
|
561 | - ->setChildFileTarget($this->get($prefix . 'child_file_target', $data)) |
|
562 | - ->setChildPermissions($this->getInt($prefix . 'child_permissions', $data)) |
|
560 | + $this->setChildId($this->getInt($prefix.'child_id', $data)) |
|
561 | + ->setChildFileTarget($this->get($prefix.'child_file_target', $data)) |
|
562 | + ->setChildPermissions($this->getInt($prefix.'child_permissions', $data)) |
|
563 | 563 | ->setProviderId(ShareByCircleProvider::IDENTIFIER) |
564 | 564 | ->setStatus(Ishare::STATUS_ACCEPTED); |
565 | 565 |