@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | * @param int $config |
247 | 247 | */ |
248 | 248 | public function limitToConfigFlag(int $config): void { |
249 | - $this->andWhere($this->expr()->bitwiseAnd($this->getDefaultSelectAlias() . '.config', $config)); |
|
249 | + $this->andWhere($this->expr()->bitwiseAnd($this->getDefaultSelectAlias().'.config', $config)); |
|
250 | 250 | } |
251 | 251 | |
252 | 252 | |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | } |
331 | 331 | |
332 | 332 | if ($circle->getDisplayName() !== '') { |
333 | - $this->searchInDBField('display_name', '%' . $circle->getDisplayName() . '%'); |
|
333 | + $this->searchInDBField('display_name', '%'.$circle->getDisplayName().'%'); |
|
334 | 334 | } |
335 | 335 | } |
336 | 336 | |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | $this->generateRemoteInstanceSelectAlias($aliasRemoteInstance) |
347 | 347 | ->leftJoin( |
348 | 348 | $alias, CoreRequestBuilder::TABLE_REMOTE, $aliasRemoteInstance, |
349 | - $expr->eq($alias . '.instance', $aliasRemoteInstance . '.instance') |
|
349 | + $expr->eq($alias.'.instance', $aliasRemoteInstance.'.instance') |
|
350 | 350 | ); |
351 | 351 | } catch (RequestBuilderException $e) { |
352 | 352 | } |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | $expr = $this->expr(); |
400 | 400 | $this->leftJoin( |
401 | 401 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_REMOTE, $aliasRemote, |
402 | - $expr->eq($aliasRemote . '.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
402 | + $expr->eq($aliasRemote.'.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
403 | 403 | ); |
404 | 404 | } |
405 | 405 | |
@@ -427,12 +427,12 @@ discard block |
||
427 | 427 | $this->leftJoin( |
428 | 428 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteMember, |
429 | 429 | $expr->andX( |
430 | - $expr->eq($aliasRemoteMember . '.circle_id', $aliasCircle . '.unique_id'), |
|
430 | + $expr->eq($aliasRemoteMember.'.circle_id', $aliasCircle.'.unique_id'), |
|
431 | 431 | $expr->eq( |
432 | - $aliasRemoteMember . '.instance', |
|
432 | + $aliasRemoteMember.'.instance', |
|
433 | 433 | $this->createNamedParameter($remoteInstance->getInstance()) |
434 | 434 | ), |
435 | - $expr->gte($aliasRemoteMember . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
435 | + $expr->gte($aliasRemoteMember.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
436 | 436 | ) |
437 | 437 | ); |
438 | 438 | } |
@@ -464,21 +464,21 @@ discard block |
||
464 | 464 | $this->leftJoin( |
465 | 465 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircle, |
466 | 466 | $expr->andX( |
467 | - $expr->eq($aliasRemoteCircle . '.single_id', $aliasCircle . '.unique_id'), |
|
468 | - $expr->emptyString($aliasRemoteCircle . '.instance'), |
|
469 | - $expr->gte($aliasRemoteCircle . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
467 | + $expr->eq($aliasRemoteCircle.'.single_id', $aliasCircle.'.unique_id'), |
|
468 | + $expr->emptyString($aliasRemoteCircle.'.instance'), |
|
469 | + $expr->gte($aliasRemoteCircle.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
470 | 470 | ) |
471 | 471 | ); |
472 | 472 | $this->leftJoin( |
473 | 473 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircleOwner, |
474 | 474 | $expr->andX( |
475 | - $expr->eq($aliasRemoteCircle . '.circle_id', $aliasRemoteCircleOwner . '.circle_id'), |
|
475 | + $expr->eq($aliasRemoteCircle.'.circle_id', $aliasRemoteCircleOwner.'.circle_id'), |
|
476 | 476 | $expr->eq( |
477 | - $aliasRemoteCircleOwner . '.instance', |
|
477 | + $aliasRemoteCircleOwner.'.instance', |
|
478 | 478 | $this->createNamedParameter($remoteInstance->getInstance()) |
479 | 479 | ), |
480 | 480 | $expr->eq( |
481 | - $aliasRemoteCircleOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
481 | + $aliasRemoteCircleOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
482 | 482 | ) |
483 | 483 | ) |
484 | 484 | ); |
@@ -511,16 +511,16 @@ discard block |
||
511 | 511 | $expr = $this->expr(); |
512 | 512 | $orX = $expr->orX(); |
513 | 513 | $orX->add( |
514 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBAL_SCALE)) |
|
514 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBAL_SCALE)) |
|
515 | 515 | ); |
516 | 516 | |
517 | 517 | $orExtOrPassive = $expr->orX(); |
518 | 518 | $orExtOrPassive->add( |
519 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
519 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
520 | 520 | ); |
521 | 521 | if (!$sensitive) { |
522 | 522 | $orExtOrPassive->add( |
523 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
523 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
524 | 524 | ); |
525 | 525 | } else { |
526 | 526 | if ($this->getDefaultSelectAlias() === CoreQueryBuilder::MEMBER) { |
@@ -529,8 +529,8 @@ discard block |
||
529 | 529 | } |
530 | 530 | |
531 | 531 | $orInstance = $expr->orX(); |
532 | - $orInstance->add($expr->isNotNull($aliasRemoteMember . '.instance')); |
|
533 | - $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner . '.instance')); |
|
532 | + $orInstance->add($expr->isNotNull($aliasRemoteMember.'.instance')); |
|
533 | + $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner.'.instance')); |
|
534 | 534 | |
535 | 535 | $andExternal = $expr->andX(); |
536 | 536 | $andExternal->add($orExtOrPassive); |
@@ -539,13 +539,13 @@ discard block |
||
539 | 539 | $orExtOrTrusted = $expr->orX(); |
540 | 540 | $orExtOrTrusted->add($andExternal); |
541 | 541 | $orExtOrTrusted->add( |
542 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
542 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
543 | 543 | ); |
544 | 544 | |
545 | 545 | $andTrusted = $expr->andX(); |
546 | 546 | $andTrusted->add($orExtOrTrusted); |
547 | - $andTrusted->add($expr->bitwiseAnd($aliasCircle . '.config', Circle::CFG_FEDERATED)); |
|
548 | - $andTrusted->add($expr->emptyString($aliasOwner . '.instance')); |
|
547 | + $andTrusted->add($expr->bitwiseAnd($aliasCircle.'.config', Circle::CFG_FEDERATED)); |
|
548 | + $andTrusted->add($expr->emptyString($aliasOwner.'.instance')); |
|
549 | 549 | $orX->add($andTrusted); |
550 | 550 | |
551 | 551 | $this->andWhere($orX); |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | } |
573 | 573 | $this->leftJoin( |
574 | 574 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
575 | - $expr->eq($aliasMember . '.circle_id', $alias . '.unique_id') |
|
575 | + $expr->eq($aliasMember.'.circle_id', $alias.'.unique_id') |
|
576 | 576 | ); |
577 | 577 | |
578 | 578 | $this->filterDirectMembership($aliasMember, $member); |
@@ -593,28 +593,28 @@ discard block |
||
593 | 593 | |
594 | 594 | if ($member->getUserId() !== '') { |
595 | 595 | $andX->add( |
596 | - $expr->eq($aliasMember . '.user_id', $this->createNamedParameter($member->getUserId())) |
|
596 | + $expr->eq($aliasMember.'.user_id', $this->createNamedParameter($member->getUserId())) |
|
597 | 597 | ); |
598 | 598 | } |
599 | 599 | |
600 | 600 | if ($member->getSingleId() !== '') { |
601 | 601 | $andX->add( |
602 | - $expr->eq($aliasMember . '.single_id', $this->createNamedParameter($member->getSingleId())) |
|
602 | + $expr->eq($aliasMember.'.single_id', $this->createNamedParameter($member->getSingleId())) |
|
603 | 603 | ); |
604 | 604 | } |
605 | 605 | |
606 | 606 | if ($member->getUserType() > 0) { |
607 | 607 | $andX->add( |
608 | - $expr->eq($aliasMember . '.user_type', $this->createNamedParameter($member->getUserType())) |
|
608 | + $expr->eq($aliasMember.'.user_type', $this->createNamedParameter($member->getUserType())) |
|
609 | 609 | ); |
610 | 610 | } |
611 | 611 | |
612 | 612 | $andX->add( |
613 | - $expr->eq($aliasMember . '.instance', $this->createNamedParameter($this->getInstance($member))) |
|
613 | + $expr->eq($aliasMember.'.instance', $this->createNamedParameter($this->getInstance($member))) |
|
614 | 614 | ); |
615 | 615 | |
616 | 616 | if ($member->getLevel() > 0) { |
617 | - $andX->add($expr->gte($aliasMember . '.level', $this->createNamedParameter($member->getLevel()))); |
|
617 | + $andX->add($expr->gte($aliasMember.'.level', $this->createNamedParameter($member->getLevel()))); |
|
618 | 618 | } |
619 | 619 | |
620 | 620 | $this->andWhere($andX); |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | |
648 | 648 | $this->leftJoin( |
649 | 649 | $alias, CoreRequestBuilder::TABLE_CIRCLE, $aliasCircle, |
650 | - $expr->eq($aliasCircle . '.unique_id', $alias . '.' . $field) |
|
650 | + $expr->eq($aliasCircle.'.unique_id', $alias.'.'.$field) |
|
651 | 651 | ); |
652 | 652 | |
653 | 653 | if (!is_null($initiator)) { |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | $this->generateCircleSelectAlias($aliasBasedOn) |
690 | 690 | ->leftJoin( |
691 | 691 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasBasedOn, |
692 | - $expr->eq($aliasBasedOn . '.unique_id', $aliasMember . '.single_id') |
|
692 | + $expr->eq($aliasBasedOn.'.unique_id', $aliasMember.'.single_id') |
|
693 | 693 | ); |
694 | 694 | |
695 | 695 | if (!is_null($initiator)) { |
@@ -722,9 +722,9 @@ discard block |
||
722 | 722 | ->leftJoin( |
723 | 723 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
724 | 724 | $expr->andX( |
725 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $field), |
|
725 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$field), |
|
726 | 726 | $expr->eq( |
727 | - $aliasMember . '.level', |
|
727 | + $aliasMember.'.level', |
|
728 | 728 | $this->createNamedParameter(Member::LEVEL_OWNER, self::PARAM_INT) |
729 | 729 | ) |
730 | 730 | ) |
@@ -762,10 +762,10 @@ discard block |
||
762 | 762 | ->leftJoin( |
763 | 763 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
764 | 764 | $expr->andX( |
765 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $fieldCircleId), |
|
766 | - $expr->eq($aliasMember . '.single_id', $alias . '.' . $fieldSingleId), |
|
765 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$fieldCircleId), |
|
766 | + $expr->eq($aliasMember.'.single_id', $alias.'.'.$fieldSingleId), |
|
767 | 767 | $expr->gte( |
768 | - $aliasMember . '.level', |
|
768 | + $aliasMember.'.level', |
|
769 | 769 | $this->createNamedParameter(Member::LEVEL_MEMBER, self::PARAM_INT) |
770 | 770 | ) |
771 | 771 | ) |
@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | |
796 | 796 | $this->leftJoin( |
797 | 797 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
798 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
798 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
799 | 799 | ); |
800 | 800 | |
801 | 801 | // if (!$this->getBool('getData', $options, false)) { |
@@ -809,8 +809,8 @@ discard block |
||
809 | 809 | ->leftJoin( |
810 | 810 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
811 | 811 | $expr->andX( |
812 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id'), |
|
813 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id') |
|
812 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id'), |
|
813 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id') |
|
814 | 814 | ) |
815 | 815 | ); |
816 | 816 | |
@@ -827,12 +827,12 @@ discard block |
||
827 | 827 | $aliasUpstreamMembership = $this->generateAlias($alias, self::UPSTREAM_MEMBERSHIPS, $options); |
828 | 828 | $this->leftJoin( |
829 | 829 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasUpstreamMembership, |
830 | - $expr->eq($aliasUpstreamMembership . '.single_id', $this->createNamedParameter($singleId)) |
|
830 | + $expr->eq($aliasUpstreamMembership.'.single_id', $this->createNamedParameter($singleId)) |
|
831 | 831 | ); |
832 | 832 | |
833 | 833 | $orX = $expr->orX( |
834 | - $expr->eq($aliasUpstreamMembership . '.circle_id', $alias . '.' . $field), |
|
835 | - $expr->eq($alias . '.' . $field, $this->createNamedParameter($singleId)) |
|
834 | + $expr->eq($aliasUpstreamMembership.'.circle_id', $alias.'.'.$field), |
|
835 | + $expr->eq($alias.'.'.$field, $this->createNamedParameter($singleId)) |
|
836 | 836 | ); |
837 | 837 | |
838 | 838 | $this->andWhere($orX); |
@@ -852,7 +852,7 @@ discard block |
||
852 | 852 | |
853 | 853 | $expr = $this->expr(); |
854 | 854 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); |
855 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); |
|
855 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); |
|
856 | 856 | } |
857 | 857 | |
858 | 858 | |
@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | $this->leftJoin( |
877 | 877 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
878 | 878 | // $expr->andX( |
879 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field) |
|
879 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field) |
|
880 | 880 | // $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') |
881 | 881 | // ) |
882 | 882 | ); |
@@ -890,8 +890,8 @@ discard block |
||
890 | 890 | ->leftJoin( |
891 | 891 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, |
892 | 892 | $expr->andX( |
893 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), |
|
894 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') |
|
893 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), |
|
894 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') |
|
895 | 895 | ) |
896 | 896 | ); |
897 | 897 | } |
@@ -939,10 +939,10 @@ discard block |
||
939 | 939 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
940 | 940 | $expr->andX( |
941 | 941 | $expr->eq( |
942 | - $aliasMembership . '.single_id', |
|
942 | + $aliasMembership.'.single_id', |
|
943 | 943 | $this->createNamedParameter($initiator->getSingleId()) |
944 | 944 | ), |
945 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
945 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
946 | 946 | ) |
947 | 947 | ); |
948 | 948 | |
@@ -955,8 +955,8 @@ discard block |
||
955 | 955 | $this->leftJoin( |
956 | 956 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
957 | 957 | $expr->andX( |
958 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), |
|
959 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') |
|
958 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), |
|
959 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') |
|
960 | 960 | ) |
961 | 961 | ); |
962 | 962 | |
@@ -964,8 +964,8 @@ discard block |
||
964 | 964 | $this->leftJoin( |
965 | 965 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
966 | 966 | $expr->andX( |
967 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), |
|
968 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') |
|
967 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), |
|
968 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') |
|
969 | 969 | ) |
970 | 970 | ); |
971 | 971 | |
@@ -984,7 +984,7 @@ discard block |
||
984 | 984 | $aliasInheritedByMembership = $this->generateAlias($aliasInheritedBy, self::MEMBERSHIPS); |
985 | 985 | $this->generateMembershipSelectAlias($aliasMembership, $aliasInheritedByMembership); |
986 | 986 | } catch (RequestBuilderException $e) { |
987 | - \OC::$server->getLogger()->log(3, '-- ' . $e->getMessage()); |
|
987 | + \OC::$server->getLogger()->log(3, '-- '.$e->getMessage()); |
|
988 | 988 | } |
989 | 989 | } |
990 | 990 | |
@@ -1009,24 +1009,24 @@ discard block |
||
1009 | 1009 | $orX = $expr->orX(); |
1010 | 1010 | $orX->add( |
1011 | 1011 | $expr->andX( |
1012 | - $expr->gte($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
1012 | + $expr->gte($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
1013 | 1013 | ) |
1014 | 1014 | ); |
1015 | 1015 | |
1016 | 1016 | if ($getPersonalCircle) { |
1017 | 1017 | $orX->add( |
1018 | 1018 | $expr->andX( |
1019 | - $expr->bitwiseAnd($alias . '.config', Circle::CFG_PERSONAL), |
|
1020 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1019 | + $expr->bitwiseAnd($alias.'.config', Circle::CFG_PERSONAL), |
|
1020 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1021 | 1021 | ) |
1022 | 1022 | ); |
1023 | 1023 | } |
1024 | 1024 | if (!$mustBeMember) { |
1025 | - $orX->add($expr->bitwiseAnd($alias . '.config', Circle::CFG_VISIBLE)); |
|
1025 | + $orX->add($expr->bitwiseAnd($alias.'.config', Circle::CFG_VISIBLE)); |
|
1026 | 1026 | } |
1027 | 1027 | if ($canBeVisitor) { |
1028 | 1028 | // TODO: should find a better way, also filter on remote initiator on non-federated ? |
1029 | - $orX->add($expr->gte($alias . '.config', $this->createNamedParameter(0))); |
|
1029 | + $orX->add($expr->gte($alias.'.config', $this->createNamedParameter(0))); |
|
1030 | 1030 | } |
1031 | 1031 | $this->andWhere($orX); |
1032 | 1032 | |
@@ -1068,7 +1068,7 @@ discard block |
||
1068 | 1068 | $hide = $expr->andX(); |
1069 | 1069 | foreach (Circle::$DEF_CFG as $cfg => $v) { |
1070 | 1070 | if ($flag & $cfg) { |
1071 | - $hide->add($this->createFunction('NOT') . $expr->bitwiseAnd($aliasCircle . '.config', $cfg)); |
|
1071 | + $hide->add($this->createFunction('NOT').$expr->bitwiseAnd($aliasCircle.'.config', $cfg)); |
|
1072 | 1072 | } |
1073 | 1073 | } |
1074 | 1074 | |
@@ -1087,21 +1087,21 @@ discard block |
||
1087 | 1087 | $expr = $this->expr(); |
1088 | 1088 | $andPassive = $expr->andX(); |
1089 | 1089 | $andPassive->add( |
1090 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1090 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1091 | 1091 | ); |
1092 | 1092 | |
1093 | 1093 | $orMemberOrLevel = $expr->orX(); |
1094 | 1094 | $orMemberOrLevel->add( |
1095 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance') |
|
1095 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance') |
|
1096 | 1096 | ); |
1097 | 1097 | // TODO: do we need this ? (display members from the local instance) |
1098 | 1098 | $orMemberOrLevel->add( |
1099 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance') |
|
1099 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance') |
|
1100 | 1100 | ); |
1101 | 1101 | |
1102 | 1102 | $orMemberOrLevel->add( |
1103 | 1103 | $expr->eq( |
1104 | - $this->getDefaultSelectAlias() . '.level', |
|
1104 | + $this->getDefaultSelectAlias().'.level', |
|
1105 | 1105 | $this->createNamedParameter(Member::LEVEL_OWNER) |
1106 | 1106 | ) |
1107 | 1107 | ); |
@@ -1117,7 +1117,7 @@ discard block |
||
1117 | 1117 | * @param int $flag |
1118 | 1118 | */ |
1119 | 1119 | public function filterConfig(string $aliasCircle, int $flag): void { |
1120 | - $this->andWhere($this->expr()->bitwiseAnd($aliasCircle . '.config', $flag)); |
|
1120 | + $this->andWhere($this->expr()->bitwiseAnd($aliasCircle.'.config', $flag)); |
|
1121 | 1121 | } |
1122 | 1122 | |
1123 | 1123 | |
@@ -1143,11 +1143,11 @@ discard block |
||
1143 | 1143 | ->generateSelectAlias(['id'], $aliasStorages, $aliasStorages, []) |
1144 | 1144 | ->leftJoin( |
1145 | 1145 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, |
1146 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') |
|
1146 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') |
|
1147 | 1147 | ) |
1148 | 1148 | ->leftJoin( |
1149 | 1149 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, |
1150 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') |
|
1150 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') |
|
1151 | 1151 | ); |
1152 | 1152 | } |
1153 | 1153 | |
@@ -1169,13 +1169,13 @@ discard block |
||
1169 | 1169 | $this->leftJoin( |
1170 | 1170 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, |
1171 | 1171 | $expr->andX( |
1172 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), |
|
1173 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') |
|
1172 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), |
|
1173 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') |
|
1174 | 1174 | ) |
1175 | 1175 | ); |
1176 | 1176 | |
1177 | - $this->selectAlias($aliasShareChild . '.id', 'child_id'); |
|
1178 | - $this->selectAlias($aliasShareChild . '.file_target', 'child_file_target'); |
|
1177 | + $this->selectAlias($aliasShareChild.'.id', 'child_id'); |
|
1178 | + $this->selectAlias($aliasShareChild.'.file_target', 'child_file_target'); |
|
1179 | 1179 | // $this->selectAlias($aliasShareParent . '.permissions', 'parent_perms'); |
1180 | 1180 | } |
1181 | 1181 | |
@@ -1189,12 +1189,12 @@ discard block |
||
1189 | 1189 | $expr = $this->expr(); |
1190 | 1190 | |
1191 | 1191 | $orX = $expr->orX( |
1192 | - $expr->eq($alias . '.uid_initiator', $this->createNamedParameter($federatedUser->getUserId())) |
|
1192 | + $expr->eq($alias.'.uid_initiator', $this->createNamedParameter($federatedUser->getUserId())) |
|
1193 | 1193 | ); |
1194 | 1194 | |
1195 | 1195 | if ($reshares) { |
1196 | 1196 | $orX->add( |
1197 | - $expr->eq($alias . '.uid_owner', $this->createNamedParameter($federatedUser->getUserId())) |
|
1197 | + $expr->eq($alias.'.uid_owner', $this->createNamedParameter($federatedUser->getUserId())) |
|
1198 | 1198 | ); |
1199 | 1199 | } |
1200 | 1200 | |
@@ -1219,13 +1219,13 @@ discard block |
||
1219 | 1219 | $this->leftJoin( |
1220 | 1220 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, |
1221 | 1221 | $expr->andX( |
1222 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), |
|
1223 | - $expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id') |
|
1222 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), |
|
1223 | + $expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id') |
|
1224 | 1224 | ) |
1225 | 1225 | ); |
1226 | 1226 | |
1227 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); |
|
1228 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); |
|
1227 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); |
|
1228 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); |
|
1229 | 1229 | } |
1230 | 1230 | |
1231 | 1231 | |
@@ -1325,10 +1325,10 @@ discard block |
||
1325 | 1325 | */ |
1326 | 1326 | public function generateAlias(string $base, string $extension, ?array &$options = []): string { |
1327 | 1327 | $search = str_replace('_', '.', $base); |
1328 | - $path = $search . '.' . $extension; |
|
1328 | + $path = $search.'.'.$extension; |
|
1329 | 1329 | if (!$this->validKey($path, self::$SQL_PATH) |
1330 | 1330 | && !in_array($extension, $this->getArray($search, self::$SQL_PATH))) { |
1331 | - throw new RequestBuilderException($extension . ' not found in ' . $search); |
|
1331 | + throw new RequestBuilderException($extension.' not found in '.$search); |
|
1332 | 1332 | } |
1333 | 1333 | |
1334 | 1334 | if (!is_array($options)) { |
@@ -1337,15 +1337,15 @@ discard block |
||
1337 | 1337 | |
1338 | 1338 | $optionPath = ''; |
1339 | 1339 | foreach (explode('.', $path) as $p) { |
1340 | - $optionPath = trim($optionPath . '.' . $p, '.'); |
|
1340 | + $optionPath = trim($optionPath.'.'.$p, '.'); |
|
1341 | 1341 | $options = array_merge( |
1342 | 1342 | $options, |
1343 | - $this->getArray($optionPath . '.' . self::OPTIONS, self::$SQL_PATH), |
|
1344 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) |
|
1343 | + $this->getArray($optionPath.'.'.self::OPTIONS, self::$SQL_PATH), |
|
1344 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) |
|
1345 | 1345 | ); |
1346 | 1346 | } |
1347 | 1347 | |
1348 | - return $base . '_' . $extension; |
|
1348 | + return $base.'_'.$extension; |
|
1349 | 1349 | } |
1350 | 1350 | |
1351 | 1351 | |
@@ -1365,7 +1365,7 @@ discard block |
||
1365 | 1365 | } else { |
1366 | 1366 | $k = $arr; |
1367 | 1367 | } |
1368 | - $path[$k] = $prefix . '_' . $k . '_'; |
|
1368 | + $path[$k] = $prefix.'_'.$k.'_'; |
|
1369 | 1369 | } |
1370 | 1370 | |
1371 | 1371 | return $path; |
@@ -84,24 +84,24 @@ |
||
84 | 84 | ): CoreQueryBuilder { |
85 | 85 | $qb = $this->getQueryBuilder(); |
86 | 86 | $qb->select( |
87 | - CoreQueryBuilder::MEMBER . '.circle_id', |
|
88 | - CoreQueryBuilder::MEMBER . '.member_id', |
|
89 | - CoreQueryBuilder::MEMBER . '.single_id', |
|
90 | - CoreQueryBuilder::MEMBER . '.user_id', |
|
91 | - CoreQueryBuilder::MEMBER . '.instance', |
|
92 | - CoreQueryBuilder::MEMBER . '.user_type', |
|
93 | - CoreQueryBuilder::MEMBER . '.level', |
|
94 | - CoreQueryBuilder::MEMBER . '.status', |
|
95 | - CoreQueryBuilder::MEMBER . '.note', |
|
96 | - CoreQueryBuilder::MEMBER . '.contact_id', |
|
97 | - CoreQueryBuilder::MEMBER . '.cached_name', |
|
98 | - CoreQueryBuilder::MEMBER . '.cached_update', |
|
99 | - CoreQueryBuilder::MEMBER . '.contact_meta', |
|
100 | - CoreQueryBuilder::MEMBER . '.joined' |
|
87 | + CoreQueryBuilder::MEMBER.'.circle_id', |
|
88 | + CoreQueryBuilder::MEMBER.'.member_id', |
|
89 | + CoreQueryBuilder::MEMBER.'.single_id', |
|
90 | + CoreQueryBuilder::MEMBER.'.user_id', |
|
91 | + CoreQueryBuilder::MEMBER.'.instance', |
|
92 | + CoreQueryBuilder::MEMBER.'.user_type', |
|
93 | + CoreQueryBuilder::MEMBER.'.level', |
|
94 | + CoreQueryBuilder::MEMBER.'.status', |
|
95 | + CoreQueryBuilder::MEMBER.'.note', |
|
96 | + CoreQueryBuilder::MEMBER.'.contact_id', |
|
97 | + CoreQueryBuilder::MEMBER.'.cached_name', |
|
98 | + CoreQueryBuilder::MEMBER.'.cached_update', |
|
99 | + CoreQueryBuilder::MEMBER.'.contact_meta', |
|
100 | + CoreQueryBuilder::MEMBER.'.joined' |
|
101 | 101 | ) |
102 | 102 | ->from(self::TABLE_MEMBER, CoreQueryBuilder::MEMBER) |
103 | - ->orderBy(CoreQueryBuilder::MEMBER . '.joined') |
|
104 | - ->groupBy(CoreQueryBuilder::MEMBER . '.member_id') |
|
103 | + ->orderBy(CoreQueryBuilder::MEMBER.'.joined') |
|
104 | + ->groupBy(CoreQueryBuilder::MEMBER.'.member_id') |
|
105 | 105 | ->setDefaultSelectAlias(CoreQueryBuilder::MEMBER); |
106 | 106 | |
107 | 107 | if ($getBasedOn) { |
@@ -296,7 +296,7 @@ |
||
296 | 296 | * @throws RequestBuilderException |
297 | 297 | */ |
298 | 298 | public function move(IShare $share, $recipient): IShare { |
299 | - OC::$server->getLogger()->log(3, 'CSP > move' . $share->getId() . ' ' . $recipient); |
|
299 | + OC::$server->getLogger()->log(3, 'CSP > move'.$share->getId().' '.$recipient); |
|
300 | 300 | |
301 | 301 | $federatedUser = $this->federatedUserService->getLocalFederatedUser($recipient); |
302 | 302 | $child = $this->shareWrapperService->getChild($share, $federatedUser); |
@@ -125,7 +125,7 @@ |
||
125 | 125 | } catch (FederatedItemException $e) { |
126 | 126 | if ($input->getOption('status-code')) { |
127 | 127 | throw new FederatedItemException( |
128 | - ' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage() |
|
128 | + ' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage() |
|
129 | 129 | ); |
130 | 130 | } |
131 | 131 |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | if (($userId = $input->getOption('user')) !== '') { |
124 | 124 | $federatedUser = $this->syncService->syncNextcloudUser($userId); |
125 | 125 | $output->writeln( |
126 | - '- Nextcloud User <info>' . $userId . '</info>/<info>' . $federatedUser->getSingleId() |
|
126 | + '- Nextcloud User <info>'.$userId.'</info>/<info>'.$federatedUser->getSingleId() |
|
127 | 127 | . '</info> synced' |
128 | 128 | ); |
129 | 129 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | if (($groupId = $input->getOption('group')) !== '') { |
137 | 137 | $circle = $this->syncService->syncNextcloudGroup($groupId); |
138 | 138 | $output->writeln( |
139 | - '- Nextcloud Group <info>' . $groupId . '</info>/<info>' . $circle->getSingleId() |
|
139 | + '- Nextcloud Group <info>'.$groupId.'</info>/<info>'.$circle->getSingleId() |
|
140 | 140 | . '</info> synced' |
141 | 141 | ); |
142 | 142 | } |
@@ -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,25 +841,25 @@ 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 | $compareToBasedOn = $compareTo->getBasedOn(); |
857 | 857 | if ($compareToBasedOn !== null) { |
858 | 858 | $basedOn = $member->getBasedOn(); |
859 | 859 | if ($basedOn === null) { |
860 | - throw new Exception('empty ' . $prefix . '.basedOn'); |
|
860 | + throw new Exception('empty '.$prefix.'.basedOn'); |
|
861 | 861 | } |
862 | - $this->confirmCircleData($basedOn, $compareToBasedOn, $prefix . '.basedOn', false, $params); |
|
862 | + $this->confirmCircleData($basedOn, $compareToBasedOn, $prefix.'.basedOn', false, $params); |
|
863 | 863 | } |
864 | 864 | |
865 | 865 | } |
@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | private function compare(string $expected, string $compare, string $def, array $params) { |
877 | 877 | if ($expected !== '' |
878 | 878 | && $this->feedStringWithParams($expected, $params) !== $compare) { |
879 | - throw new Exception($def . ': ' . $compare . ' (' . $expected . ')'); |
|
879 | + throw new Exception($def.': '.$compare.' ('.$expected.')'); |
|
880 | 880 | } |
881 | 881 | } |
882 | 882 | |
@@ -892,7 +892,7 @@ discard block |
||
892 | 892 | private function compareInt(int $expected, int $compare, string $def, bool $force = false) { |
893 | 893 | if (($expected > 0 || ($force && $expected >= 0)) |
894 | 894 | && $expected !== $compare) { |
895 | - throw new Exception('wrong ' . $def . ': ' . $compare . ' (' . $expected . ')'); |
|
895 | + throw new Exception('wrong '.$def.': '.$compare.' ('.$expected.')'); |
|
896 | 896 | } |
897 | 897 | } |
898 | 898 | |
@@ -928,7 +928,7 @@ discard block |
||
928 | 928 | } |
929 | 929 | } |
930 | 930 | |
931 | - throw new CircleNotFoundException('cannot find ' . $userId . ' in the list of Single Circle'); |
|
931 | + throw new CircleNotFoundException('cannot find '.$userId.' in the list of Single Circle'); |
|
932 | 932 | } |
933 | 933 | |
934 | 934 | |
@@ -946,7 +946,7 @@ discard block |
||
946 | 946 | } |
947 | 947 | |
948 | 948 | throw new CircleNotFoundException( |
949 | - 'cannot extract \'' . $name . '\' from the list of generated Circles' |
|
949 | + 'cannot extract \''.$name.'\' from the list of generated Circles' |
|
950 | 950 | ); |
951 | 951 | } |
952 | 952 | |
@@ -966,7 +966,7 @@ discard block |
||
966 | 966 | } |
967 | 967 | |
968 | 968 | throw new CircleNotFoundException( |
969 | - 'cannot extract \'' . $name . '\' from the list of provided Circles' |
|
969 | + 'cannot extract \''.$name.'\' from the list of provided Circles' |
|
970 | 970 | ); |
971 | 971 | } |
972 | 972 | |
@@ -1011,7 +1011,7 @@ discard block |
||
1011 | 1011 | } |
1012 | 1012 | } |
1013 | 1013 | |
1014 | - throw new ItemNotFoundException($instance . ' not found'); |
|
1014 | + throw new ItemNotFoundException($instance.' not found'); |
|
1015 | 1015 | } |
1016 | 1016 | |
1017 | 1017 | |
@@ -1046,7 +1046,7 @@ discard block |
||
1046 | 1046 | ): ?array { |
1047 | 1047 | $configInstance = $this->getConfigInstance($instance); |
1048 | 1048 | $path = $this->get('path', $configInstance); |
1049 | - $occ = rtrim($path, '/') . '/occ'; |
|
1049 | + $occ = rtrim($path, '/').'/occ'; |
|
1050 | 1050 | |
1051 | 1051 | $command = array_merge([$occ], explode(' ', $cmd)); |
1052 | 1052 | if ($jsonAsOutput) { |
@@ -1056,7 +1056,7 @@ discard block |
||
1056 | 1056 | $process->run(null, $env); |
1057 | 1057 | |
1058 | 1058 | if ($exceptionOnFail && !$process->isSuccessful()) { |
1059 | - throw new Exception(implode(' ', $command) . ' failed'); |
|
1059 | + throw new Exception(implode(' ', $command).' failed'); |
|
1060 | 1060 | } |
1061 | 1061 | |
1062 | 1062 | $output = json_decode($process->getOutput(), true); |
@@ -1079,7 +1079,7 @@ discard block |
||
1079 | 1079 | */ |
1080 | 1080 | private function t(string $title): void { |
1081 | 1081 | $this->output->writeln(''); |
1082 | - $this->output->writeln('<comment>### ' . $title . '</comment>'); |
|
1082 | + $this->output->writeln('<comment>### '.$title.'</comment>'); |
|
1083 | 1083 | $this->output->writeln(''); |
1084 | 1084 | } |
1085 | 1085 | |
@@ -1088,14 +1088,14 @@ discard block |
||
1088 | 1088 | */ |
1089 | 1089 | private function p(string $processing): void { |
1090 | 1090 | $this->pOn = true; |
1091 | - $this->output->write('- ' . $processing . ': '); |
|
1091 | + $this->output->write('- '.$processing.': '); |
|
1092 | 1092 | } |
1093 | 1093 | |
1094 | 1094 | /** |
1095 | 1095 | * @param string $more |
1096 | 1096 | */ |
1097 | 1097 | private function pm(string $more): void { |
1098 | - $this->output->write($more . ' '); |
|
1098 | + $this->output->write($more.' '); |
|
1099 | 1099 | } |
1100 | 1100 | |
1101 | 1101 | /** |
@@ -1105,9 +1105,9 @@ discard block |
||
1105 | 1105 | private function r(bool $result = true, string $info = ''): void { |
1106 | 1106 | $this->pOn = false; |
1107 | 1107 | if ($result) { |
1108 | - $this->output->writeln('<info>' . (($info !== '') ? $info : 'done') . '</info>'); |
|
1108 | + $this->output->writeln('<info>'.(($info !== '') ? $info : 'done').'</info>'); |
|
1109 | 1109 | } else { |
1110 | - $this->output->writeln('<error>' . (($info !== '') ? $info : 'done') . '</error>'); |
|
1110 | + $this->output->writeln('<error>'.(($info !== '') ? $info : 'done').'</error>'); |
|
1111 | 1111 | } |
1112 | 1112 | } |
1113 | 1113 | |
@@ -1129,16 +1129,16 @@ discard block |
||
1129 | 1129 | $dataAddedMember = |
1130 | 1130 | $this->occ( |
1131 | 1131 | $instanceId, |
1132 | - 'circles:members:add ' . $circle->getSingleId() . ' ' . $userId . ' --type ' . $type |
|
1132 | + 'circles:members:add '.$circle->getSingleId().' '.$userId.' --type '.$type |
|
1133 | 1133 | ); |
1134 | 1134 | /** @var Member $addedMember */ |
1135 | 1135 | $addedMember = $this->deserialize($dataAddedMember, Member::class); |
1136 | 1136 | |
1137 | 1137 | |
1138 | - echo 'ADDEDMEMBER: ' . json_encode($addedMember, JSON_PRETTY_PRINT) . "\n"; |
|
1138 | + echo 'ADDEDMEMBER: '.json_encode($addedMember, JSON_PRETTY_PRINT)."\n"; |
|
1139 | 1139 | |
1140 | 1140 | $federatedUser = $this->federatedUsers[$instanceId][$userId]; |
1141 | - echo 'FEDERATEDUER: ' . json_encode($federatedUser, JSON_PRETTY_PRINT) . "\n"; |
|
1141 | + echo 'FEDERATEDUER: '.json_encode($federatedUser, JSON_PRETTY_PRINT)."\n"; |
|
1142 | 1142 | |
1143 | 1143 | return $addedMember; |
1144 | 1144 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } catch (FederatedItemException $e) { |
140 | 140 | if ($input->getOption('status-code')) { |
141 | 141 | throw new FederatedItemException( |
142 | - ' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage() |
|
142 | + ' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage() |
|
143 | 143 | ); |
144 | 144 | } |
145 | 145 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $instance = $host; |
198 | 198 | } |
199 | 199 | |
200 | - $result[] = $user['userid']['value'] . ' <info>@' . $host . '</info>'; |
|
200 | + $result[] = $user['userid']['value'].' <info>@'.$host.'</info>'; |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | // if ($userId === '') { |
@@ -163,19 +163,19 @@ discard block |
||
163 | 163 | |
164 | 164 | $webfinger = $this->getWebfinger($host, Application::APP_SUBJECT); |
165 | 165 | if ($this->input->getOption('all')) { |
166 | - $this->output->writeln('- Webfinger on <info>' . $host . '</info>'); |
|
166 | + $this->output->writeln('- Webfinger on <info>'.$host.'</info>'); |
|
167 | 167 | $this->output->writeln(json_encode($webfinger, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
168 | 168 | $this->output->writeln(''); |
169 | 169 | } |
170 | 170 | |
171 | 171 | if ($this->input->getOption('all')) { |
172 | 172 | $circleLink = $this->extractLink(Application::APP_REL, $webfinger); |
173 | - $this->output->writeln('- Information about Circles app on <info>' . $host . '</info>'); |
|
173 | + $this->output->writeln('- Information about Circles app on <info>'.$host.'</info>'); |
|
174 | 174 | $this->output->writeln(json_encode($circleLink, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
175 | 175 | $this->output->writeln(''); |
176 | 176 | } |
177 | 177 | |
178 | - $this->output->writeln('- Available services on <info>' . $host . '</info>'); |
|
178 | + $this->output->writeln('- Available services on <info>'.$host.'</info>'); |
|
179 | 179 | foreach ($webfinger->getLinks() as $link) { |
180 | 180 | $app = $link->getProperty('name'); |
181 | 181 | $ver = $link->getProperty('version'); |
@@ -183,14 +183,14 @@ discard block |
||
183 | 183 | $app .= ' '; |
184 | 184 | } |
185 | 185 | if ($ver !== '') { |
186 | - $ver = 'v' . $ver; |
|
186 | + $ver = 'v'.$ver; |
|
187 | 187 | } |
188 | 188 | |
189 | - $this->output->writeln(' * ' . $link->getRel() . ' ' . $app . $ver); |
|
189 | + $this->output->writeln(' * '.$link->getRel().' '.$app.$ver); |
|
190 | 190 | } |
191 | 191 | $this->output->writeln(''); |
192 | 192 | |
193 | - $this->output->writeln('- Resources related to Circles on <info>' . $host . '</info>'); |
|
193 | + $this->output->writeln('- Resources related to Circles on <info>'.$host.'</info>'); |
|
194 | 194 | $resource = $this->getResourceData($host, Application::APP_SUBJECT, Application::APP_REL); |
195 | 195 | $this->output->writeln(json_encode($resource, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
196 | 196 | $this->output->writeln(''); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | |
199 | 199 | $tempUid = $resource->g('uid'); |
200 | 200 | $this->output->writeln( |
201 | - '- Confirming UID=' . $tempUid . ' from parsed Signatory at <info>' . $host . '</info>' |
|
201 | + '- Confirming UID='.$tempUid.' from parsed Signatory at <info>'.$host.'</info>' |
|
202 | 202 | ); |
203 | 203 | |
204 | 204 | try { |
@@ -206,15 +206,15 @@ discard block |
||
206 | 206 | $this->output->writeln(' * No SignatureException: <info>Identity authed</info>'); |
207 | 207 | } catch (SignatureException $e) { |
208 | 208 | $this->output->writeln( |
209 | - '<error>' . $host . ' cannot auth its identity: ' . $e->getMessage() . '</error>' |
|
209 | + '<error>'.$host.' cannot auth its identity: '.$e->getMessage().'</error>' |
|
210 | 210 | ); |
211 | 211 | |
212 | 212 | return; |
213 | 213 | } |
214 | 214 | |
215 | - $this->output->writeln(' * Found <info>' . $remoteSignatory->getUid() . '</info>'); |
|
215 | + $this->output->writeln(' * Found <info>'.$remoteSignatory->getUid().'</info>'); |
|
216 | 216 | if ($remoteSignatory->getUid(true) !== $tempUid) { |
217 | - $this->output->writeln('<error>looks like ' . $host . ' is faking its identity'); |
|
217 | + $this->output->writeln('<error>looks like '.$host.' is faking its identity'); |
|
218 | 218 | |
219 | 219 | return; |
220 | 220 | } |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | $this->output->writeln(''); |
223 | 223 | |
224 | 224 | $testUrl = $resource->g('test'); |
225 | - $this->output->writeln('- Testing signed payload on <info>' . $testUrl . '</info>'); |
|
225 | + $this->output->writeln('- Testing signed payload on <info>'.$testUrl.'</info>'); |
|
226 | 226 | |
227 | 227 | try { |
228 | 228 | $localSignatory = $this->remoteStreamService->getAppSignatory(); |
@@ -244,18 +244,18 @@ discard block |
||
244 | 244 | $this->output->writeln(''); |
245 | 245 | |
246 | 246 | $this->output->writeln(' * Clear Signature: '); |
247 | - $this->output->writeln('<comment>' . $signedRequest->getClearSignature() . '</comment>'); |
|
247 | + $this->output->writeln('<comment>'.$signedRequest->getClearSignature().'</comment>'); |
|
248 | 248 | $this->output->writeln(''); |
249 | 249 | |
250 | 250 | $this->output->writeln(' * Signed Signature (base64 encoded): '); |
251 | 251 | $this->output->writeln( |
252 | - '<comment>' . base64_encode($signedRequest->getSignedSignature()) . '</comment>' |
|
252 | + '<comment>'.base64_encode($signedRequest->getSignedSignature()).'</comment>' |
|
253 | 253 | ); |
254 | 254 | $this->output->writeln(''); |
255 | 255 | |
256 | 256 | $result = $signedRequest->getOutgoingRequest()->getResult(); |
257 | 257 | $code = $result->getStatusCode(); |
258 | - $this->output->writeln(' * Result: ' . (($code === 200) ? '<info>' . $code . '</info>' : $code)); |
|
258 | + $this->output->writeln(' * Result: '.(($code === 200) ? '<info>'.$code.'</info>' : $code)); |
|
259 | 259 | $this->output->writeln( |
260 | 260 | json_encode(json_decode($result->getContent(), true), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) |
261 | 261 | ); |
@@ -276,13 +276,13 @@ discard block |
||
276 | 276 | $stored = new RemoteInstance(); |
277 | 277 | $this->remoteStreamService->confirmValidRemote($remoteSignatory, $stored); |
278 | 278 | $this->output->writeln( |
279 | - '<info>The remote instance ' . $host |
|
279 | + '<info>The remote instance '.$host |
|
280 | 280 | . ' is already known with this current identity</info>' |
281 | 281 | ); |
282 | 282 | |
283 | 283 | if ($remoteSignatory->getType() !== $stored->getType()) { |
284 | 284 | $this->output->writeln( |
285 | - '- updating type from ' . $stored->getType() . ' to ' |
|
285 | + '- updating type from '.$stored->getType().' to ' |
|
286 | 286 | . $remoteSignatory->getType() |
287 | 287 | ); |
288 | 288 | $this->remoteStreamService->update( |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | |
293 | 293 | if ($remoteSignatory->getInstance() !== $stored->getInstance()) { |
294 | 294 | $this->output->writeln( |
295 | - '- updating host from ' . $stored->getInstance() . ' to ' |
|
295 | + '- updating host from '.$stored->getInstance().' to ' |
|
296 | 296 | . $remoteSignatory->getInstance() |
297 | 297 | ); |
298 | 298 | $this->remoteStreamService->update( |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | } |
302 | 302 | if ($remoteSignatory->getId() !== $stored->getId()) { |
303 | 303 | $this->output->writeln( |
304 | - '- updating href/Id from ' . $stored->getId() . ' to ' |
|
304 | + '- updating href/Id from '.$stored->getId().' to ' |
|
305 | 305 | . $remoteSignatory->getId() |
306 | 306 | ); |
307 | 307 | $this->remoteStreamService->update($remoteSignatory, RemoteStreamService::UPDATE_HREF); |
@@ -327,10 +327,10 @@ discard block |
||
327 | 327 | $helper = $this->getHelper('question'); |
328 | 328 | |
329 | 329 | $this->output->writeln( |
330 | - 'The remote instance <info>' . $remoteSignatory->getInstance() . '</info> looks good.' |
|
330 | + 'The remote instance <info>'.$remoteSignatory->getInstance().'</info> looks good.' |
|
331 | 331 | ); |
332 | 332 | $question = new ConfirmationQuestion( |
333 | - 'Would you like to identify this remote instance as \'' . $remoteSignatory->getType() |
|
333 | + 'Would you like to identify this remote instance as \''.$remoteSignatory->getType() |
|
334 | 334 | . '\' ? (y/N) ', |
335 | 335 | false, |
336 | 336 | '/^(y|Y)/i' |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | $helper = $this->getHelper('question'); |
354 | 354 | |
355 | 355 | $this->output->writeln( |
356 | - 'The remote instance <info>' . $remoteSignatory->getInstance() |
|
356 | + 'The remote instance <info>'.$remoteSignatory->getInstance() |
|
357 | 357 | . '</info> is known but <error>its identity has changed.</error>' |
358 | 358 | ); |
359 | 359 | $this->output->writeln( |
@@ -431,13 +431,13 @@ discard block |
||
431 | 431 | if ($this->configService->isLocalInstance($instance)) { |
432 | 432 | return; |
433 | 433 | } |
434 | - $this->output->write('Adding <comment>' . $instance . '</comment>: '); |
|
434 | + $this->output->write('Adding <comment>'.$instance.'</comment>: '); |
|
435 | 435 | try { |
436 | 436 | $this->remoteStreamService->addRemoteInstance($instance, RemoteInstance::TYPE_GLOBAL_SCALE, true); |
437 | 437 | $this->output->writeln('<info>ok</info>'); |
438 | 438 | } catch (Exception $e) { |
439 | - $msg = ($e->getMessage() === '') ? '' : ' (' . $e->getMessage() . ')'; |
|
440 | - $this->output->writeln('<error>' . get_class($e) . $msg . '</error>'); |
|
439 | + $msg = ($e->getMessage() === '') ? '' : ' ('.$e->getMessage().')'; |
|
440 | + $this->output->writeln('<error>'.get_class($e).$msg.'</error>'); |
|
441 | 441 | } |
442 | 442 | } |
443 | 443 | |
@@ -455,12 +455,12 @@ discard block |
||
455 | 455 | try { |
456 | 456 | $current = $this->remoteStreamService->retrieveRemoteInstance($instance->getInstance()); |
457 | 457 | if ($current->getUid(true) === $instance->getUid(true)) { |
458 | - $currentUid = '<info>' . $current->getUid(true) . '</info>'; |
|
458 | + $currentUid = '<info>'.$current->getUid(true).'</info>'; |
|
459 | 459 | } else { |
460 | - $currentUid = '<error>' . $current->getUid(true) . '</error>'; |
|
460 | + $currentUid = '<error>'.$current->getUid(true).'</error>'; |
|
461 | 461 | } |
462 | 462 | } catch (Exception $e) { |
463 | - $currentUid = '<error>' . $e->getMessage() . '</error>'; |
|
463 | + $currentUid = '<error>'.$e->getMessage().'</error>'; |
|
464 | 464 | } |
465 | 465 | |
466 | 466 | $table->appendRow( |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | } |
486 | 486 | } |
487 | 487 | |
488 | - throw new Exception('Unknown type: ' . implode(', ', RemoteInstance::$LIST_TYPE)); |
|
488 | + throw new Exception('Unknown type: '.implode(', ', RemoteInstance::$LIST_TYPE)); |
|
489 | 489 | } |
490 | 490 | |
491 | 491 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } catch (FederatedItemException $e) { |
145 | 145 | if ($input->getOption('status-code')) { |
146 | 146 | throw new FederatedItemException( |
147 | - ' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage() |
|
147 | + ' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage() |
|
148 | 148 | ); |
149 | 149 | } |
150 | 150 | |
@@ -176,8 +176,8 @@ discard block |
||
176 | 176 | $value = array_search(strtoupper($item), $valid); |
177 | 177 | if (!$value) { |
178 | 178 | throw new InvalidArgumentException( |
179 | - 'Invalid config \'' . $item . '\'. Available values: ' |
|
180 | - . implode(', ', array_values($valid)) . '. ' |
|
179 | + 'Invalid config \''.$item.'\'. Available values: ' |
|
180 | + . implode(', ', array_values($valid)).'. ' |
|
181 | 181 | . 'To disable a config, start the value with an underscore' |
182 | 182 | ); |
183 | 183 | } |