@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | } catch (Exception $e) { |
| 160 | 160 | if ($this->pOn) { |
| 161 | 161 | $message = ($e->getMessage() !== '') ? $e->getMessage() : get_class($e); |
| 162 | - $this->output->writeln('<error>' . $message . '</error>'); |
|
| 162 | + $this->output->writeln('<error>'.$message.'</error>'); |
|
| 163 | 163 | } else { |
| 164 | 164 | throw $e; |
| 165 | 165 | } |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | */ |
| 244 | 244 | private function loadConfiguration() { |
| 245 | 245 | $this->p('Loading configuration'); |
| 246 | - $configuration = file_get_contents(__DIR__ . '/../../testConfiguration.json'); |
|
| 246 | + $configuration = file_get_contents(__DIR__.'/../../testConfiguration.json'); |
|
| 247 | 247 | $this->config = json_decode($configuration, true); |
| 248 | 248 | $this->r(true, 'testConfiguration.json'); |
| 249 | 249 | |
@@ -276,22 +276,22 @@ discard block |
||
| 276 | 276 | $this->r(); |
| 277 | 277 | |
| 278 | 278 | foreach ($this->getInstances() as $instance) { |
| 279 | - $this->p('Creating users on ' . $instance); |
|
| 279 | + $this->p('Creating users on '.$instance); |
|
| 280 | 280 | foreach ($this->getConfigArray($instance, 'users') as $userId) { |
| 281 | 281 | $this->pm($userId); |
| 282 | 282 | $this->occ( |
| 283 | - $instance, 'user:add --password-from-env ' . $userId, false, false, |
|
| 283 | + $instance, 'user:add --password-from-env '.$userId, false, false, |
|
| 284 | 284 | ['OC_PASS' => 'testtest'] |
| 285 | 285 | ); |
| 286 | 286 | } |
| 287 | 287 | $this->r(); |
| 288 | 288 | |
| 289 | 289 | foreach ($this->getConfigArray($instance, 'groups') as $groupId => $users) { |
| 290 | - $this->p('Creating group <info>' . $groupId . '</info> on <info>' . $instance . '</info>'); |
|
| 291 | - $this->occ($instance, 'group:add ' . $groupId, false, false); |
|
| 290 | + $this->p('Creating group <info>'.$groupId.'</info> on <info>'.$instance.'</info>'); |
|
| 291 | + $this->occ($instance, 'group:add '.$groupId, false, false); |
|
| 292 | 292 | foreach ($users as $userId) { |
| 293 | 293 | $this->pm($userId); |
| 294 | - $this->occ($instance, 'group:adduser ' . $groupId . ' ' . $userId, true, false); |
|
| 294 | + $this->occ($instance, 'group:adduser '.$groupId.' '.$userId, true, false); |
|
| 295 | 295 | } |
| 296 | 296 | $this->r(); |
| 297 | 297 | } |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | foreach ($this->getInstances(true) as $instance) { |
| 327 | 327 | $this->pm($instance); |
| 328 | 328 | foreach ($this->getConfigArray($instance, 'config') as $k => $v) { |
| 329 | - $this->occ($instance, 'config:app:set --value ' . $v . ' circles ' . $k, true, false); |
|
| 329 | + $this->occ($instance, 'config:app:set --value '.$v.' circles '.$k, true, false); |
|
| 330 | 330 | } |
| 331 | 331 | } |
| 332 | 332 | $this->r(); |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | */ |
| 340 | 340 | private function confirmVersion() { |
| 341 | 341 | $version = $this->configService->getAppValue('installed_version'); |
| 342 | - $this->p('Confirming version <info>' . $version . '</info>'); |
|
| 342 | + $this->p('Confirming version <info>'.$version.'</info>'); |
|
| 343 | 343 | foreach ($this->getInstances(false) as $instance) { |
| 344 | 344 | $this->pm($instance); |
| 345 | 345 | $capabilities = $this->occ($instance, 'circles:check --capabilities'); |
@@ -390,12 +390,12 @@ discard block |
||
| 390 | 390 | */ |
| 391 | 391 | private function statusFreshInstances() { |
| 392 | 392 | foreach ($this->getInstances() as $instanceId) { |
| 393 | - $this->p('Circles on ' . $instanceId); |
|
| 393 | + $this->p('Circles on '.$instanceId); |
|
| 394 | 394 | $result = $this->occ($instanceId, 'circles:manage:list --all'); |
| 395 | 395 | $expectedSize = sizeof($this->getConfigArray($instanceId, 'groups')) |
| 396 | 396 | + sizeof($this->getConfigArray($instanceId, 'users')) |
| 397 | 397 | + 1; |
| 398 | - $this->r((sizeof($result) === $expectedSize), sizeof($result) . ' circles'); |
|
| 398 | + $this->r((sizeof($result) === $expectedSize), sizeof($result).' circles'); |
|
| 399 | 399 | |
| 400 | 400 | $membersList = $groupsList = []; |
| 401 | 401 | foreach ($result as $item) { |
@@ -414,12 +414,12 @@ discard block |
||
| 414 | 414 | $instance = $this->getConfig($instanceId, 'config.frontal_cloud_id'); |
| 415 | 415 | |
| 416 | 416 | foreach ($this->getConfigArray($instanceId, 'users') as $userId) { |
| 417 | - $this->p('Checking Single Circle for <comment>' . $userId . '@' . $instance . '</comment>'); |
|
| 417 | + $this->p('Checking Single Circle for <comment>'.$userId.'@'.$instance.'</comment>'); |
|
| 418 | 418 | $circle = $this->getSingleCircleForMember($membersList, $userId, $instance); |
| 419 | 419 | |
| 420 | 420 | $compareToOwnerBasedOn = new Circle(); |
| 421 | 421 | $compareToOwnerBasedOn->setConfig(Circle::CFG_SINGLE) |
| 422 | - ->setName('user:' . $userId . ':{CIRCLEID}') |
|
| 422 | + ->setName('user:'.$userId.':{CIRCLEID}') |
|
| 423 | 423 | ->setDisplayName($userId); |
| 424 | 424 | |
| 425 | 425 | $compareToOwner = new Member(); |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | $compareTo = new Circle(); |
| 438 | 438 | $compareTo->setOwner($compareToOwner) |
| 439 | 439 | ->setConfig(Circle::CFG_SINGLE) |
| 440 | - ->setName('user:' . $userId . ':{CIRCLEID}') |
|
| 440 | + ->setName('user:'.$userId.':{CIRCLEID}') |
|
| 441 | 441 | ->setDisplayName($userId); |
| 442 | 442 | |
| 443 | 443 | $this->confirmCircleData($circle, $compareTo); |
@@ -474,8 +474,8 @@ discard block |
||
| 474 | 474 | $this->r(true, $circle->getSingleId()); |
| 475 | 475 | |
| 476 | 476 | foreach ($this->getConfigArray($instanceId, 'groups') as $groupId => $members) { |
| 477 | - $this->p('Checking Circle for <comment>' . $groupId . '@' . $instance . '</comment>'); |
|
| 478 | - $circle = $this->getCircleFromList($groupsList, 'group:' . $groupId); |
|
| 477 | + $this->p('Checking Circle for <comment>'.$groupId.'@'.$instance.'</comment>'); |
|
| 478 | + $circle = $this->getCircleFromList($groupsList, 'group:'.$groupId); |
|
| 479 | 479 | |
| 480 | 480 | $appCircle = $this->getSingleCircleForMember($membersList, 'circles', $instance); |
| 481 | 481 | $appOwner = $appCircle->getOwner(); |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | $compareTo = new Circle(); |
| 500 | 500 | $compareTo->setOwner($compareToOwner) |
| 501 | 501 | ->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN) |
| 502 | - ->setName('group:' . $groupId) |
|
| 502 | + ->setName('group:'.$groupId) |
|
| 503 | 503 | ->setDisplayName($groupId); |
| 504 | 504 | |
| 505 | 505 | $this->confirmCircleData($circle, $compareTo); |
@@ -516,12 +516,12 @@ discard block |
||
| 516 | 516 | */ |
| 517 | 517 | private function createRemoteLink() { |
| 518 | 518 | foreach ($this->getInstances() as $instanceId) { |
| 519 | - $this->p('Init remote link from ' . $instanceId); |
|
| 519 | + $this->p('Init remote link from '.$instanceId); |
|
| 520 | 520 | $links = $this->getConfigArray($instanceId, 'remote'); |
| 521 | 521 | foreach ($links as $link => $type) { |
| 522 | 522 | $remote = $this->getConfig($link, 'config.frontal_cloud_id'); |
| 523 | - $this->pm($remote . '(' . $type . ')'); |
|
| 524 | - $this->occ($instanceId, 'circles:remote ' . $remote . ' --type ' . $type . ' --yes'); |
|
| 523 | + $this->pm($remote.'('.$type.')'); |
|
| 524 | + $this->occ($instanceId, 'circles:remote '.$remote.' --type '.$type.' --yes'); |
|
| 525 | 525 | } |
| 526 | 526 | $this->r(); |
| 527 | 527 | } |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | private function buildingLocalDatabase() { |
| 536 | 536 | $this->circles = $this->federatedUsers = []; |
| 537 | 537 | foreach ($this->getInstances() as $instanceId) { |
| 538 | - $this->p('Retrieving Circles from ' . $instanceId); |
|
| 538 | + $this->p('Retrieving Circles from '.$instanceId); |
|
| 539 | 539 | $circles = $this->occ($instanceId, 'circles:manage:list --all'); |
| 540 | 540 | foreach ($circles as $item) { |
| 541 | 541 | /** @var Circle $circle */ |
@@ -570,11 +570,11 @@ discard block |
||
| 570 | 570 | $name = self::$TEST_CIRCLES[0]; |
| 571 | 571 | $owner = $this->getInstanceUsers($localInstanceId)[1]; |
| 572 | 572 | $dataCreatedCircle001 = |
| 573 | - $this->occ($localInstanceId, 'circles:manage:create --type user ' . $owner . ' ' . $name); |
|
| 573 | + $this->occ($localInstanceId, 'circles:manage:create --type user '.$owner.' '.$name); |
|
| 574 | 574 | /** @var Circle $createdCircle */ |
| 575 | 575 | $createdCircle = $this->deserialize($dataCreatedCircle001, Circle::class); |
| 576 | 576 | $this->circles[$localInstanceId][$createdCircle->getName()] = $createdCircle; |
| 577 | - $this->r(true, $createdCircle->getSingleId());; |
|
| 577 | + $this->r(true, $createdCircle->getSingleId()); ; |
|
| 578 | 578 | |
| 579 | 579 | $this->p('Comparing data returned at creation'); |
| 580 | 580 | if ($createdCircle->getSingleId() === '' || $createdCircle->getOwner()->getId() === '') { |
@@ -601,7 +601,7 @@ discard block |
||
| 601 | 601 | |
| 602 | 602 | |
| 603 | 603 | $this->p('Comparing local stored data'); |
| 604 | - $dataCircle = $this->occ($localInstanceId, 'circle:manage:details ' . $createdCircle->getSingleId()); |
|
| 604 | + $dataCircle = $this->occ($localInstanceId, 'circle:manage:details '.$createdCircle->getSingleId()); |
|
| 605 | 605 | |
| 606 | 606 | /** @var Circle $tmpCircle */ |
| 607 | 607 | $tmpCircle = $this->deserialize($dataCircle, Circle::class); |
@@ -610,9 +610,9 @@ discard block |
||
| 610 | 610 | |
| 611 | 611 | $links = $this->getConfigArray('global-scale-1', 'remote'); |
| 612 | 612 | foreach ($this->getInstances(false) as $instanceId) { |
| 613 | - $this->p('Comparing data stored on ' . $instanceId); |
|
| 613 | + $this->p('Comparing data stored on '.$instanceId); |
|
| 614 | 614 | $dataCircle = |
| 615 | - $this->occ($instanceId, 'circle:manage:details ' . $createdCircle->getSingleId(), false); |
|
| 615 | + $this->occ($instanceId, 'circle:manage:details '.$createdCircle->getSingleId(), false); |
|
| 616 | 616 | |
| 617 | 617 | if ($instanceId === $localInstanceId || $links[$instanceId] === 'GlobalScale') { |
| 618 | 618 | /** @var Circle $tmpCircle */ |
@@ -646,7 +646,7 @@ discard block |
||
| 646 | 646 | $member = $this->getInstanceUsers($instanceId)[2]; |
| 647 | 647 | |
| 648 | 648 | $addedMember = $this->processMemberAdd($instanceId, $circleName, $member, 'user'); |
| 649 | - $this->r(true, $addedMember->getId());; |
|
| 649 | + $this->r(true, $addedMember->getId()); ; |
|
| 650 | 650 | |
| 651 | 651 | // check test2 |
| 652 | 652 | } |
@@ -664,15 +664,15 @@ discard block |
||
| 664 | 664 | $name = self::$TEST_CIRCLES[0]; |
| 665 | 665 | $circle = $this->getCircleByName($localInstanceId, $name); |
| 666 | 666 | $userId = $this->getInstanceUsers($localInstanceId)[6]; |
| 667 | - $userCircle = $this->getCircleByName($localInstanceId, 'user:' . $userId); |
|
| 667 | + $userCircle = $this->getCircleByName($localInstanceId, 'user:'.$userId); |
|
| 668 | 668 | $user = $userCircle->getOwner(); |
| 669 | 669 | $dataAddedMember = |
| 670 | 670 | $this->occ( |
| 671 | - $localInstanceId, 'circles:members:add ' . $circle->getSingleId() . ' ' . $user->getSingleId() |
|
| 671 | + $localInstanceId, 'circles:members:add '.$circle->getSingleId().' '.$user->getSingleId() |
|
| 672 | 672 | ); |
| 673 | 673 | /** @var Member $addedMember */ |
| 674 | 674 | $addedMember = $this->deserialize($dataAddedMember, Member::class); |
| 675 | - $this->r(true, $addedMember->getId());; |
|
| 675 | + $this->r(true, $addedMember->getId()); ; |
|
| 676 | 676 | |
| 677 | 677 | // check test6 |
| 678 | 678 | } |
@@ -687,15 +687,15 @@ discard block |
||
| 687 | 687 | |
| 688 | 688 | $circle = $this->getCircleByName($localInstanceId, $circleName); |
| 689 | 689 | $userId = $this->getInstanceUsers($localInstanceId)[6]; |
| 690 | - $userCircle = $this->getCircleByName($localInstanceId, 'user:' . $userId); |
|
| 690 | + $userCircle = $this->getCircleByName($localInstanceId, 'user:'.$userId); |
|
| 691 | 691 | $user = $userCircle->getOwner(); |
| 692 | 692 | $dataAddedMember = |
| 693 | 693 | $this->occ( |
| 694 | - $localInstanceId, 'circles:members:add ' . $circle->getSingleId() . ' ' . $user->getSingleId() |
|
| 694 | + $localInstanceId, 'circles:members:add '.$circle->getSingleId().' '.$user->getSingleId() |
|
| 695 | 695 | ); |
| 696 | 696 | /** @var Member $addedMember */ |
| 697 | 697 | $addedMember = $this->deserialize($dataAddedMember, Member::class); |
| 698 | - $this->r(true, $addedMember->getId());; |
|
| 698 | + $this->r(true, $addedMember->getId()); ; |
|
| 699 | 699 | } |
| 700 | 700 | |
| 701 | 701 | private function levelLocalMemberToModerator() { |
@@ -785,13 +785,13 @@ discard block |
||
| 785 | 785 | ]; |
| 786 | 786 | } |
| 787 | 787 | |
| 788 | - $this->compare($compareTo->getSingleId(), $circle->getSingleId(), $prefix . '.id', $params); |
|
| 789 | - $this->compare($compareTo->getName(), $circle->getName(), $prefix . '.name', $params); |
|
| 788 | + $this->compare($compareTo->getSingleId(), $circle->getSingleId(), $prefix.'.id', $params); |
|
| 789 | + $this->compare($compareTo->getName(), $circle->getName(), $prefix.'.name', $params); |
|
| 790 | 790 | $this->compare( |
| 791 | - $compareTo->getDisplayName(), $circle->getDisplayName(), $prefix . '.displayName', $params |
|
| 791 | + $compareTo->getDisplayName(), $circle->getDisplayName(), $prefix.'.displayName', $params |
|
| 792 | 792 | ); |
| 793 | - $this->compareInt($compareTo->getConfig(), $circle->getConfig(), $prefix . '.config', true); |
|
| 794 | - $this->compareInt($compareTo->getSource(), $circle->getSource(), $prefix . '.source'); |
|
| 793 | + $this->compareInt($compareTo->getConfig(), $circle->getConfig(), $prefix.'.config', true); |
|
| 794 | + $this->compareInt($compareTo->getSource(), $circle->getSource(), $prefix.'.source'); |
|
| 795 | 795 | |
| 796 | 796 | if ($compareTo->hasOwner()) { |
| 797 | 797 | $compareToOwner = $compareTo->getOwner(); |
@@ -801,7 +801,7 @@ discard block |
||
| 801 | 801 | throw new Exception('empty owner'); |
| 802 | 802 | } |
| 803 | 803 | if ($owner->getCircleId() !== $circle->getSingleId()) { |
| 804 | - throw new Exception($prefix . '.owner.circleId is different than ' . $prefix . '.id'); |
|
| 804 | + throw new Exception($prefix.'.owner.circleId is different than '.$prefix.'.id'); |
|
| 805 | 805 | } |
| 806 | 806 | $this->confirmMemberData($owner, $compareToOwner, 'owner', false, $params); |
| 807 | 807 | } |
@@ -814,7 +814,7 @@ discard block |
||
| 814 | 814 | } |
| 815 | 815 | $initiator = $circle->getInitiator(); |
| 816 | 816 | if ($initiator->getCircleId() !== $circle->getSingleId()) { |
| 817 | - throw new Exception($prefix . '.initiator.circleId is different than ' . $prefix . '.id'); |
|
| 817 | + throw new Exception($prefix.'.initiator.circleId is different than '.$prefix.'.id'); |
|
| 818 | 818 | } |
| 819 | 819 | $this->confirmMemberData($initiator, $compareToInitiator, 'owner', false, $params); |
| 820 | 820 | } |
@@ -841,27 +841,27 @@ discard block |
||
| 841 | 841 | bool $versa = false, |
| 842 | 842 | array $params = [] |
| 843 | 843 | ) { |
| 844 | - $this->compare($compareTo->getId(), $member->getId(), $prefix . '.id', $params); |
|
| 845 | - $this->compare($compareTo->getCircleId(), $member->getCircleId(), $prefix . '.circleId', $params); |
|
| 846 | - $this->compare($compareTo->getSingleId(), $member->getSingleId(), $prefix . '.singleId', $params); |
|
| 847 | - $this->compare($compareTo->getUserId(), $member->getUserId(), $prefix . '.userId', $params); |
|
| 844 | + $this->compare($compareTo->getId(), $member->getId(), $prefix.'.id', $params); |
|
| 845 | + $this->compare($compareTo->getCircleId(), $member->getCircleId(), $prefix.'.circleId', $params); |
|
| 846 | + $this->compare($compareTo->getSingleId(), $member->getSingleId(), $prefix.'.singleId', $params); |
|
| 847 | + $this->compare($compareTo->getUserId(), $member->getUserId(), $prefix.'.userId', $params); |
|
| 848 | 848 | $this->compare( |
| 849 | - $compareTo->getDisplayName(), $member->getDisplayName(), $prefix . '.displayName', $params |
|
| 849 | + $compareTo->getDisplayName(), $member->getDisplayName(), $prefix.'.displayName', $params |
|
| 850 | 850 | ); |
| 851 | - $this->compareInt($compareTo->getUserType(), $member->getUserType(), $prefix . '.userType'); |
|
| 852 | - $this->compare($compareTo->getInstance(), $member->getInstance(), $prefix . '.instance', $params); |
|
| 853 | - $this->compareInt($compareTo->getLevel(), $member->getLevel(), $prefix . '.level', true); |
|
| 854 | - $this->compare($compareTo->getStatus(), $member->getStatus(), $prefix . '.status', $params); |
|
| 851 | + $this->compareInt($compareTo->getUserType(), $member->getUserType(), $prefix.'.userType'); |
|
| 852 | + $this->compare($compareTo->getInstance(), $member->getInstance(), $prefix.'.instance', $params); |
|
| 853 | + $this->compareInt($compareTo->getLevel(), $member->getLevel(), $prefix.'.level', true); |
|
| 854 | + $this->compare($compareTo->getStatus(), $member->getStatus(), $prefix.'.status', $params); |
|
| 855 | 855 | |
| 856 | 856 | if ($compareTo->hasBasedOn()) { |
| 857 | 857 | if (!$member->hasBasedOn()) { |
| 858 | - throw new Exception('empty ' . $prefix . '.basedOn'); |
|
| 858 | + throw new Exception('empty '.$prefix.'.basedOn'); |
|
| 859 | 859 | } |
| 860 | 860 | $basedOn = $member->getBasedOn(); |
| 861 | 861 | $this->confirmCircleData( |
| 862 | 862 | $basedOn, |
| 863 | 863 | $compareTo->getBasedOn(), |
| 864 | - $prefix . '.basedOn', |
|
| 864 | + $prefix.'.basedOn', |
|
| 865 | 865 | false, |
| 866 | 866 | $params |
| 867 | 867 | ); |
@@ -880,7 +880,7 @@ discard block |
||
| 880 | 880 | private function compare(string $expected, string $compare, string $def, array $params) { |
| 881 | 881 | if ($expected !== '' |
| 882 | 882 | && $this->feedStringWithParams($expected, $params) !== $compare) { |
| 883 | - throw new Exception($def . ': ' . $compare . ' (' . $expected . ')'); |
|
| 883 | + throw new Exception($def.': '.$compare.' ('.$expected.')'); |
|
| 884 | 884 | } |
| 885 | 885 | } |
| 886 | 886 | |
@@ -896,7 +896,7 @@ discard block |
||
| 896 | 896 | private function compareInt(int $expected, int $compare, string $def, bool $force = false) { |
| 897 | 897 | if (($expected > 0 || ($force && $expected >= 0)) |
| 898 | 898 | && $expected !== $compare) { |
| 899 | - throw new Exception('wrong ' . $def . ': ' . $compare . ' (' . $expected . ')'); |
|
| 899 | + throw new Exception('wrong '.$def.': '.$compare.' ('.$expected.')'); |
|
| 900 | 900 | } |
| 901 | 901 | } |
| 902 | 902 | |
@@ -932,7 +932,7 @@ discard block |
||
| 932 | 932 | } |
| 933 | 933 | } |
| 934 | 934 | |
| 935 | - throw new CircleNotFoundException('cannot find ' . $userId . ' in the list of Single Circle'); |
|
| 935 | + throw new CircleNotFoundException('cannot find '.$userId.' in the list of Single Circle'); |
|
| 936 | 936 | } |
| 937 | 937 | |
| 938 | 938 | |
@@ -950,7 +950,7 @@ discard block |
||
| 950 | 950 | } |
| 951 | 951 | |
| 952 | 952 | throw new CircleNotFoundException( |
| 953 | - 'cannot extract \'' . $name . '\' from the list of generated Circles' |
|
| 953 | + 'cannot extract \''.$name.'\' from the list of generated Circles' |
|
| 954 | 954 | ); |
| 955 | 955 | } |
| 956 | 956 | |
@@ -970,7 +970,7 @@ discard block |
||
| 970 | 970 | } |
| 971 | 971 | |
| 972 | 972 | throw new CircleNotFoundException( |
| 973 | - 'cannot extract \'' . $name . '\' from the list of provided Circles' |
|
| 973 | + 'cannot extract \''.$name.'\' from the list of provided Circles' |
|
| 974 | 974 | ); |
| 975 | 975 | } |
| 976 | 976 | |
@@ -1015,7 +1015,7 @@ discard block |
||
| 1015 | 1015 | } |
| 1016 | 1016 | } |
| 1017 | 1017 | |
| 1018 | - throw new ItemNotFoundException($instance . ' not found'); |
|
| 1018 | + throw new ItemNotFoundException($instance.' not found'); |
|
| 1019 | 1019 | } |
| 1020 | 1020 | |
| 1021 | 1021 | |
@@ -1050,7 +1050,7 @@ discard block |
||
| 1050 | 1050 | ): ?array { |
| 1051 | 1051 | $configInstance = $this->getConfigInstance($instance); |
| 1052 | 1052 | $path = $this->get('path', $configInstance); |
| 1053 | - $occ = rtrim($path, '/') . '/occ'; |
|
| 1053 | + $occ = rtrim($path, '/').'/occ'; |
|
| 1054 | 1054 | |
| 1055 | 1055 | $command = array_merge([$occ], explode(' ', $cmd)); |
| 1056 | 1056 | if ($jsonAsOutput) { |
@@ -1060,7 +1060,7 @@ discard block |
||
| 1060 | 1060 | $process->run(null, $env); |
| 1061 | 1061 | |
| 1062 | 1062 | if ($exceptionOnFail && !$process->isSuccessful()) { |
| 1063 | - throw new Exception(implode(' ', $command) . ' failed'); |
|
| 1063 | + throw new Exception(implode(' ', $command).' failed'); |
|
| 1064 | 1064 | } |
| 1065 | 1065 | |
| 1066 | 1066 | $output = json_decode($process->getOutput(), true); |
@@ -1083,7 +1083,7 @@ discard block |
||
| 1083 | 1083 | */ |
| 1084 | 1084 | private function t(string $title): void { |
| 1085 | 1085 | $this->output->writeln(''); |
| 1086 | - $this->output->writeln('<comment>### ' . $title . '</comment>'); |
|
| 1086 | + $this->output->writeln('<comment>### '.$title.'</comment>'); |
|
| 1087 | 1087 | $this->output->writeln(''); |
| 1088 | 1088 | } |
| 1089 | 1089 | |
@@ -1092,14 +1092,14 @@ discard block |
||
| 1092 | 1092 | */ |
| 1093 | 1093 | private function p(string $processing): void { |
| 1094 | 1094 | $this->pOn = true; |
| 1095 | - $this->output->write('- ' . $processing . ': '); |
|
| 1095 | + $this->output->write('- '.$processing.': '); |
|
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | 1098 | /** |
| 1099 | 1099 | * @param string $more |
| 1100 | 1100 | */ |
| 1101 | 1101 | private function pm(string $more): void { |
| 1102 | - $this->output->write($more . ' '); |
|
| 1102 | + $this->output->write($more.' '); |
|
| 1103 | 1103 | } |
| 1104 | 1104 | |
| 1105 | 1105 | /** |
@@ -1109,9 +1109,9 @@ discard block |
||
| 1109 | 1109 | private function r(bool $result = true, string $info = ''): void { |
| 1110 | 1110 | $this->pOn = false; |
| 1111 | 1111 | if ($result) { |
| 1112 | - $this->output->writeln('<info>' . (($info !== '') ? $info : 'done') . '</info>'); |
|
| 1112 | + $this->output->writeln('<info>'.(($info !== '') ? $info : 'done').'</info>'); |
|
| 1113 | 1113 | } else { |
| 1114 | - $this->output->writeln('<error>' . (($info !== '') ? $info : 'done') . '</error>'); |
|
| 1114 | + $this->output->writeln('<error>'.(($info !== '') ? $info : 'done').'</error>'); |
|
| 1115 | 1115 | } |
| 1116 | 1116 | } |
| 1117 | 1117 | |
@@ -1133,16 +1133,16 @@ discard block |
||
| 1133 | 1133 | $dataAddedMember = |
| 1134 | 1134 | $this->occ( |
| 1135 | 1135 | $instanceId, |
| 1136 | - 'circles:members:add ' . $circle->getSingleId() . ' ' . $userId . ' --type ' . $type |
|
| 1136 | + 'circles:members:add '.$circle->getSingleId().' '.$userId.' --type '.$type |
|
| 1137 | 1137 | ); |
| 1138 | 1138 | /** @var Member $addedMember */ |
| 1139 | 1139 | $addedMember = $this->deserialize($dataAddedMember, Member::class); |
| 1140 | 1140 | |
| 1141 | 1141 | |
| 1142 | - echo 'ADDEDMEMBER: ' . json_encode($addedMember, JSON_PRETTY_PRINT) . "\n"; |
|
| 1142 | + echo 'ADDEDMEMBER: '.json_encode($addedMember, JSON_PRETTY_PRINT)."\n"; |
|
| 1143 | 1143 | |
| 1144 | 1144 | $federatedUser = $this->federatedUsers[$instanceId][$userId]; |
| 1145 | - echo 'FEDERATEDUER: ' . json_encode($federatedUser, JSON_PRETTY_PRINT) . "\n"; |
|
| 1145 | + echo 'FEDERATEDUER: '.json_encode($federatedUser, JSON_PRETTY_PRINT)."\n"; |
|
| 1146 | 1146 | |
| 1147 | 1147 | return $addedMember; |
| 1148 | 1148 | } |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | $qb = $this->getQueryBuilder(); |
| 78 | 78 | $qb->generateSelect(self::TABLE_CIRCLE, self::$tables[self::TABLE_CIRCLE], $alias, true) |
| 79 | 79 | ->generateGroupBy(self::$tables[self::TABLE_CIRCLE], $alias) |
| 80 | - ->orderBy($alias . '.creation', 'asc'); |
|
| 80 | + ->orderBy($alias.'.creation', 'asc'); |
|
| 81 | 81 | |
| 82 | 82 | return $qb; |
| 83 | 83 | } |
@@ -182,10 +182,10 @@ discard block |
||
| 182 | 182 | $qb->leftJoin( |
| 183 | 183 | CoreQueryBuilder::REMOTE, self::TABLE_MEMBER, $aliasMember, |
| 184 | 184 | $expr->andX( |
| 185 | - $expr->eq($aliasMember . '.circle_id', $qb->createNamedParameter($circle->getSingleId())), |
|
| 186 | - $expr->eq($aliasMember . '.instance', CoreQueryBuilder::REMOTE . '.instance'), |
|
| 185 | + $expr->eq($aliasMember.'.circle_id', $qb->createNamedParameter($circle->getSingleId())), |
|
| 186 | + $expr->eq($aliasMember.'.instance', CoreQueryBuilder::REMOTE.'.instance'), |
|
| 187 | 187 | $expr->gte( |
| 188 | - $aliasMember . '.level', |
|
| 188 | + $aliasMember.'.level', |
|
| 189 | 189 | $qb->createNamedParameter(Member::LEVEL_MEMBER, IQueryBuilder::PARAM_INT) |
| 190 | 190 | ) |
| 191 | 191 | ) |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | |
| 194 | 194 | $external = $expr->andX(); |
| 195 | 195 | $external->add($qb->exprLimitToDBField('type', RemoteInstance::TYPE_EXTERNAL, true, false)); |
| 196 | - $external->add($expr->isNotNull($aliasMember . '.instance')); |
|
| 196 | + $external->add($expr->isNotNull($aliasMember.'.instance')); |
|
| 197 | 197 | $orX->add($external); |
| 198 | 198 | } |
| 199 | 199 | |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | CoreQueryBuilder::MEMBER |
| 90 | 90 | ) |
| 91 | 91 | ->generateGroupBy(self::$tables[self::TABLE_MEMBER], CoreQueryBuilder::MEMBER) |
| 92 | - ->orderBy(CoreQueryBuilder::MEMBER . '.joined'); |
|
| 92 | + ->orderBy(CoreQueryBuilder::MEMBER.'.joined'); |
|
| 93 | 93 | |
| 94 | 94 | if ($getBasedOn) { |
| 95 | 95 | $qb->leftJoinBasedOn(CoreQueryBuilder::MEMBER, $initiator); |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | * @return string[] |
| 219 | 219 | */ |
| 220 | 220 | public function fillCommandList(string $source, string $field): array { |
| 221 | - echo $source . ' ' . $field . "\n"; |
|
| 221 | + echo $source.' '.$field."\n"; |
|
| 222 | 222 | |
| 223 | 223 | return ['abcd', 'abdde', 'erfg']; |
| 224 | 224 | } |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | * @return string |
| 395 | 395 | */ |
| 396 | 396 | private function obfuscateId(string $id): string { |
| 397 | - return substr($id, 0, 5) . '.' . md5(substr($id, 5)); |
|
| 397 | + return substr($id, 0, 5).'.'.md5(substr($id, 5)); |
|
| 398 | 398 | } |
| 399 | 399 | |
| 400 | 400 | |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | */ |
| 404 | 404 | public function onNewPrompt(NC22InteractiveShellSession $session): void { |
| 405 | 405 | $prompt = |
| 406 | - 'Circles Report [<info>' . $this->report->getSource() . '</info>]:<comment>%PATH%</comment>'; |
|
| 406 | + 'Circles Report [<info>'.$this->report->getSource().'</info>]:<comment>%PATH%</comment>'; |
|
| 407 | 407 | |
| 408 | 408 | $commands = []; |
| 409 | 409 | if ($session->getData()->g('currentStatus') === 'write') { |
@@ -230,13 +230,13 @@ |
||
| 230 | 230 | throw new UnknownInterfaceException('misconfigured scheme'); |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | - $base = $scheme . '://' . $this->getCloudInstance(); |
|
| 233 | + $base = $scheme.'://'.$this->getCloudInstance(); |
|
| 234 | 234 | |
| 235 | 235 | if ($route === '') { |
| 236 | 236 | return $base; |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | - return $base . $this->urlGenerator->linkToRoute($route, $args); |
|
| 239 | + return $base.$this->urlGenerator->linkToRoute($route, $args); |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | |
@@ -315,7 +315,7 @@ |
||
| 315 | 315 | public function getCachedRemoteInstance(string $instance): RemoteInstance { |
| 316 | 316 | $remoteInstance = $this->remoteRequest->getFromInstance($instance); |
| 317 | 317 | if ($remoteInstance->getType() === RemoteInstance::TYPE_UNKNOWN) { |
| 318 | - throw new UnknownRemoteException($instance . ' is set as \'unknown\' in database'); |
|
| 318 | + throw new UnknownRemoteException($instance.' is set as \'unknown\' in database'); |
|
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | return $remoteInstance; |
@@ -176,19 +176,19 @@ discard block |
||
| 176 | 176 | |
| 177 | 177 | $webfinger = $this->getWebfinger($host, Application::APP_SUBJECT); |
| 178 | 178 | if ($this->input->getOption('all')) { |
| 179 | - $this->output->writeln('- Webfinger on <info>' . $host . '</info>'); |
|
| 179 | + $this->output->writeln('- Webfinger on <info>'.$host.'</info>'); |
|
| 180 | 180 | $this->output->writeln(json_encode($webfinger, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 181 | 181 | $this->output->writeln(''); |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | if ($this->input->getOption('all')) { |
| 185 | 185 | $circleLink = $this->extractLink(Application::APP_REL, $webfinger); |
| 186 | - $this->output->writeln('- Information about Circles app on <info>' . $host . '</info>'); |
|
| 186 | + $this->output->writeln('- Information about Circles app on <info>'.$host.'</info>'); |
|
| 187 | 187 | $this->output->writeln(json_encode($circleLink, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 188 | 188 | $this->output->writeln(''); |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | - $this->output->writeln('- Available services on <info>' . $host . '</info>'); |
|
| 191 | + $this->output->writeln('- Available services on <info>'.$host.'</info>'); |
|
| 192 | 192 | foreach ($webfinger->getLinks() as $link) { |
| 193 | 193 | $app = $link->getProperty('name'); |
| 194 | 194 | $ver = $link->getProperty('version'); |
@@ -196,14 +196,14 @@ discard block |
||
| 196 | 196 | $app .= ' '; |
| 197 | 197 | } |
| 198 | 198 | if ($ver !== '') { |
| 199 | - $ver = 'v' . $ver; |
|
| 199 | + $ver = 'v'.$ver; |
|
| 200 | 200 | } |
| 201 | 201 | |
| 202 | - $this->output->writeln(' * ' . $link->getRel() . ' ' . $app . $ver); |
|
| 202 | + $this->output->writeln(' * '.$link->getRel().' '.$app.$ver); |
|
| 203 | 203 | } |
| 204 | 204 | $this->output->writeln(''); |
| 205 | 205 | |
| 206 | - $this->output->writeln('- Resources related to Circles on <info>' . $host . '</info>'); |
|
| 206 | + $this->output->writeln('- Resources related to Circles on <info>'.$host.'</info>'); |
|
| 207 | 207 | $resource = $this->getResourceData($host, Application::APP_SUBJECT, Application::APP_REL); |
| 208 | 208 | $this->output->writeln(json_encode($resource, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 209 | 209 | $this->output->writeln(''); |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | $tempUid = $resource->g('uid'); |
| 213 | 213 | $this->output->writeln( |
| 214 | - '- Confirming UID=' . $tempUid . ' from parsed Signatory at <info>' . $host . '</info>' |
|
| 214 | + '- Confirming UID='.$tempUid.' from parsed Signatory at <info>'.$host.'</info>' |
|
| 215 | 215 | ); |
| 216 | 216 | |
| 217 | 217 | try { |
@@ -219,15 +219,15 @@ discard block |
||
| 219 | 219 | $this->output->writeln(' * No SignatureException: <info>Identity authed</info>'); |
| 220 | 220 | } catch (SignatureException $e) { |
| 221 | 221 | $this->output->writeln( |
| 222 | - '<error>' . $host . ' cannot auth its identity: ' . $e->getMessage() . '</error>' |
|
| 222 | + '<error>'.$host.' cannot auth its identity: '.$e->getMessage().'</error>' |
|
| 223 | 223 | ); |
| 224 | 224 | |
| 225 | 225 | return; |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | - $this->output->writeln(' * Found <info>' . $remoteSignatory->getUid() . '</info>'); |
|
| 228 | + $this->output->writeln(' * Found <info>'.$remoteSignatory->getUid().'</info>'); |
|
| 229 | 229 | if ($remoteSignatory->getUid(true) !== $tempUid) { |
| 230 | - $this->output->writeln('<error>looks like ' . $host . ' is faking its identity'); |
|
| 230 | + $this->output->writeln('<error>looks like '.$host.' is faking its identity'); |
|
| 231 | 231 | |
| 232 | 232 | return; |
| 233 | 233 | } |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | $this->output->writeln(''); |
| 236 | 236 | |
| 237 | 237 | $testUrl = $resource->g('test'); |
| 238 | - $this->output->writeln('- Testing signed payload on <info>' . $testUrl . '</info>'); |
|
| 238 | + $this->output->writeln('- Testing signed payload on <info>'.$testUrl.'</info>'); |
|
| 239 | 239 | |
| 240 | 240 | try { |
| 241 | 241 | $localSignatory = $this->remoteStreamService->getAppSignatory(); |
@@ -257,18 +257,18 @@ discard block |
||
| 257 | 257 | $this->output->writeln(''); |
| 258 | 258 | |
| 259 | 259 | $this->output->writeln(' * Clear Signature: '); |
| 260 | - $this->output->writeln('<comment>' . $signedRequest->getClearSignature() . '</comment>'); |
|
| 260 | + $this->output->writeln('<comment>'.$signedRequest->getClearSignature().'</comment>'); |
|
| 261 | 261 | $this->output->writeln(''); |
| 262 | 262 | |
| 263 | 263 | $this->output->writeln(' * Signed Signature (base64 encoded): '); |
| 264 | 264 | $this->output->writeln( |
| 265 | - '<comment>' . base64_encode($signedRequest->getSignedSignature()) . '</comment>' |
|
| 265 | + '<comment>'.base64_encode($signedRequest->getSignedSignature()).'</comment>' |
|
| 266 | 266 | ); |
| 267 | 267 | $this->output->writeln(''); |
| 268 | 268 | |
| 269 | 269 | $result = $signedRequest->getOutgoingRequest()->getResult(); |
| 270 | 270 | $code = $result->getStatusCode(); |
| 271 | - $this->output->writeln(' * Result: ' . (($code === 200) ? '<info>' . $code . '</info>' : $code)); |
|
| 271 | + $this->output->writeln(' * Result: '.(($code === 200) ? '<info>'.$code.'</info>' : $code)); |
|
| 272 | 272 | $this->output->writeln( |
| 273 | 273 | json_encode(json_decode($result->getContent(), true), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) |
| 274 | 274 | ); |
@@ -290,13 +290,13 @@ discard block |
||
| 290 | 290 | $stored = new RemoteInstance(); |
| 291 | 291 | $this->remoteStreamService->confirmValidRemote($remoteSignatory, $stored); |
| 292 | 292 | $this->output->writeln( |
| 293 | - '<info>The remote instance ' . $host |
|
| 293 | + '<info>The remote instance '.$host |
|
| 294 | 294 | . ' is already known with this current identity</info>' |
| 295 | 295 | ); |
| 296 | 296 | |
| 297 | 297 | if ($remoteSignatory->getType() !== $stored->getType()) { |
| 298 | 298 | $this->output->writeln( |
| 299 | - '- updating type from ' . $stored->getType() . ' to ' |
|
| 299 | + '- updating type from '.$stored->getType().' to ' |
|
| 300 | 300 | . $remoteSignatory->getType() |
| 301 | 301 | ); |
| 302 | 302 | $this->remoteStreamService->update( |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | |
| 307 | 307 | if ($remoteSignatory->getInstance() !== $stored->getInstance()) { |
| 308 | 308 | $this->output->writeln( |
| 309 | - '- updating host from ' . $stored->getInstance() . ' to ' |
|
| 309 | + '- updating host from '.$stored->getInstance().' to ' |
|
| 310 | 310 | . $remoteSignatory->getInstance() |
| 311 | 311 | ); |
| 312 | 312 | $this->remoteStreamService->update( |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | } |
| 316 | 316 | if ($remoteSignatory->getId() !== $stored->getId()) { |
| 317 | 317 | $this->output->writeln( |
| 318 | - '- updating href/Id from ' . $stored->getId() . ' to ' |
|
| 318 | + '- updating href/Id from '.$stored->getId().' to ' |
|
| 319 | 319 | . $remoteSignatory->getId() |
| 320 | 320 | ); |
| 321 | 321 | $this->remoteStreamService->update($remoteSignatory, RemoteStreamService::UPDATE_HREF); |
@@ -341,10 +341,10 @@ discard block |
||
| 341 | 341 | $helper = $this->getHelper('question'); |
| 342 | 342 | |
| 343 | 343 | $this->output->writeln( |
| 344 | - 'The remote instance <info>' . $remoteSignatory->getInstance() . '</info> looks good.' |
|
| 344 | + 'The remote instance <info>'.$remoteSignatory->getInstance().'</info> looks good.' |
|
| 345 | 345 | ); |
| 346 | 346 | $question = new ConfirmationQuestion( |
| 347 | - 'Would you like to identify this remote instance as \'<comment>' . $remoteSignatory->getType() |
|
| 347 | + 'Would you like to identify this remote instance as \'<comment>'.$remoteSignatory->getType() |
|
| 348 | 348 | . '</comment>\' using interface \'<comment>' |
| 349 | 349 | . InterfaceService::$LIST_IFACE[$remoteSignatory->getInterface()] |
| 350 | 350 | . '</comment>\' ? (y/N) ', |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | $helper = $this->getHelper('question'); |
| 370 | 370 | |
| 371 | 371 | $this->output->writeln( |
| 372 | - 'The remote instance <info>' . $remoteSignatory->getInstance() |
|
| 372 | + 'The remote instance <info>'.$remoteSignatory->getInstance() |
|
| 373 | 373 | . '</info> is known but <error>its identity has changed.</error>' |
| 374 | 374 | ); |
| 375 | 375 | $this->output->writeln( |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | return; |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | - $this->output->write('Adding <comment>' . $instance . '</comment>: '); |
|
| 450 | + $this->output->write('Adding <comment>'.$instance.'</comment>: '); |
|
| 451 | 451 | try { |
| 452 | 452 | $this->remoteStreamService->addRemoteInstance( |
| 453 | 453 | $instance, |
@@ -457,8 +457,8 @@ discard block |
||
| 457 | 457 | ); |
| 458 | 458 | $this->output->writeln('<info>ok</info>'); |
| 459 | 459 | } catch (Exception $e) { |
| 460 | - $msg = ($e->getMessage() === '') ? '' : ' (' . $e->getMessage() . ')'; |
|
| 461 | - $this->output->writeln('<error>' . get_class($e) . $msg . '</error>'); |
|
| 460 | + $msg = ($e->getMessage() === '') ? '' : ' ('.$e->getMessage().')'; |
|
| 461 | + $this->output->writeln('<error>'.get_class($e).$msg.'</error>'); |
|
| 462 | 462 | } |
| 463 | 463 | } |
| 464 | 464 | |
@@ -476,12 +476,12 @@ discard block |
||
| 476 | 476 | try { |
| 477 | 477 | $current = $this->remoteStreamService->retrieveRemoteInstance($instance->getInstance()); |
| 478 | 478 | if ($current->getUid(true) === $instance->getUid(true)) { |
| 479 | - $currentUid = '<info>' . $current->getUid(true) . '</info>'; |
|
| 479 | + $currentUid = '<info>'.$current->getUid(true).'</info>'; |
|
| 480 | 480 | } else { |
| 481 | - $currentUid = '<error>' . $current->getUid(true) . '</error>'; |
|
| 481 | + $currentUid = '<error>'.$current->getUid(true).'</error>'; |
|
| 482 | 482 | } |
| 483 | 483 | } catch (Exception $e) { |
| 484 | - $currentUid = '<error>' . $e->getMessage() . '</error>'; |
|
| 484 | + $currentUid = '<error>'.$e->getMessage().'</error>'; |
|
| 485 | 485 | } |
| 486 | 486 | |
| 487 | 487 | $table->appendRow( |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | } |
| 508 | 508 | } |
| 509 | 509 | |
| 510 | - throw new Exception('Unknown type: ' . implode(', ', RemoteInstance::$LIST_TYPE)); |
|
| 510 | + throw new Exception('Unknown type: '.implode(', ', RemoteInstance::$LIST_TYPE)); |
|
| 511 | 511 | } |
| 512 | 512 | |
| 513 | 513 | /** |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | } |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | - throw new Exception('Unknown interface: ' . implode(', ', InterfaceService::$LIST_IFACE)); |
|
| 523 | + throw new Exception('Unknown interface: '.implode(', ', InterfaceService::$LIST_IFACE)); |
|
| 524 | 524 | } |
| 525 | 525 | |
| 526 | 526 | } |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | throw new Exception('Please specify a --type for the test'); |
| 174 | 174 | } |
| 175 | 175 | if ($test !== '' && !in_array($type, self::$checks)) { |
| 176 | - throw new Exception('Unknown type: ' . implode(', ', self::$checks)); |
|
| 176 | + throw new Exception('Unknown type: '.implode(', ', self::$checks)); |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | // $this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test); |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | $output->writeln(''); |
| 281 | - $output->writeln('* testing current address: ' . $test); |
|
| 281 | + $output->writeln('* testing current address: '.$test); |
|
| 282 | 282 | |
| 283 | 283 | try { |
| 284 | 284 | $this->setupLoopback($input, $output, $test); |
@@ -314,8 +314,8 @@ discard block |
||
| 314 | 314 | continue; |
| 315 | 315 | } |
| 316 | 316 | |
| 317 | - $loopback = $scheme . '://' . $cloudId; |
|
| 318 | - $output->write('* testing address: ' . $loopback . ' '); |
|
| 317 | + $loopback = $scheme.'://'.$cloudId; |
|
| 318 | + $output->write('* testing address: '.$loopback.' '); |
|
| 319 | 319 | |
| 320 | 320 | if ($this->testLoopback($input, $output, $loopback)) { |
| 321 | 321 | $output->writeln('* <info>Loopback</info> address looks good'); |
@@ -385,9 +385,9 @@ discard block |
||
| 385 | 385 | $test = new FederatedEvent(LoopbackTest::class); |
| 386 | 386 | $this->federatedEventService->newEvent($test); |
| 387 | 387 | |
| 388 | - $output->writeln('<info>' . $test->getWrapperToken() . '</info>'); |
|
| 388 | + $output->writeln('<info>'.$test->getWrapperToken().'</info>'); |
|
| 389 | 389 | |
| 390 | - $output->writeln('- Waiting for async process to finish (' . $this->delay . 's)'); |
|
| 390 | + $output->writeln('- Waiting for async process to finish ('.$this->delay.'s)'); |
|
| 391 | 391 | sleep($this->delay); |
| 392 | 392 | |
| 393 | 393 | $output->write('- Checking status on FederatedEvent '); |
@@ -401,18 +401,18 @@ discard block |
||
| 401 | 401 | |
| 402 | 402 | $checkVerify = $wrapper->getEvent()->getData()->gInt('verify'); |
| 403 | 403 | if ($checkVerify === LoopbackTest::VERIFY) { |
| 404 | - $output->write('<info>verify=' . $checkVerify . '</info> '); |
|
| 404 | + $output->write('<info>verify='.$checkVerify.'</info> '); |
|
| 405 | 405 | } else { |
| 406 | - $output->writeln('<error>verify=' . $checkVerify . '</error>'); |
|
| 406 | + $output->writeln('<error>verify='.$checkVerify.'</error>'); |
|
| 407 | 407 | |
| 408 | 408 | return false; |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | 411 | $checkManage = $wrapper->getResult()->gInt('manage'); |
| 412 | 412 | if ($checkManage === LoopbackTest::MANAGE) { |
| 413 | - $output->write('<info>manage=' . $checkManage . '</info> '); |
|
| 413 | + $output->write('<info>manage='.$checkManage.'</info> '); |
|
| 414 | 414 | } else { |
| 415 | - $output->writeln('<error>manage=' . $checkManage . '</error>'); |
|
| 415 | + $output->writeln('<error>manage='.$checkManage.'</error>'); |
|
| 416 | 416 | |
| 417 | 417 | return false; |
| 418 | 418 | } |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | [$scheme, $cloudId] = $this->parseAddress($loopback); |
| 435 | 435 | |
| 436 | 436 | $question = new ConfirmationQuestion( |
| 437 | - '- Do you want to save <info>'. $loopback . '</info> as your <info>loopback</info> address ? (y/N) ', false, '/^(y|Y)/i' |
|
| 437 | + '- Do you want to save <info>'.$loopback.'</info> as your <info>loopback</info> address ? (y/N) ', false, '/^(y|Y)/i' |
|
| 438 | 438 | ); |
| 439 | 439 | |
| 440 | 440 | $helper = $this->getHelper('question'); |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_SCHEME, $scheme); |
| 448 | 448 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId); |
| 449 | 449 | $output->writeln( |
| 450 | - '- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>' |
|
| 450 | + '- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>' |
|
| 451 | 451 | ); |
| 452 | 452 | |
| 453 | 453 | } |
@@ -518,7 +518,7 @@ discard block |
||
| 518 | 518 | continue; |
| 519 | 519 | } |
| 520 | 520 | |
| 521 | - $frontal = $scheme . '://' . $cloudId; |
|
| 521 | + $frontal = $scheme.'://'.$cloudId; |
|
| 522 | 522 | break; |
| 523 | 523 | } |
| 524 | 524 | |
@@ -532,13 +532,13 @@ discard block |
||
| 532 | 532 | 'You will need to run this <info>curl</info> command from a remote terminal and paste its result: ' |
| 533 | 533 | ); |
| 534 | 534 | $output->writeln( |
| 535 | - ' curl ' . $frontal . '/.well-known/webfinger?resource=http://nextcloud.com/' |
|
| 535 | + ' curl '.$frontal.'/.well-known/webfinger?resource=http://nextcloud.com/' |
|
| 536 | 536 | ); |
| 537 | 537 | |
| 538 | 538 | $question = new Question('result: ', ''); |
| 539 | 539 | $pasteWebfinger = $helper->ask($input, $output, $question); |
| 540 | 540 | |
| 541 | - echo '__ ' . $pasteWebfinger; |
|
| 541 | + echo '__ '.$pasteWebfinger; |
|
| 542 | 542 | |
| 543 | 543 | $output->writeln('TESTING !!'); |
| 544 | 544 | $output->writeln('TESTING !!'); |
@@ -661,7 +661,7 @@ discard block |
||
| 661 | 661 | $this->configService->configureLoopbackRequest($request, $route, $args); |
| 662 | 662 | $request->setFollowLocation(false); |
| 663 | 663 | |
| 664 | - $output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
| 664 | + $output->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
| 665 | 665 | |
| 666 | 666 | try { |
| 667 | 667 | $this->doRequest($request); |
@@ -672,7 +672,7 @@ discard block |
||
| 672 | 672 | $color = 'info'; |
| 673 | 673 | } |
| 674 | 674 | |
| 675 | - $output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>'); |
|
| 675 | + $output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>'); |
|
| 676 | 676 | if ($result->getStatusCode() === 200) { |
| 677 | 677 | return true; |
| 678 | 678 | } |
@@ -696,7 +696,7 @@ discard block |
||
| 696 | 696 | |
| 697 | 697 | $output->writeln(''); |
| 698 | 698 | $output->writeln( |
| 699 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
| 699 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
| 700 | 700 | ); |
| 701 | 701 | |
| 702 | 702 | $helper = $this->getHelper('question'); |
@@ -713,8 +713,8 @@ discard block |
||
| 713 | 713 | |
| 714 | 714 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
| 715 | 715 | $output->writeln( |
| 716 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
| 717 | - . $address . '\'</info> stored in database' |
|
| 716 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
| 717 | + . $address.'\'</info> stored in database' |
|
| 718 | 718 | ); |
| 719 | 719 | } |
| 720 | 720 | |
@@ -735,7 +735,7 @@ discard block |
||
| 735 | 735 | } |
| 736 | 736 | |
| 737 | 737 | if (!is_null($cloudIdPort)) { |
| 738 | - $cloudId = $cloudId . ':' . $cloudIdPort; |
|
| 738 | + $cloudId = $cloudId.':'.$cloudIdPort; |
|
| 739 | 739 | } |
| 740 | 740 | |
| 741 | 741 | return [$scheme, $cloudId]; |