@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | } |
394 | 394 | |
395 | 395 | if ($circle->getDisplayName() !== '') { |
396 | - $this->searchInDBField('display_name', '%' . $circle->getDisplayName() . '%'); |
|
396 | + $this->searchInDBField('display_name', '%'.$circle->getDisplayName().'%'); |
|
397 | 397 | } |
398 | 398 | if ($circle->getSource() > 0) { |
399 | 399 | $this->limitInt('source', $circle->getSource()); |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | $this->generateRemoteInstanceSelectAlias($aliasRemoteInstance) |
416 | 416 | ->leftJoin( |
417 | 417 | $alias, CoreRequestBuilder::TABLE_REMOTE, $aliasRemoteInstance, |
418 | - $expr->eq($alias . '.instance', $aliasRemoteInstance . '.instance') |
|
418 | + $expr->eq($alias.'.instance', $aliasRemoteInstance.'.instance') |
|
419 | 419 | ); |
420 | 420 | } catch (RequestBuilderException $e) { |
421 | 421 | } |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | $expr = $this->expr(); |
468 | 468 | $this->leftJoin( |
469 | 469 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_REMOTE, $aliasRemote, |
470 | - $expr->eq($aliasRemote . '.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
470 | + $expr->eq($aliasRemote.'.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
471 | 471 | ); |
472 | 472 | } |
473 | 473 | |
@@ -495,12 +495,12 @@ discard block |
||
495 | 495 | $this->leftJoin( |
496 | 496 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteMember, |
497 | 497 | $expr->andX( |
498 | - $expr->eq($aliasRemoteMember . '.circle_id', $aliasCircle . '.unique_id'), |
|
498 | + $expr->eq($aliasRemoteMember.'.circle_id', $aliasCircle.'.unique_id'), |
|
499 | 499 | $expr->eq( |
500 | - $aliasRemoteMember . '.instance', |
|
500 | + $aliasRemoteMember.'.instance', |
|
501 | 501 | $this->createNamedParameter($remoteInstance->getInstance()) |
502 | 502 | ), |
503 | - $expr->gte($aliasRemoteMember . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
503 | + $expr->gte($aliasRemoteMember.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
504 | 504 | ) |
505 | 505 | ); |
506 | 506 | } |
@@ -532,21 +532,21 @@ discard block |
||
532 | 532 | $this->leftJoin( |
533 | 533 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircle, |
534 | 534 | $expr->andX( |
535 | - $expr->eq($aliasRemoteCircle . '.single_id', $aliasCircle . '.unique_id'), |
|
536 | - $expr->emptyString($aliasRemoteCircle . '.instance'), |
|
537 | - $expr->gte($aliasRemoteCircle . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
535 | + $expr->eq($aliasRemoteCircle.'.single_id', $aliasCircle.'.unique_id'), |
|
536 | + $expr->emptyString($aliasRemoteCircle.'.instance'), |
|
537 | + $expr->gte($aliasRemoteCircle.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
538 | 538 | ) |
539 | 539 | ); |
540 | 540 | $this->leftJoin( |
541 | 541 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircleOwner, |
542 | 542 | $expr->andX( |
543 | - $expr->eq($aliasRemoteCircle . '.circle_id', $aliasRemoteCircleOwner . '.circle_id'), |
|
543 | + $expr->eq($aliasRemoteCircle.'.circle_id', $aliasRemoteCircleOwner.'.circle_id'), |
|
544 | 544 | $expr->eq( |
545 | - $aliasRemoteCircleOwner . '.instance', |
|
545 | + $aliasRemoteCircleOwner.'.instance', |
|
546 | 546 | $this->createNamedParameter($remoteInstance->getInstance()) |
547 | 547 | ), |
548 | 548 | $expr->eq( |
549 | - $aliasRemoteCircleOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
549 | + $aliasRemoteCircleOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
550 | 550 | ) |
551 | 551 | ) |
552 | 552 | ); |
@@ -579,16 +579,16 @@ discard block |
||
579 | 579 | $expr = $this->expr(); |
580 | 580 | $orX = $expr->orX(); |
581 | 581 | $orX->add( |
582 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
582 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
583 | 583 | ); |
584 | 584 | |
585 | 585 | $orExtOrPassive = $expr->orX(); |
586 | 586 | $orExtOrPassive->add( |
587 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
587 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
588 | 588 | ); |
589 | 589 | if (!$sensitive) { |
590 | 590 | $orExtOrPassive->add( |
591 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
591 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
592 | 592 | ); |
593 | 593 | } else { |
594 | 594 | if ($this->getDefaultSelectAlias() === CoreQueryBuilder::MEMBER) { |
@@ -597,8 +597,8 @@ discard block |
||
597 | 597 | } |
598 | 598 | |
599 | 599 | $orInstance = $expr->orX(); |
600 | - $orInstance->add($expr->isNotNull($aliasRemoteMember . '.instance')); |
|
601 | - $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner . '.instance')); |
|
600 | + $orInstance->add($expr->isNotNull($aliasRemoteMember.'.instance')); |
|
601 | + $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner.'.instance')); |
|
602 | 602 | |
603 | 603 | $andExternal = $expr->andX(); |
604 | 604 | $andExternal->add($orExtOrPassive); |
@@ -607,13 +607,13 @@ discard block |
||
607 | 607 | $orExtOrTrusted = $expr->orX(); |
608 | 608 | $orExtOrTrusted->add($andExternal); |
609 | 609 | $orExtOrTrusted->add( |
610 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
610 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
611 | 611 | ); |
612 | 612 | |
613 | 613 | $andTrusted = $expr->andX(); |
614 | 614 | $andTrusted->add($orExtOrTrusted); |
615 | 615 | $andTrusted->add($this->exprLimitBitwise('config', Circle::CFG_FEDERATED, $aliasCircle)); |
616 | - $andTrusted->add($expr->emptyString($aliasOwner . '.instance')); |
|
616 | + $andTrusted->add($expr->emptyString($aliasOwner.'.instance')); |
|
617 | 617 | $orX->add($andTrusted); |
618 | 618 | |
619 | 619 | $this->andWhere($orX); |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | } |
641 | 641 | $this->leftJoin( |
642 | 642 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
643 | - $expr->eq($aliasMember . '.circle_id', $alias . '.unique_id') |
|
643 | + $expr->eq($aliasMember.'.circle_id', $alias.'.unique_id') |
|
644 | 644 | ); |
645 | 645 | |
646 | 646 | $this->filterDirectMembership($aliasMember, $member); |
@@ -661,30 +661,30 @@ discard block |
||
661 | 661 | |
662 | 662 | if ($member->getUserId() !== '') { |
663 | 663 | $andX->add( |
664 | - $expr->eq($aliasMember . '.user_id', $this->createNamedParameter($member->getUserId())) |
|
664 | + $expr->eq($aliasMember.'.user_id', $this->createNamedParameter($member->getUserId())) |
|
665 | 665 | ); |
666 | 666 | } |
667 | 667 | |
668 | 668 | if ($member->getSingleId() !== '') { |
669 | 669 | $andX->add( |
670 | - $expr->eq($aliasMember . '.single_id', $this->createNamedParameter($member->getSingleId())) |
|
670 | + $expr->eq($aliasMember.'.single_id', $this->createNamedParameter($member->getSingleId())) |
|
671 | 671 | ); |
672 | 672 | } |
673 | 673 | |
674 | 674 | if ($member->getUserType() > 0) { |
675 | 675 | $andX->add( |
676 | - $expr->eq($aliasMember . '.user_type', $this->createNamedParameter($member->getUserType())) |
|
676 | + $expr->eq($aliasMember.'.user_type', $this->createNamedParameter($member->getUserType())) |
|
677 | 677 | ); |
678 | 678 | } |
679 | 679 | |
680 | 680 | $andX->add( |
681 | - $expr->eq($aliasMember . '.instance', $this->createNamedParameter($this->getInstance($member))) |
|
681 | + $expr->eq($aliasMember.'.instance', $this->createNamedParameter($this->getInstance($member))) |
|
682 | 682 | ); |
683 | 683 | |
684 | 684 | if ($member->getLevel() > 0) { |
685 | 685 | $andX->add( |
686 | 686 | $expr->gte( |
687 | - $aliasMember . '.level', |
|
687 | + $aliasMember.'.level', |
|
688 | 688 | $this->createNamedParameter($member->getLevel(), IQueryBuilder::PARAM_INT) |
689 | 689 | ) |
690 | 690 | ); |
@@ -715,12 +715,12 @@ discard block |
||
715 | 715 | |
716 | 716 | $expr = $this->expr(); |
717 | 717 | $this->selectAlias( |
718 | - $this->createFunction('COUNT(`' . $aliasMemberCount . '`.`member_id`)'), |
|
719 | - (($alias !== $this->getDefaultSelectAlias()) ? $alias . '_' : '') . 'population' |
|
718 | + $this->createFunction('COUNT(`'.$aliasMemberCount.'`.`member_id`)'), |
|
719 | + (($alias !== $this->getDefaultSelectAlias()) ? $alias.'_' : '').'population' |
|
720 | 720 | ); |
721 | 721 | $this->leftJoin( |
722 | 722 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMemberCount, |
723 | - $expr->eq($alias . '.unique_id', $aliasMemberCount . '.circle_id') |
|
723 | + $expr->eq($alias.'.unique_id', $aliasMemberCount.'.circle_id') |
|
724 | 724 | ); |
725 | 725 | } |
726 | 726 | |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | $helperAlias, |
757 | 757 | CoreRequestBuilder::TABLE_CIRCLE, |
758 | 758 | $aliasCircle, |
759 | - $expr->eq($aliasCircle . '.unique_id', $helperAlias . '.' . $field) |
|
759 | + $expr->eq($aliasCircle.'.unique_id', $helperAlias.'.'.$field) |
|
760 | 760 | ); |
761 | 761 | |
762 | 762 | if (!is_null($initiator)) { |
@@ -787,7 +787,7 @@ discard block |
||
787 | 787 | $this->generateCircleSelectAlias($aliasInvitedBy) |
788 | 788 | ->leftJoin( |
789 | 789 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasInvitedBy, |
790 | - $expr->eq($aliasMember . '.invited_by', $aliasInvitedBy . '.unique_id') |
|
790 | + $expr->eq($aliasMember.'.invited_by', $aliasInvitedBy.'.unique_id') |
|
791 | 791 | ); |
792 | 792 | |
793 | 793 | $this->leftJoinOwner($aliasInvitedBy); |
@@ -818,7 +818,7 @@ discard block |
||
818 | 818 | $this->generateCircleSelectAlias($aliasBasedOn) |
819 | 819 | ->leftJoin( |
820 | 820 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasBasedOn, |
821 | - $expr->eq($aliasBasedOn . '.unique_id', $aliasMember . '.single_id') |
|
821 | + $expr->eq($aliasBasedOn.'.unique_id', $aliasMember.'.single_id') |
|
822 | 822 | ); |
823 | 823 | |
824 | 824 | if (!is_null($initiator)) { |
@@ -851,9 +851,9 @@ discard block |
||
851 | 851 | ->leftJoin( |
852 | 852 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
853 | 853 | $expr->andX( |
854 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $field), |
|
854 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$field), |
|
855 | 855 | $expr->eq( |
856 | - $aliasMember . '.level', |
|
856 | + $aliasMember.'.level', |
|
857 | 857 | $this->createNamedParameter(Member::LEVEL_OWNER, self::PARAM_INT) |
858 | 858 | ) |
859 | 859 | ) |
@@ -891,10 +891,10 @@ discard block |
||
891 | 891 | ->leftJoin( |
892 | 892 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
893 | 893 | $expr->andX( |
894 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $fieldCircleId), |
|
895 | - $expr->eq($aliasMember . '.single_id', $alias . '.' . $fieldSingleId), |
|
894 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$fieldCircleId), |
|
895 | + $expr->eq($aliasMember.'.single_id', $alias.'.'.$fieldSingleId), |
|
896 | 896 | $expr->gte( |
897 | - $aliasMember . '.level', |
|
897 | + $aliasMember.'.level', |
|
898 | 898 | $this->createNamedParameter(Member::LEVEL_MEMBER, self::PARAM_INT) |
899 | 899 | ) |
900 | 900 | ) |
@@ -927,7 +927,7 @@ discard block |
||
927 | 927 | |
928 | 928 | $this->leftJoin( |
929 | 929 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
930 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
930 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
931 | 931 | ); |
932 | 932 | |
933 | 933 | // if (!$this->getBool('getData', $options, false)) { |
@@ -941,8 +941,8 @@ discard block |
||
941 | 941 | ->leftJoin( |
942 | 942 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
943 | 943 | $expr->andX( |
944 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id'), |
|
945 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id') |
|
944 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id'), |
|
945 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id') |
|
946 | 946 | ) |
947 | 947 | ); |
948 | 948 | |
@@ -959,12 +959,12 @@ discard block |
||
959 | 959 | $aliasUpstreamMembership = $this->generateAlias($alias, self::UPSTREAM_MEMBERSHIPS, $options); |
960 | 960 | $this->leftJoin( |
961 | 961 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasUpstreamMembership, |
962 | - $expr->eq($aliasUpstreamMembership . '.single_id', $this->createNamedParameter($singleId)) |
|
962 | + $expr->eq($aliasUpstreamMembership.'.single_id', $this->createNamedParameter($singleId)) |
|
963 | 963 | ); |
964 | 964 | |
965 | 965 | $orX = $expr->orX( |
966 | - $expr->eq($aliasUpstreamMembership . '.circle_id', $alias . '.' . $field), |
|
967 | - $expr->eq($alias . '.' . $field, $this->createNamedParameter($singleId)) |
|
966 | + $expr->eq($aliasUpstreamMembership.'.circle_id', $alias.'.'.$field), |
|
967 | + $expr->eq($alias.'.'.$field, $this->createNamedParameter($singleId)) |
|
968 | 968 | ); |
969 | 969 | |
970 | 970 | $this->andWhere($orX); |
@@ -985,11 +985,11 @@ discard block |
||
985 | 985 | |
986 | 986 | $expr = $this->expr(); |
987 | 987 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); |
988 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); |
|
988 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); |
|
989 | 989 | if ($level > 1) { |
990 | 990 | $this->andWhere( |
991 | 991 | $expr->gte( |
992 | - $aliasMembership . '.level', |
|
992 | + $aliasMembership.'.level', |
|
993 | 993 | $this->createNamedParameter($level, IQueryBuilder::PARAM_INT) |
994 | 994 | ) |
995 | 995 | ); |
@@ -1017,8 +1017,8 @@ discard block |
||
1017 | 1017 | $this->leftJoin( |
1018 | 1018 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
1019 | 1019 | $expr->andX( |
1020 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field), |
|
1021 | - $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') |
|
1020 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field), |
|
1021 | + $expr->eq($aliasMembership.'.single_id', $alias.'.single_id') |
|
1022 | 1022 | ) |
1023 | 1023 | ); |
1024 | 1024 | |
@@ -1031,8 +1031,8 @@ discard block |
||
1031 | 1031 | ->leftJoin( |
1032 | 1032 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, |
1033 | 1033 | $expr->andX( |
1034 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), |
|
1035 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') |
|
1034 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), |
|
1035 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') |
|
1036 | 1036 | ) |
1037 | 1037 | ); |
1038 | 1038 | } |
@@ -1065,7 +1065,7 @@ discard block |
||
1065 | 1065 | |
1066 | 1066 | $this->leftJoin( |
1067 | 1067 | $alias, CoreRequestBuilder::TABLE_TOKEN, $aliasShareToken, |
1068 | - $expr->eq($aliasShareToken . '.share_id', $alias . '.' . $field) |
|
1068 | + $expr->eq($aliasShareToken.'.share_id', $alias.'.'.$field) |
|
1069 | 1069 | ); |
1070 | 1070 | } |
1071 | 1071 | |
@@ -1107,14 +1107,14 @@ discard block |
||
1107 | 1107 | try { |
1108 | 1108 | $aliasConfig = $this->generateAlias($alias, self::CONFIG, $options); |
1109 | 1109 | $this->selectAlias( |
1110 | - $aliasConfig . '.config', |
|
1111 | - (($alias !== $this->getDefaultSelectAlias()) ? $alias . '_' : '') . 'circle_config' |
|
1110 | + $aliasConfig.'.config', |
|
1111 | + (($alias !== $this->getDefaultSelectAlias()) ? $alias.'_' : '').'circle_config' |
|
1112 | 1112 | ); |
1113 | 1113 | $this->leftJoin( |
1114 | 1114 | $alias, |
1115 | 1115 | CoreRequestBuilder::TABLE_CIRCLE, |
1116 | 1116 | $aliasConfig, |
1117 | - $expr->eq($alias . '.circle_id', $aliasConfig . '.unique_id') |
|
1117 | + $expr->eq($alias.'.circle_id', $aliasConfig.'.unique_id') |
|
1118 | 1118 | ); |
1119 | 1119 | } catch (RequestBuilderException $e) { |
1120 | 1120 | } |
@@ -1152,7 +1152,7 @@ discard block |
||
1152 | 1152 | $aliasMembership, |
1153 | 1153 | $expr->andX( |
1154 | 1154 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasMembership), |
1155 | - $expr->eq($aliasMembership . '.circle_id', $helperAlias . '.' . $field) |
|
1155 | + $expr->eq($aliasMembership.'.circle_id', $helperAlias.'.'.$field) |
|
1156 | 1156 | ) |
1157 | 1157 | ); |
1158 | 1158 | |
@@ -1162,7 +1162,7 @@ discard block |
||
1162 | 1162 | $aliasMembership, |
1163 | 1163 | CoreRequestBuilder::TABLE_CIRCLE, |
1164 | 1164 | $aliasMembershipCircle, |
1165 | - $expr->eq($aliasMembership . '.circle_id', $aliasMembershipCircle . '.unique_id') |
|
1165 | + $expr->eq($aliasMembership.'.circle_id', $aliasMembershipCircle.'.unique_id') |
|
1166 | 1166 | ); |
1167 | 1167 | } catch (RequestBuilderException $e) { |
1168 | 1168 | } |
@@ -1183,7 +1183,7 @@ discard block |
||
1183 | 1183 | $aliasDirectInitiator, |
1184 | 1184 | $expr->andX( |
1185 | 1185 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasDirectInitiator), |
1186 | - $expr->eq($aliasDirectInitiator . '.circle_id', $helperAlias . '.' . $field) |
|
1186 | + $expr->eq($aliasDirectInitiator.'.circle_id', $helperAlias.'.'.$field) |
|
1187 | 1187 | ) |
1188 | 1188 | ); |
1189 | 1189 | } catch (RequestBuilderException $e) { |
@@ -1196,8 +1196,8 @@ discard block |
||
1196 | 1196 | $this->leftJoin( |
1197 | 1197 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
1198 | 1198 | $expr->andX( |
1199 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), |
|
1200 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') |
|
1199 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), |
|
1200 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') |
|
1201 | 1201 | ) |
1202 | 1202 | ); |
1203 | 1203 | |
@@ -1205,8 +1205,8 @@ discard block |
||
1205 | 1205 | $this->leftJoin( |
1206 | 1206 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
1207 | 1207 | $expr->andX( |
1208 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), |
|
1209 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') |
|
1208 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), |
|
1209 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') |
|
1210 | 1210 | ) |
1211 | 1211 | ); |
1212 | 1212 | |
@@ -1257,7 +1257,7 @@ discard block |
||
1257 | 1257 | $orX->add( |
1258 | 1258 | $expr->andX( |
1259 | 1259 | $this->exprLimitBitwise('config', Circle::CFG_PERSONAL, $aliasMembershipCircle), |
1260 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1260 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1261 | 1261 | ) |
1262 | 1262 | ); |
1263 | 1263 | } |
@@ -1342,21 +1342,21 @@ discard block |
||
1342 | 1342 | $expr = $this->expr(); |
1343 | 1343 | $andPassive = $expr->andX(); |
1344 | 1344 | $andPassive->add( |
1345 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1345 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1346 | 1346 | ); |
1347 | 1347 | |
1348 | 1348 | $orMemberOrLevel = $expr->orX(); |
1349 | 1349 | $orMemberOrLevel->add( |
1350 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance') |
|
1350 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance') |
|
1351 | 1351 | ); |
1352 | 1352 | // TODO: do we need this ? (display members from the local instance) |
1353 | 1353 | $orMemberOrLevel->add( |
1354 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance') |
|
1354 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance') |
|
1355 | 1355 | ); |
1356 | 1356 | |
1357 | 1357 | $orMemberOrLevel->add( |
1358 | 1358 | $expr->eq( |
1359 | - $this->getDefaultSelectAlias() . '.level', |
|
1359 | + $this->getDefaultSelectAlias().'.level', |
|
1360 | 1360 | $this->createNamedParameter(Member::LEVEL_OWNER) |
1361 | 1361 | ) |
1362 | 1362 | ); |
@@ -1393,11 +1393,11 @@ discard block |
||
1393 | 1393 | ) |
1394 | 1394 | ->leftJoin( |
1395 | 1395 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, |
1396 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') |
|
1396 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') |
|
1397 | 1397 | ) |
1398 | 1398 | ->leftJoin( |
1399 | 1399 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, |
1400 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') |
|
1400 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') |
|
1401 | 1401 | ); |
1402 | 1402 | } |
1403 | 1403 | |
@@ -1419,8 +1419,8 @@ discard block |
||
1419 | 1419 | $this->leftJoin( |
1420 | 1420 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, |
1421 | 1421 | $expr->andX( |
1422 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), |
|
1423 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') |
|
1422 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), |
|
1423 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') |
|
1424 | 1424 | ) |
1425 | 1425 | ); |
1426 | 1426 | |
@@ -1470,13 +1470,13 @@ discard block |
||
1470 | 1470 | $this->leftJoin( |
1471 | 1471 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, |
1472 | 1472 | $expr->andX( |
1473 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), |
|
1474 | - $expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id') |
|
1473 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), |
|
1474 | + $expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id') |
|
1475 | 1475 | ) |
1476 | 1476 | ); |
1477 | 1477 | |
1478 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); |
|
1479 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); |
|
1478 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); |
|
1479 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); |
|
1480 | 1480 | } |
1481 | 1481 | |
1482 | 1482 | |
@@ -1580,10 +1580,10 @@ discard block |
||
1580 | 1580 | */ |
1581 | 1581 | public function generateAlias(string $base, string $extension, ?array &$options = []): string { |
1582 | 1582 | $search = str_replace('_', '.', $base); |
1583 | - $path = $search . '.' . $extension; |
|
1583 | + $path = $search.'.'.$extension; |
|
1584 | 1584 | if (!$this->validKey($path, self::$SQL_PATH) |
1585 | 1585 | && !in_array($extension, $this->getArray($search, self::$SQL_PATH))) { |
1586 | - throw new RequestBuilderException($extension . ' not found in ' . $search); |
|
1586 | + throw new RequestBuilderException($extension.' not found in '.$search); |
|
1587 | 1587 | } |
1588 | 1588 | |
1589 | 1589 | if (!is_array($options)) { |
@@ -1592,15 +1592,15 @@ discard block |
||
1592 | 1592 | |
1593 | 1593 | $optionPath = ''; |
1594 | 1594 | foreach (explode('.', $path) as $p) { |
1595 | - $optionPath = trim($optionPath . '.' . $p, '.'); |
|
1595 | + $optionPath = trim($optionPath.'.'.$p, '.'); |
|
1596 | 1596 | $options = array_merge( |
1597 | 1597 | $options, |
1598 | - $this->getArray($optionPath . '.' . self::OPTIONS, self::$SQL_PATH), |
|
1599 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) |
|
1598 | + $this->getArray($optionPath.'.'.self::OPTIONS, self::$SQL_PATH), |
|
1599 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) |
|
1600 | 1600 | ); |
1601 | 1601 | } |
1602 | 1602 | |
1603 | - return $base . '_' . $extension; |
|
1603 | + return $base.'_'.$extension; |
|
1604 | 1604 | } |
1605 | 1605 | |
1606 | 1606 | |
@@ -1620,7 +1620,7 @@ discard block |
||
1620 | 1620 | } else { |
1621 | 1621 | $k = $arr; |
1622 | 1622 | } |
1623 | - $path[$k] = $prefix . '_' . $k . '_'; |
|
1623 | + $path[$k] = $prefix.'_'.$k.'_'; |
|
1624 | 1624 | } |
1625 | 1625 | |
1626 | 1626 | return $path; |
@@ -1637,7 +1637,7 @@ discard block |
||
1637 | 1637 | $expr = $this->expr(); |
1638 | 1638 | $orX = $expr->orX(); |
1639 | 1639 | foreach ($aliases as $alias) { |
1640 | - $orX->add($expr->gte($alias . '.level', $this->createNamedParameter($level))); |
|
1640 | + $orX->add($expr->gte($alias.'.level', $this->createNamedParameter($level))); |
|
1641 | 1641 | } |
1642 | 1642 | |
1643 | 1643 | return $orX; |
@@ -252,8 +252,8 @@ discard block |
||
252 | 252 | $qb->filterDirectMembership(CoreQueryBuilder::MEMBER, $probe->getFilterMember()); |
253 | 253 | } |
254 | 254 | |
255 | - $qb->orderBy($qb->getDefaultSelectAlias() . '.level', 'desc'); |
|
256 | - $qb->addOrderBy($qb->getDefaultSelectAlias() . '.cached_name', 'asc'); |
|
255 | + $qb->orderBy($qb->getDefaultSelectAlias().'.level', 'desc'); |
|
256 | + $qb->addOrderBy($qb->getDefaultSelectAlias().'.cached_name', 'asc'); |
|
257 | 257 | |
258 | 258 | return $this->getItemsFromRequest($qb); |
259 | 259 | } |
@@ -278,8 +278,8 @@ discard block |
||
278 | 278 | $qb->limitToMembersByInheritance(CoreQueryBuilder::MEMBER, $singleId, $level); |
279 | 279 | |
280 | 280 | $aliasMembership = $qb->generateAlias(CoreQueryBuilder::MEMBER, CoreQueryBuilder::MEMBERSHIPS); |
281 | - $qb->orderBy($aliasMembership . '.inheritance_depth', 'asc') |
|
282 | - ->addGroupBy($aliasMembership . '.inheritance_depth'); |
|
281 | + $qb->orderBy($aliasMembership.'.inheritance_depth', 'asc') |
|
282 | + ->addGroupBy($aliasMembership.'.inheritance_depth'); |
|
283 | 283 | |
284 | 284 | return $this->getItemsFromRequest($qb); |
285 | 285 | } |
@@ -338,10 +338,10 @@ discard block |
||
338 | 338 | $qb = $this->getMemberSelectSql(); |
339 | 339 | $qb->limitToCircleId($circleId); |
340 | 340 | |
341 | - $qb->andwhere($qb->expr()->nonEmptyString(CoreQueryBuilder::MEMBER . '.instance')); |
|
341 | + $qb->andwhere($qb->expr()->nonEmptyString(CoreQueryBuilder::MEMBER.'.instance')); |
|
342 | 342 | |
343 | 343 | return array_map( |
344 | - function (Member $member): string { |
|
344 | + function(Member $member): string { |
|
345 | 345 | return $member->getInstance(); |
346 | 346 | }, $this->getItemsFromRequest($qb) |
347 | 347 | ); |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | */ |
392 | 392 | public function searchFederatedUsers(string $needle): array { |
393 | 393 | $qb = $this->getMemberSelectSql(); |
394 | - $qb->searchInDBField('user_id', '%' . $needle . '%'); |
|
394 | + $qb->searchInDBField('user_id', '%'.$needle.'%'); |
|
395 | 395 | |
396 | 396 | return $this->getItemsFromRequest($qb, true); |
397 | 397 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $this->federatedUserService->bypassCurrentUserCondition(true); |
150 | 150 | |
151 | 151 | $this->lockMaintenanceRun(); |
152 | - $this->debug('running maintenance (' . $level . ')'); |
|
152 | + $this->debug('running maintenance ('.$level.')'); |
|
153 | 153 | |
154 | 154 | switch ($level) { |
155 | 155 | case 1: |
@@ -308,14 +308,14 @@ discard block |
||
308 | 308 | ->includeSystemCircles(); |
309 | 309 | |
310 | 310 | $circles = array_map( |
311 | - function (Circle $circle) { |
|
311 | + function(Circle $circle) { |
|
312 | 312 | return $circle->getSingleId(); |
313 | 313 | }, $this->circleRequest->getCircles(null, $probe) |
314 | 314 | ); |
315 | 315 | |
316 | 316 | $shares = array_unique( |
317 | 317 | array_map( |
318 | - function (ShareWrapper $share) { |
|
318 | + function(ShareWrapper $share) { |
|
319 | 319 | return $share->getSharedWith(); |
320 | 320 | }, $this->shareWrapperRequest->getShares() |
321 | 321 | ) |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | */ |
361 | 361 | private function output(string $message): void { |
362 | 362 | if (!is_null($this->output)) { |
363 | - $this->output->writeln('- ' . $message); |
|
363 | + $this->output->writeln('- '.$message); |
|
364 | 364 | } |
365 | 365 | } |
366 | 366 | } |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | |
204 | 204 | // get the singleId of a Group |
205 | 205 | $federatedUser = $circlesManager->getFederatedUser('testGroup', Member::TYPE_GROUP); |
206 | - echo 'singleId: ' . $federatedUser->getSingleId() . "\n"; |
|
206 | + echo 'singleId: '.$federatedUser->getSingleId()."\n"; |
|
207 | 207 | |
208 | 208 | // $federatedUser->getMemberships(); |
209 | 209 | |
@@ -242,8 +242,8 @@ discard block |
||
242 | 242 | |
243 | 243 | |
244 | 244 | $members = array_map( |
245 | - function (Member $member): string { |
|
246 | - return $member->getUserId() . ' ' . $member->getSingleId() . ' - ' . $member->getUserType(); |
|
245 | + function(Member $member): string { |
|
246 | + return $member->getUserId().' '.$member->getSingleId().' - '.$member->getUserType(); |
|
247 | 247 | }, $circle->getInheritedMembers() |
248 | 248 | ); |
249 | 249 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | } catch (Exception $e) { |
330 | 330 | if ($this->pOn) { |
331 | 331 | $message = ($e->getMessage() !== '') ? $e->getMessage() : get_class($e); |
332 | - $this->output->writeln('<error>' . $message . '</error>'); |
|
332 | + $this->output->writeln('<error>'.$message.'</error>'); |
|
333 | 333 | } else { |
334 | 334 | throw $e; |
335 | 335 | } |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | */ |
414 | 414 | private function loadConfiguration() { |
415 | 415 | $this->p('Loading configuration'); |
416 | - $configuration = file_get_contents(__DIR__ . '/../../testConfiguration.json'); |
|
416 | + $configuration = file_get_contents(__DIR__.'/../../testConfiguration.json'); |
|
417 | 417 | $this->config = json_decode($configuration, true); |
418 | 418 | $this->r(true, 'testConfiguration.json'); |
419 | 419 | |
@@ -446,22 +446,22 @@ discard block |
||
446 | 446 | $this->r(); |
447 | 447 | |
448 | 448 | foreach ($this->getInstances() as $instance) { |
449 | - $this->p('Creating users on ' . $instance); |
|
449 | + $this->p('Creating users on '.$instance); |
|
450 | 450 | foreach ($this->getConfigArray($instance, 'users') as $userId) { |
451 | 451 | $this->pm($userId); |
452 | 452 | $this->occ( |
453 | - $instance, 'user:add --password-from-env ' . $userId, false, false, |
|
453 | + $instance, 'user:add --password-from-env '.$userId, false, false, |
|
454 | 454 | ['OC_PASS' => 'testtest'] |
455 | 455 | ); |
456 | 456 | } |
457 | 457 | $this->r(); |
458 | 458 | |
459 | 459 | foreach ($this->getConfigArray($instance, 'groups') as $groupId => $users) { |
460 | - $this->p('Creating group <info>' . $groupId . '</info> on <info>' . $instance . '</info>'); |
|
461 | - $this->occ($instance, 'group:add ' . $groupId, false, false); |
|
460 | + $this->p('Creating group <info>'.$groupId.'</info> on <info>'.$instance.'</info>'); |
|
461 | + $this->occ($instance, 'group:add '.$groupId, false, false); |
|
462 | 462 | foreach ($users as $userId) { |
463 | 463 | $this->pm($userId); |
464 | - $this->occ($instance, 'group:adduser ' . $groupId . ' ' . $userId, true, false); |
|
464 | + $this->occ($instance, 'group:adduser '.$groupId.' '.$userId, true, false); |
|
465 | 465 | } |
466 | 466 | $this->r(); |
467 | 467 | } |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | foreach ($this->getInstances(true) as $instance) { |
496 | 496 | $this->pm($instance); |
497 | 497 | foreach ($this->getConfigArray($instance, 'config') as $k => $v) { |
498 | - $this->occ($instance, 'config:app:set --value ' . $v . ' circles ' . $k, true, false); |
|
498 | + $this->occ($instance, 'config:app:set --value '.$v.' circles '.$k, true, false); |
|
499 | 499 | } |
500 | 500 | } |
501 | 501 | $this->r(); |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | */ |
509 | 509 | private function confirmVersion() { |
510 | 510 | $version = $this->configService->getAppValue('installed_version'); |
511 | - $this->p('Confirming version <info>' . $version . '</info>'); |
|
511 | + $this->p('Confirming version <info>'.$version.'</info>'); |
|
512 | 512 | foreach ($this->getInstances(false) as $instance) { |
513 | 513 | $this->pm($instance); |
514 | 514 | $capabilities = $this->occ($instance, 'circles:check --capabilities'); |
@@ -559,12 +559,12 @@ discard block |
||
559 | 559 | */ |
560 | 560 | private function statusFreshInstances() { |
561 | 561 | foreach ($this->getInstances() as $instanceId) { |
562 | - $this->p('Circles on ' . $instanceId); |
|
562 | + $this->p('Circles on '.$instanceId); |
|
563 | 563 | $result = $this->occ($instanceId, 'circles:manage:list --all'); |
564 | 564 | $expectedSize = sizeof($this->getConfigArray($instanceId, 'groups')) |
565 | 565 | + sizeof($this->getConfigArray($instanceId, 'users')) |
566 | 566 | + 1; |
567 | - $this->r((sizeof($result) === $expectedSize), sizeof($result) . ' circles'); |
|
567 | + $this->r((sizeof($result) === $expectedSize), sizeof($result).' circles'); |
|
568 | 568 | |
569 | 569 | $membersList = $groupsList = []; |
570 | 570 | foreach ($result as $item) { |
@@ -583,12 +583,12 @@ discard block |
||
583 | 583 | $instance = $this->getConfig($instanceId, 'config.frontal_cloud_id'); |
584 | 584 | |
585 | 585 | foreach ($this->getConfigArray($instanceId, 'users') as $userId) { |
586 | - $this->p('Checking Single Circle for <comment>' . $userId . '@' . $instance . '</comment>'); |
|
586 | + $this->p('Checking Single Circle for <comment>'.$userId.'@'.$instance.'</comment>'); |
|
587 | 587 | $circle = $this->getSingleCircleForMember($membersList, $userId, $instance); |
588 | 588 | |
589 | 589 | $compareToOwnerBasedOn = new Circle(); |
590 | 590 | $compareToOwnerBasedOn->setConfig(Circle::CFG_SINGLE) |
591 | - ->setName('user:' . $userId . ':{CIRCLEID}') |
|
591 | + ->setName('user:'.$userId.':{CIRCLEID}') |
|
592 | 592 | ->setDisplayName($userId); |
593 | 593 | |
594 | 594 | $compareToOwner = new Member(); |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | $compareTo = new Circle(); |
607 | 607 | $compareTo->setOwner($compareToOwner) |
608 | 608 | ->setConfig(Circle::CFG_SINGLE) |
609 | - ->setName('user:' . $userId . ':{CIRCLEID}') |
|
609 | + ->setName('user:'.$userId.':{CIRCLEID}') |
|
610 | 610 | ->setDisplayName($userId); |
611 | 611 | |
612 | 612 | $this->confirmCircleData($circle, $compareTo); |
@@ -643,8 +643,8 @@ discard block |
||
643 | 643 | $this->r(true, $circle->getSingleId()); |
644 | 644 | |
645 | 645 | foreach ($this->getConfigArray($instanceId, 'groups') as $groupId => $members) { |
646 | - $this->p('Checking Circle for <comment>' . $groupId . '@' . $instance . '</comment>'); |
|
647 | - $circle = $this->getCircleFromList($groupsList, 'group:' . $groupId); |
|
646 | + $this->p('Checking Circle for <comment>'.$groupId.'@'.$instance.'</comment>'); |
|
647 | + $circle = $this->getCircleFromList($groupsList, 'group:'.$groupId); |
|
648 | 648 | |
649 | 649 | $appCircle = $this->getSingleCircleForMember($membersList, 'circles', $instance); |
650 | 650 | $appOwner = $appCircle->getOwner(); |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | $compareTo = new Circle(); |
669 | 669 | $compareTo->setOwner($compareToOwner) |
670 | 670 | ->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN) |
671 | - ->setName('group:' . $groupId) |
|
671 | + ->setName('group:'.$groupId) |
|
672 | 672 | ->setDisplayName($groupId); |
673 | 673 | |
674 | 674 | $this->confirmCircleData($circle, $compareTo); |
@@ -685,12 +685,12 @@ discard block |
||
685 | 685 | */ |
686 | 686 | private function createRemoteLink() { |
687 | 687 | foreach ($this->getInstances() as $instanceId) { |
688 | - $this->p('Init remote link from ' . $instanceId); |
|
688 | + $this->p('Init remote link from '.$instanceId); |
|
689 | 689 | $links = $this->getConfigArray($instanceId, 'remote'); |
690 | 690 | foreach ($links as $link => $type) { |
691 | 691 | $remote = $this->getConfig($link, 'config.frontal_cloud_id'); |
692 | - $this->pm($remote . '(' . $type . ')'); |
|
693 | - $this->occ($instanceId, 'circles:remote ' . $remote . ' --type ' . $type . ' --yes'); |
|
692 | + $this->pm($remote.'('.$type.')'); |
|
693 | + $this->occ($instanceId, 'circles:remote '.$remote.' --type '.$type.' --yes'); |
|
694 | 694 | } |
695 | 695 | $this->r(); |
696 | 696 | } |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | private function buildingLocalDatabase() { |
705 | 705 | $this->circles = $this->federatedUsers = []; |
706 | 706 | foreach ($this->getInstances() as $instanceId) { |
707 | - $this->p('Retrieving Circles from ' . $instanceId); |
|
707 | + $this->p('Retrieving Circles from '.$instanceId); |
|
708 | 708 | $circles = $this->occ($instanceId, 'circles:manage:list --all'); |
709 | 709 | foreach ($circles as $item) { |
710 | 710 | /** @var Circle $circle */ |
@@ -739,7 +739,7 @@ discard block |
||
739 | 739 | $name = self::$TEST_CIRCLES[0]; |
740 | 740 | $owner = $this->getInstanceUsers($localInstanceId)[1]; |
741 | 741 | $dataCreatedCircle001 = |
742 | - $this->occ($localInstanceId, 'circles:manage:create --type user ' . $owner . ' ' . $name); |
|
742 | + $this->occ($localInstanceId, 'circles:manage:create --type user '.$owner.' '.$name); |
|
743 | 743 | /** @var Circle $createdCircle */ |
744 | 744 | $createdCircle = $this->deserialize($dataCreatedCircle001, Circle::class); |
745 | 745 | $this->circles[$localInstanceId][$createdCircle->getName()] = $createdCircle; |
@@ -771,7 +771,7 @@ discard block |
||
771 | 771 | |
772 | 772 | |
773 | 773 | $this->p('Comparing local stored data'); |
774 | - $dataCircle = $this->occ($localInstanceId, 'circle:manage:details ' . $createdCircle->getSingleId()); |
|
774 | + $dataCircle = $this->occ($localInstanceId, 'circle:manage:details '.$createdCircle->getSingleId()); |
|
775 | 775 | |
776 | 776 | /** @var Circle $tmpCircle */ |
777 | 777 | $tmpCircle = $this->deserialize($dataCircle, Circle::class); |
@@ -780,9 +780,9 @@ discard block |
||
780 | 780 | |
781 | 781 | $links = $this->getConfigArray('global-scale-1', 'remote'); |
782 | 782 | foreach ($this->getInstances(false) as $instanceId) { |
783 | - $this->p('Comparing data stored on ' . $instanceId); |
|
783 | + $this->p('Comparing data stored on '.$instanceId); |
|
784 | 784 | $dataCircle = |
785 | - $this->occ($instanceId, 'circle:manage:details ' . $createdCircle->getSingleId(), false); |
|
785 | + $this->occ($instanceId, 'circle:manage:details '.$createdCircle->getSingleId(), false); |
|
786 | 786 | |
787 | 787 | if ($instanceId === $localInstanceId || $links[$instanceId] === 'GlobalScale') { |
788 | 788 | /** @var Circle $tmpCircle */ |
@@ -835,11 +835,11 @@ discard block |
||
835 | 835 | $name = self::$TEST_CIRCLES[0]; |
836 | 836 | $circle = $this->getCircleByName($localInstanceId, $name); |
837 | 837 | $userId = $this->getInstanceUsers($localInstanceId)[6]; |
838 | - $userCircle = $this->getCircleByName($localInstanceId, 'user:' . $userId); |
|
838 | + $userCircle = $this->getCircleByName($localInstanceId, 'user:'.$userId); |
|
839 | 839 | $user = $userCircle->getOwner(); |
840 | 840 | $dataAddedMember = |
841 | 841 | $this->occ( |
842 | - $localInstanceId, 'circles:members:add ' . $circle->getSingleId() . ' ' . $user->getSingleId() |
|
842 | + $localInstanceId, 'circles:members:add '.$circle->getSingleId().' '.$user->getSingleId() |
|
843 | 843 | ); |
844 | 844 | /** @var Member $addedMember */ |
845 | 845 | $addedMember = $this->deserialize($dataAddedMember, Member::class); |
@@ -859,11 +859,11 @@ discard block |
||
859 | 859 | |
860 | 860 | $circle = $this->getCircleByName($localInstanceId, $circleName); |
861 | 861 | $userId = $this->getInstanceUsers($localInstanceId)[6]; |
862 | - $userCircle = $this->getCircleByName($localInstanceId, 'user:' . $userId); |
|
862 | + $userCircle = $this->getCircleByName($localInstanceId, 'user:'.$userId); |
|
863 | 863 | $user = $userCircle->getOwner(); |
864 | 864 | $dataAddedMember = |
865 | 865 | $this->occ( |
866 | - $localInstanceId, 'circles:members:add ' . $circle->getSingleId() . ' ' . $user->getSingleId() |
|
866 | + $localInstanceId, 'circles:members:add '.$circle->getSingleId().' '.$user->getSingleId() |
|
867 | 867 | ); |
868 | 868 | /** @var Member $addedMember */ |
869 | 869 | $addedMember = $this->deserialize($dataAddedMember, Member::class); |
@@ -957,13 +957,13 @@ discard block |
||
957 | 957 | ]; |
958 | 958 | } |
959 | 959 | |
960 | - $this->compare($compareTo->getSingleId(), $circle->getSingleId(), $prefix . '.id', $params); |
|
961 | - $this->compare($compareTo->getName(), $circle->getName(), $prefix . '.name', $params); |
|
960 | + $this->compare($compareTo->getSingleId(), $circle->getSingleId(), $prefix.'.id', $params); |
|
961 | + $this->compare($compareTo->getName(), $circle->getName(), $prefix.'.name', $params); |
|
962 | 962 | $this->compare( |
963 | - $compareTo->getDisplayName(), $circle->getDisplayName(), $prefix . '.displayName', $params |
|
963 | + $compareTo->getDisplayName(), $circle->getDisplayName(), $prefix.'.displayName', $params |
|
964 | 964 | ); |
965 | - $this->compareInt($compareTo->getConfig(), $circle->getConfig(), $prefix . '.config', true); |
|
966 | - $this->compareInt($compareTo->getSource(), $circle->getSource(), $prefix . '.source'); |
|
965 | + $this->compareInt($compareTo->getConfig(), $circle->getConfig(), $prefix.'.config', true); |
|
966 | + $this->compareInt($compareTo->getSource(), $circle->getSource(), $prefix.'.source'); |
|
967 | 967 | |
968 | 968 | if ($compareTo->hasOwner()) { |
969 | 969 | $compareToOwner = $compareTo->getOwner(); |
@@ -973,7 +973,7 @@ discard block |
||
973 | 973 | throw new Exception('empty owner'); |
974 | 974 | } |
975 | 975 | if ($owner->getCircleId() !== $circle->getSingleId()) { |
976 | - throw new Exception($prefix . '.owner.circleId is different than ' . $prefix . '.id'); |
|
976 | + throw new Exception($prefix.'.owner.circleId is different than '.$prefix.'.id'); |
|
977 | 977 | } |
978 | 978 | $this->confirmMemberData($owner, $compareToOwner, 'owner', false, $params); |
979 | 979 | } |
@@ -986,7 +986,7 @@ discard block |
||
986 | 986 | } |
987 | 987 | $initiator = $circle->getInitiator(); |
988 | 988 | if ($initiator->getCircleId() !== $circle->getSingleId()) { |
989 | - throw new Exception($prefix . '.initiator.circleId is different than ' . $prefix . '.id'); |
|
989 | + throw new Exception($prefix.'.initiator.circleId is different than '.$prefix.'.id'); |
|
990 | 990 | } |
991 | 991 | $this->confirmMemberData($initiator, $compareToInitiator, 'owner', false, $params); |
992 | 992 | } |
@@ -1013,27 +1013,27 @@ discard block |
||
1013 | 1013 | bool $versa = false, |
1014 | 1014 | array $params = [] |
1015 | 1015 | ) { |
1016 | - $this->compare($compareTo->getId(), $member->getId(), $prefix . '.id', $params); |
|
1017 | - $this->compare($compareTo->getCircleId(), $member->getCircleId(), $prefix . '.circleId', $params); |
|
1018 | - $this->compare($compareTo->getSingleId(), $member->getSingleId(), $prefix . '.singleId', $params); |
|
1019 | - $this->compare($compareTo->getUserId(), $member->getUserId(), $prefix . '.userId', $params); |
|
1016 | + $this->compare($compareTo->getId(), $member->getId(), $prefix.'.id', $params); |
|
1017 | + $this->compare($compareTo->getCircleId(), $member->getCircleId(), $prefix.'.circleId', $params); |
|
1018 | + $this->compare($compareTo->getSingleId(), $member->getSingleId(), $prefix.'.singleId', $params); |
|
1019 | + $this->compare($compareTo->getUserId(), $member->getUserId(), $prefix.'.userId', $params); |
|
1020 | 1020 | $this->compare( |
1021 | - $compareTo->getDisplayName(), $member->getDisplayName(), $prefix . '.displayName', $params |
|
1021 | + $compareTo->getDisplayName(), $member->getDisplayName(), $prefix.'.displayName', $params |
|
1022 | 1022 | ); |
1023 | - $this->compareInt($compareTo->getUserType(), $member->getUserType(), $prefix . '.userType'); |
|
1024 | - $this->compare($compareTo->getInstance(), $member->getInstance(), $prefix . '.instance', $params); |
|
1025 | - $this->compareInt($compareTo->getLevel(), $member->getLevel(), $prefix . '.level', true); |
|
1026 | - $this->compare($compareTo->getStatus(), $member->getStatus(), $prefix . '.status', $params); |
|
1023 | + $this->compareInt($compareTo->getUserType(), $member->getUserType(), $prefix.'.userType'); |
|
1024 | + $this->compare($compareTo->getInstance(), $member->getInstance(), $prefix.'.instance', $params); |
|
1025 | + $this->compareInt($compareTo->getLevel(), $member->getLevel(), $prefix.'.level', true); |
|
1026 | + $this->compare($compareTo->getStatus(), $member->getStatus(), $prefix.'.status', $params); |
|
1027 | 1027 | |
1028 | 1028 | if ($compareTo->hasBasedOn()) { |
1029 | 1029 | if (!$member->hasBasedOn()) { |
1030 | - throw new Exception('empty ' . $prefix . '.basedOn'); |
|
1030 | + throw new Exception('empty '.$prefix.'.basedOn'); |
|
1031 | 1031 | } |
1032 | 1032 | $basedOn = $member->getBasedOn(); |
1033 | 1033 | $this->confirmCircleData( |
1034 | 1034 | $basedOn, |
1035 | 1035 | $compareTo->getBasedOn(), |
1036 | - $prefix . '.basedOn', |
|
1036 | + $prefix.'.basedOn', |
|
1037 | 1037 | false, |
1038 | 1038 | $params |
1039 | 1039 | ); |
@@ -1052,7 +1052,7 @@ discard block |
||
1052 | 1052 | private function compare(string $expected, string $compare, string $def, array $params) { |
1053 | 1053 | if ($expected !== '' |
1054 | 1054 | && $this->feedStringWithParams($expected, $params) !== $compare) { |
1055 | - throw new Exception($def . ': ' . $compare . ' (' . $expected . ')'); |
|
1055 | + throw new Exception($def.': '.$compare.' ('.$expected.')'); |
|
1056 | 1056 | } |
1057 | 1057 | } |
1058 | 1058 | |
@@ -1068,7 +1068,7 @@ discard block |
||
1068 | 1068 | private function compareInt(int $expected, int $compare, string $def, bool $force = false) { |
1069 | 1069 | if (($expected > 0 || ($force && $expected >= 0)) |
1070 | 1070 | && $expected !== $compare) { |
1071 | - throw new Exception('wrong ' . $def . ': ' . $compare . ' (' . $expected . ')'); |
|
1071 | + throw new Exception('wrong '.$def.': '.$compare.' ('.$expected.')'); |
|
1072 | 1072 | } |
1073 | 1073 | } |
1074 | 1074 | |
@@ -1104,7 +1104,7 @@ discard block |
||
1104 | 1104 | } |
1105 | 1105 | } |
1106 | 1106 | |
1107 | - throw new CircleNotFoundException('cannot find ' . $userId . ' in the list of Single Circle'); |
|
1107 | + throw new CircleNotFoundException('cannot find '.$userId.' in the list of Single Circle'); |
|
1108 | 1108 | } |
1109 | 1109 | |
1110 | 1110 | |
@@ -1122,7 +1122,7 @@ discard block |
||
1122 | 1122 | } |
1123 | 1123 | |
1124 | 1124 | throw new CircleNotFoundException( |
1125 | - 'cannot extract \'' . $name . '\' from the list of generated Circles' |
|
1125 | + 'cannot extract \''.$name.'\' from the list of generated Circles' |
|
1126 | 1126 | ); |
1127 | 1127 | } |
1128 | 1128 | |
@@ -1142,7 +1142,7 @@ discard block |
||
1142 | 1142 | } |
1143 | 1143 | |
1144 | 1144 | throw new CircleNotFoundException( |
1145 | - 'cannot extract \'' . $name . '\' from the list of provided Circles' |
|
1145 | + 'cannot extract \''.$name.'\' from the list of provided Circles' |
|
1146 | 1146 | ); |
1147 | 1147 | } |
1148 | 1148 | |
@@ -1187,7 +1187,7 @@ discard block |
||
1187 | 1187 | } |
1188 | 1188 | } |
1189 | 1189 | |
1190 | - throw new ItemNotFoundException($instance . ' not found'); |
|
1190 | + throw new ItemNotFoundException($instance.' not found'); |
|
1191 | 1191 | } |
1192 | 1192 | |
1193 | 1193 | |
@@ -1222,7 +1222,7 @@ discard block |
||
1222 | 1222 | ): ?array { |
1223 | 1223 | $configInstance = $this->getConfigInstance($instance); |
1224 | 1224 | $path = $this->get('path', $configInstance); |
1225 | - $occ = rtrim($path, '/') . '/occ'; |
|
1225 | + $occ = rtrim($path, '/').'/occ'; |
|
1226 | 1226 | |
1227 | 1227 | $command = array_merge([$occ], explode(' ', $cmd)); |
1228 | 1228 | if ($jsonAsOutput) { |
@@ -1232,7 +1232,7 @@ discard block |
||
1232 | 1232 | $process->run(null, $env); |
1233 | 1233 | |
1234 | 1234 | if ($exceptionOnFail && !$process->isSuccessful()) { |
1235 | - throw new Exception(implode(' ', $command) . ' failed'); |
|
1235 | + throw new Exception(implode(' ', $command).' failed'); |
|
1236 | 1236 | } |
1237 | 1237 | |
1238 | 1238 | $output = json_decode($process->getOutput(), true); |
@@ -1255,7 +1255,7 @@ discard block |
||
1255 | 1255 | */ |
1256 | 1256 | private function t(string $title): void { |
1257 | 1257 | $this->output->writeln(''); |
1258 | - $this->output->writeln('<comment>### ' . $title . '</comment>'); |
|
1258 | + $this->output->writeln('<comment>### '.$title.'</comment>'); |
|
1259 | 1259 | $this->output->writeln(''); |
1260 | 1260 | } |
1261 | 1261 | |
@@ -1264,14 +1264,14 @@ discard block |
||
1264 | 1264 | */ |
1265 | 1265 | private function p(string $processing): void { |
1266 | 1266 | $this->pOn = true; |
1267 | - $this->output->write('- ' . $processing . ': '); |
|
1267 | + $this->output->write('- '.$processing.': '); |
|
1268 | 1268 | } |
1269 | 1269 | |
1270 | 1270 | /** |
1271 | 1271 | * @param string $more |
1272 | 1272 | */ |
1273 | 1273 | private function pm(string $more): void { |
1274 | - $this->output->write($more . ' '); |
|
1274 | + $this->output->write($more.' '); |
|
1275 | 1275 | } |
1276 | 1276 | |
1277 | 1277 | /** |
@@ -1281,9 +1281,9 @@ discard block |
||
1281 | 1281 | private function r(bool $result = true, string $info = ''): void { |
1282 | 1282 | $this->pOn = false; |
1283 | 1283 | if ($result) { |
1284 | - $this->output->writeln('<info>' . (($info !== '') ? $info : 'done') . '</info>'); |
|
1284 | + $this->output->writeln('<info>'.(($info !== '') ? $info : 'done').'</info>'); |
|
1285 | 1285 | } else { |
1286 | - $this->output->writeln('<error>' . (($info !== '') ? $info : 'done') . '</error>'); |
|
1286 | + $this->output->writeln('<error>'.(($info !== '') ? $info : 'done').'</error>'); |
|
1287 | 1287 | } |
1288 | 1288 | } |
1289 | 1289 | |
@@ -1305,16 +1305,16 @@ discard block |
||
1305 | 1305 | $dataAddedMember = |
1306 | 1306 | $this->occ( |
1307 | 1307 | $instanceId, |
1308 | - 'circles:members:add ' . $circle->getSingleId() . ' ' . $userId . ' --type ' . $type |
|
1308 | + 'circles:members:add '.$circle->getSingleId().' '.$userId.' --type '.$type |
|
1309 | 1309 | ); |
1310 | 1310 | /** @var Member $addedMember */ |
1311 | 1311 | $addedMember = $this->deserialize($dataAddedMember, Member::class); |
1312 | 1312 | |
1313 | 1313 | |
1314 | - echo 'ADDEDMEMBER: ' . json_encode($addedMember, JSON_PRETTY_PRINT) . "\n"; |
|
1314 | + echo 'ADDEDMEMBER: '.json_encode($addedMember, JSON_PRETTY_PRINT)."\n"; |
|
1315 | 1315 | |
1316 | 1316 | $federatedUser = $this->federatedUsers[$instanceId][$userId]; |
1317 | - echo 'FEDERATEDUER: ' . json_encode($federatedUser, JSON_PRETTY_PRINT) . "\n"; |
|
1317 | + echo 'FEDERATEDUER: '.json_encode($federatedUser, JSON_PRETTY_PRINT)."\n"; |
|
1318 | 1318 | |
1319 | 1319 | return $addedMember; |
1320 | 1320 | } |
@@ -187,11 +187,11 @@ discard block |
||
187 | 187 | $this->federatedUserService->commandLineInitiator($initiator, $initiatorType, $circleId, true); |
188 | 188 | $circle = $this->circleService->getCircle($circleId); |
189 | 189 | |
190 | - $output->writeln('<info>Name</info>: ' . $circle->getName()); |
|
190 | + $output->writeln('<info>Name</info>: '.$circle->getName()); |
|
191 | 191 | $owner = $circle->getOwner(); |
192 | - $output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance()); |
|
192 | + $output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance()); |
|
193 | 193 | $type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
194 | - $output->writeln('<info>Config</info>: ' . $type); |
|
194 | + $output->writeln('<info>Config</info>: '.$type); |
|
195 | 195 | $output->writeln(' '); |
196 | 196 | |
197 | 197 | $tree = new NC22TreeNode(null, new SimpleDataStore(['circle' => $circle])); |
@@ -258,8 +258,7 @@ discard block |
||
258 | 258 | ), 40 |
259 | 259 | ), |
260 | 260 | $this->configService->displayInstance($member->getInstance()), |
261 | - ($level > 0) ? Member::$DEF_LEVEL[$level] : |
|
262 | - '(' . strtolower($member->getStatus()) . ')', |
|
261 | + ($level > 0) ? Member::$DEF_LEVEL[$level] : '('.strtolower($member->getStatus()).')', |
|
263 | 262 | ($member->hasInvitedBy()) ? $this->configService->displayFederatedUser( |
264 | 263 | $member->getInvitedBy(), $this->input->getOption('display-name') |
265 | 264 | ) : 'Unknown' |
@@ -424,14 +423,14 @@ discard block |
||
424 | 423 | $member = $data->gObj('member', Member::class); |
425 | 424 | |
426 | 425 | if ($lineNumber === 1) { |
427 | - $line .= '<info>' . $member->getSingleId() . '</info>'; |
|
426 | + $line .= '<info>'.$member->getSingleId().'</info>'; |
|
428 | 427 | if (!$this->configService->isLocalInstance($member->getInstance())) { |
429 | - $line .= '@' . $member->getInstance(); |
|
428 | + $line .= '@'.$member->getInstance(); |
|
430 | 429 | } |
431 | - $line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')'; |
|
430 | + $line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')'; |
|
432 | 431 | |
433 | - $line .= ' <info>MemberId</info>: ' . $member->getId(); |
|
434 | - $line .= ' <info>Name</info>: ' . $this->configService->displayFederatedUser( |
|
432 | + $line .= ' <info>MemberId</info>: '.$member->getId(); |
|
433 | + $line .= ' <info>Name</info>: '.$this->configService->displayFederatedUser( |
|
435 | 434 | $member, |
436 | 435 | $this->input->getOption('display-name') |
437 | 436 | ); |
@@ -439,7 +438,7 @@ discard block |
||
439 | 438 | $line .= ' <info>Source</info>: ' |
440 | 439 | . Circle::$DEF_SOURCE[$member->getBasedOn()->getSource()]; |
441 | 440 | } else { |
442 | - $line .= ' <info>Type</info>: ' . Member::$TYPE[$member->getUserType()]; |
|
441 | + $line .= ' <info>Type</info>: '.Member::$TYPE[$member->getUserType()]; |
|
443 | 442 | } |
444 | 443 | } |
445 | 444 | |
@@ -452,15 +451,15 @@ discard block |
||
452 | 451 | return $line; |
453 | 452 | } |
454 | 453 | $owner = $circle->getOwner(); |
455 | - $line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance(); |
|
454 | + $line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance(); |
|
456 | 455 | $type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
457 | - $line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type; |
|
456 | + $line .= ($type === '') ? '' : ' <info>Config</info>: '.$type; |
|
458 | 457 | } |
459 | 458 | } else { |
460 | 459 | if ($lineNumber === 1 && !is_null($circle)) { |
461 | - $line .= '<info>' . $circle->getSingleId() . '</info>'; |
|
460 | + $line .= '<info>'.$circle->getSingleId().'</info>'; |
|
462 | 461 | if (!$this->configService->isLocalInstance($circle->getInstance())) { |
463 | - $line .= '@' . $circle->getInstance(); |
|
462 | + $line .= '@'.$circle->getInstance(); |
|
464 | 463 | } |
465 | 464 | } |
466 | 465 | } |
@@ -409,12 +409,12 @@ discard block |
||
409 | 409 | throw new UnknownInterfaceException('misconfigured scheme'); |
410 | 410 | } |
411 | 411 | |
412 | - $base = $scheme . '://' . $this->getCloudInstance($interface) . $path; |
|
412 | + $base = $scheme.'://'.$this->getCloudInstance($interface).$path; |
|
413 | 413 | if ($route === '') { |
414 | 414 | return $base; |
415 | 415 | } |
416 | 416 | |
417 | - return $base . $this->configService->linkToRoute($route, $args); |
|
417 | + return $base.$this->configService->linkToRoute($route, $args); |
|
418 | 418 | } |
419 | 419 | |
420 | 420 | |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | return $this->configService->getLoopbackPath($route, $args); |
448 | 448 | } |
449 | 449 | |
450 | - return rtrim($base, '/') . $this->configService->linkToRoute($route, $args); |
|
450 | + return rtrim($base, '/').$this->configService->linkToRoute($route, $args); |
|
451 | 451 | } |
452 | 452 | |
453 | 453 |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | throw new Exception('Please specify a --type for the test'); |
178 | 178 | } |
179 | 179 | if ($test !== '' && !in_array($type, self::$checks)) { |
180 | - throw new Exception('Unknown type: ' . implode(', ', self::$checks)); |
|
180 | + throw new Exception('Unknown type: '.implode(', ', self::$checks)); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | // $this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | $output->writeln(''); |
238 | - $output->writeln('* testing current address: ' . $test); |
|
238 | + $output->writeln('* testing current address: '.$test); |
|
239 | 239 | |
240 | 240 | try { |
241 | 241 | $this->setupLoopback($input, $output, $test); |
@@ -271,8 +271,8 @@ discard block |
||
271 | 271 | continue; |
272 | 272 | } |
273 | 273 | |
274 | - $loopback = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
275 | - $output->writeln('* testing address: ' . $loopback . ' '); |
|
274 | + $loopback = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
275 | + $output->writeln('* testing address: '.$loopback.' '); |
|
276 | 276 | |
277 | 277 | try { |
278 | 278 | $this->setupLoopback($input, $output, $loopback); |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | $test = new FederatedEvent(LoopbackTest::class); |
345 | 345 | $this->federatedEventService->newEvent($test); |
346 | 346 | |
347 | - $output->writeln('<info>' . $test->getWrapperToken() . '</info>'); |
|
347 | + $output->writeln('<info>'.$test->getWrapperToken().'</info>'); |
|
348 | 348 | |
349 | 349 | $output->writeln('- Waiting for async process to finish (5s)'); |
350 | 350 | sleep(5); |
@@ -359,18 +359,18 @@ discard block |
||
359 | 359 | |
360 | 360 | $checkVerify = $wrapper->getEvent()->getData()->gInt('verify'); |
361 | 361 | if ($checkVerify === LoopbackTest::VERIFY) { |
362 | - $output->write('<info>verify=' . $checkVerify . '</info> '); |
|
362 | + $output->write('<info>verify='.$checkVerify.'</info> '); |
|
363 | 363 | } else { |
364 | - $output->writeln('<error>verify=' . $checkVerify . '</error>'); |
|
364 | + $output->writeln('<error>verify='.$checkVerify.'</error>'); |
|
365 | 365 | |
366 | 366 | return false; |
367 | 367 | } |
368 | 368 | |
369 | 369 | $checkManage = $wrapper->getResult()->gInt('manage'); |
370 | 370 | if ($checkManage === LoopbackTest::MANAGE) { |
371 | - $output->write('<info>manage=' . $checkManage . '</info> '); |
|
371 | + $output->write('<info>manage='.$checkManage.'</info> '); |
|
372 | 372 | } else { |
373 | - $output->writeln('<error>manage=' . $checkManage . '</error>'); |
|
373 | + $output->writeln('<error>manage='.$checkManage.'</error>'); |
|
374 | 374 | |
375 | 375 | return false; |
376 | 376 | } |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | [$scheme, $cloudId, $path] = $this->parseAddress($loopback); |
393 | 393 | |
394 | 394 | $question = new ConfirmationQuestion( |
395 | - '- Do you want to save <info>' . $loopback |
|
395 | + '- Do you want to save <info>'.$loopback |
|
396 | 396 | . '</info> as your <info>loopback</info> address ? (y/N) ', false, '/^(y|Y)/i' |
397 | 397 | ); |
398 | 398 | |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId); |
408 | 408 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_PATH, $path); |
409 | 409 | $output->writeln( |
410 | - '- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>' |
|
410 | + '- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>' |
|
411 | 411 | ); |
412 | 412 | } |
413 | 413 | |
@@ -459,8 +459,8 @@ discard block |
||
459 | 459 | continue; |
460 | 460 | } |
461 | 461 | |
462 | - $internal = rtrim($scheme . '://' . $cloudId, '/'); |
|
463 | - $fullInternal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
462 | + $internal = rtrim($scheme.'://'.$cloudId, '/'); |
|
463 | + $fullInternal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
464 | 464 | |
465 | 465 | $question = new ConfirmationQuestion( |
466 | 466 | '<comment>Do you want to check the validity of this internal address?</comment> (Y/n) ', true, |
@@ -479,9 +479,9 @@ discard block |
||
479 | 479 | 'You will need to run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
480 | 480 | ); |
481 | 481 | $output->writeln( |
482 | - ' curl -L "' . $internal |
|
482 | + ' curl -L "'.$internal |
|
483 | 483 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
484 | - . $testToken . '"' |
|
484 | + . $testToken.'"' |
|
485 | 485 | ); |
486 | 486 | |
487 | 487 | $output->writeln('paste the result here: '); |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | |
516 | 516 | if ($pastedHref !== $href) { |
517 | 517 | $output->writeln( |
518 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
518 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
519 | 519 | . $href |
520 | 520 | ); |
521 | 521 | continue; |
@@ -527,7 +527,7 @@ discard block |
||
527 | 527 | 'Now, please run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
528 | 528 | ); |
529 | 529 | $output->writeln( |
530 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
530 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
531 | 531 | ); |
532 | 532 | |
533 | 533 | $output->writeln('paste the result here: '); |
@@ -544,9 +544,9 @@ discard block |
||
544 | 544 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
545 | 545 | $output->writeln( |
546 | 546 | '<error>The returned data (' |
547 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
547 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
548 | 548 | . ') are not the one expected: </error>' |
549 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
549 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
550 | 550 | ); |
551 | 551 | continue; |
552 | 552 | } |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | |
574 | 574 | $output->writeln(''); |
575 | 575 | $question = new ConfirmationQuestion( |
576 | - '- Do you want to save <info>' . $internal |
|
576 | + '- Do you want to save <info>'.$internal |
|
577 | 577 | . '</info> as your <info>internal</info> address ? (y/N) ', false, '/^(y|Y)/i' |
578 | 578 | ); |
579 | 579 | |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_PATH, $path); |
590 | 590 | |
591 | 591 | $output->writeln( |
592 | - '- Address <info>' . $internal . '</info> is now used as <info>internal</info>' |
|
592 | + '- Address <info>'.$internal.'</info> is now used as <info>internal</info>' |
|
593 | 593 | ); |
594 | 594 | } |
595 | 595 | |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | continue; |
643 | 643 | } |
644 | 644 | |
645 | - $frontal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
645 | + $frontal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
646 | 646 | break; |
647 | 647 | } |
648 | 648 | |
@@ -656,13 +656,13 @@ discard block |
||
656 | 656 | 'You will need to run this <info>curl</info> command from a remote terminal and paste its result: ' |
657 | 657 | ); |
658 | 658 | $output->writeln( |
659 | - ' curl ' . $frontal . '/.well-known/webfinger?resource=http://nextcloud.com/' |
|
659 | + ' curl '.$frontal.'/.well-known/webfinger?resource=http://nextcloud.com/' |
|
660 | 660 | ); |
661 | 661 | |
662 | 662 | $question = new Question('result: ', ''); |
663 | 663 | $pasteWebfinger = $helper->ask($input, $output, $question); |
664 | 664 | |
665 | - echo '__ ' . $pasteWebfinger; |
|
665 | + echo '__ '.$pasteWebfinger; |
|
666 | 666 | |
667 | 667 | $output->writeln('TESTING !!'); |
668 | 668 | $output->writeln('TESTING !!'); |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | $request->setDataSerialize(new SimpleDataStore(['empty' => 1])); |
790 | 790 | } |
791 | 791 | |
792 | - $output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
792 | + $output->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
793 | 793 | |
794 | 794 | try { |
795 | 795 | $this->doRequest($request); |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | $color = 'info'; |
801 | 801 | } |
802 | 802 | |
803 | - $output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>'); |
|
803 | + $output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>'); |
|
804 | 804 | if ($result->getStatusCode() === 200) { |
805 | 805 | return true; |
806 | 806 | } |
@@ -824,7 +824,7 @@ discard block |
||
824 | 824 | |
825 | 825 | $output->writeln(''); |
826 | 826 | $output->writeln( |
827 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
827 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
828 | 828 | ); |
829 | 829 | |
830 | 830 | $helper = $this->getHelper('question'); |
@@ -841,8 +841,8 @@ discard block |
||
841 | 841 | |
842 | 842 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
843 | 843 | $output->writeln( |
844 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
845 | - . $address . '\'</info> stored in database' |
|
844 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
845 | + . $address.'\'</info> stored in database' |
|
846 | 846 | ); |
847 | 847 | } |
848 | 848 | |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | $path = rtrim($path, '/'); |
871 | 871 | |
872 | 872 | if (!is_null($cloudIdPort)) { |
873 | - $cloudId = $cloudId . ':' . $cloudIdPort; |
|
873 | + $cloudId = $cloudId.':'.$cloudIdPort; |
|
874 | 874 | } |
875 | 875 | |
876 | 876 | return [$scheme, $cloudId, $path]; |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | return $value; |
224 | 224 | } |
225 | 225 | |
226 | - if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') { |
|
226 | + if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') { |
|
227 | 227 | return $value; |
228 | 228 | } |
229 | 229 | |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | */ |
443 | 443 | public function getTrustedDomains(): array { |
444 | 444 | return array_map( |
445 | - function (string $address) { |
|
445 | + function(string $address) { |
|
446 | 446 | return strtolower($address); |
447 | 447 | }, $this->config->getSystemValue('trusted_domains', []) |
448 | 448 | ); |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | } |
479 | 479 | |
480 | 480 | if (array_key_exists('port', $loopback)) { |
481 | - $loopbackCloudId = $loopback['host'] . ':' . $loopback['port']; |
|
481 | + $loopbackCloudId = $loopback['host'].':'.$loopback['port']; |
|
482 | 482 | } else { |
483 | 483 | $loopbackCloudId = $loopback['host']; |
484 | 484 | } |
@@ -517,13 +517,13 @@ discard block |
||
517 | 517 | $path = $this->getAppValue(self::LOOPBACK_CLOUD_PATH); |
518 | 518 | } |
519 | 519 | |
520 | - $base = $scheme . '://' . $instance . $path; |
|
520 | + $base = $scheme.'://'.$instance.$path; |
|
521 | 521 | |
522 | 522 | if ($route === '') { |
523 | 523 | return $base; |
524 | 524 | } |
525 | 525 | |
526 | - return rtrim($base, '/') . $this->linkToRoute($route, $args); |
|
526 | + return rtrim($base, '/').$this->linkToRoute($route, $args); |
|
527 | 527 | } |
528 | 528 | |
529 | 529 | |
@@ -624,10 +624,10 @@ discard block |
||
624 | 624 | $name = ($displayName) ? $federatedUser->getDisplayName() : $federatedUser->getUserId(); |
625 | 625 | |
626 | 626 | if ($federatedUser->getUserType() === Member::TYPE_MAIL) { |
627 | - return $name . ' (' . $this->displayInstance($federatedUser->getInstance(), false) . ')'; |
|
627 | + return $name.' ('.$this->displayInstance($federatedUser->getInstance(), false).')'; |
|
628 | 628 | } |
629 | 629 | |
630 | - return $name . $this->displayInstance($federatedUser->getInstance(), true); |
|
630 | + return $name.$this->displayInstance($federatedUser->getInstance(), true); |
|
631 | 631 | } |
632 | 632 | |
633 | 633 | /** |
@@ -641,7 +641,7 @@ discard block |
||
641 | 641 | return ''; |
642 | 642 | } |
643 | 643 | |
644 | - return (($showAt) ? '@' : '') . $instance; |
|
644 | + return (($showAt) ? '@' : '').$instance; |
|
645 | 645 | } |
646 | 646 | |
647 | 647 |
@@ -338,10 +338,10 @@ |
||
338 | 338 | protected function generateMember(FederatedEvent $event, Circle $circle, Member $member): Member { |
339 | 339 | try { |
340 | 340 | if ($member->getSingleId() !== '') { |
341 | - $userId = $member->getSingleId() . '@' . $member->getInstance(); |
|
341 | + $userId = $member->getSingleId().'@'.$member->getInstance(); |
|
342 | 342 | $federatedUser = $this->federatedUserService->getFederatedUser($userId, Member::TYPE_SINGLE); |
343 | 343 | } else { |
344 | - $userId = $member->getUserId() . '@' . $member->getInstance(); |
|
344 | + $userId = $member->getUserId().'@'.$member->getInstance(); |
|
345 | 345 | $federatedUser = $this->federatedUserService->getFederatedUser( |
346 | 346 | $userId, |
347 | 347 | $member->getUserType() |