@@ -644,7 +644,7 @@ |
||
644 | 644 | * @param string $alias |
645 | 645 | * @param IFederatedUser|null $initiator |
646 | 646 | * @param string $field |
647 | - * @param string $helpedAlias |
|
647 | + * @param string $helperAlias |
|
648 | 648 | * |
649 | 649 | * @throws RequestBuilderException |
650 | 650 | */ |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | } |
376 | 376 | |
377 | 377 | if ($circle->getDisplayName() !== '') { |
378 | - $this->searchInDBField('display_name', '%' . $circle->getDisplayName() . '%'); |
|
378 | + $this->searchInDBField('display_name', '%'.$circle->getDisplayName().'%'); |
|
379 | 379 | } |
380 | 380 | if ($circle->getConfig() > 0) { |
381 | 381 | $this->limitBitwise('config', $circle->getConfig()); |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | $this->generateRemoteInstanceSelectAlias($aliasRemoteInstance) |
395 | 395 | ->leftJoin( |
396 | 396 | $alias, CoreRequestBuilder::TABLE_REMOTE, $aliasRemoteInstance, |
397 | - $expr->eq($alias . '.instance', $aliasRemoteInstance . '.instance') |
|
397 | + $expr->eq($alias.'.instance', $aliasRemoteInstance.'.instance') |
|
398 | 398 | ); |
399 | 399 | } catch (RequestBuilderException $e) { |
400 | 400 | } |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | $expr = $this->expr(); |
448 | 448 | $this->leftJoin( |
449 | 449 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_REMOTE, $aliasRemote, |
450 | - $expr->eq($aliasRemote . '.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
450 | + $expr->eq($aliasRemote.'.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
451 | 451 | ); |
452 | 452 | } |
453 | 453 | |
@@ -475,12 +475,12 @@ discard block |
||
475 | 475 | $this->leftJoin( |
476 | 476 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteMember, |
477 | 477 | $expr->andX( |
478 | - $expr->eq($aliasRemoteMember . '.circle_id', $aliasCircle . '.unique_id'), |
|
478 | + $expr->eq($aliasRemoteMember.'.circle_id', $aliasCircle.'.unique_id'), |
|
479 | 479 | $expr->eq( |
480 | - $aliasRemoteMember . '.instance', |
|
480 | + $aliasRemoteMember.'.instance', |
|
481 | 481 | $this->createNamedParameter($remoteInstance->getInstance()) |
482 | 482 | ), |
483 | - $expr->gte($aliasRemoteMember . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
483 | + $expr->gte($aliasRemoteMember.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
484 | 484 | ) |
485 | 485 | ); |
486 | 486 | } |
@@ -512,21 +512,21 @@ discard block |
||
512 | 512 | $this->leftJoin( |
513 | 513 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircle, |
514 | 514 | $expr->andX( |
515 | - $expr->eq($aliasRemoteCircle . '.single_id', $aliasCircle . '.unique_id'), |
|
516 | - $expr->emptyString($aliasRemoteCircle . '.instance'), |
|
517 | - $expr->gte($aliasRemoteCircle . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
515 | + $expr->eq($aliasRemoteCircle.'.single_id', $aliasCircle.'.unique_id'), |
|
516 | + $expr->emptyString($aliasRemoteCircle.'.instance'), |
|
517 | + $expr->gte($aliasRemoteCircle.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
518 | 518 | ) |
519 | 519 | ); |
520 | 520 | $this->leftJoin( |
521 | 521 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircleOwner, |
522 | 522 | $expr->andX( |
523 | - $expr->eq($aliasRemoteCircle . '.circle_id', $aliasRemoteCircleOwner . '.circle_id'), |
|
523 | + $expr->eq($aliasRemoteCircle.'.circle_id', $aliasRemoteCircleOwner.'.circle_id'), |
|
524 | 524 | $expr->eq( |
525 | - $aliasRemoteCircleOwner . '.instance', |
|
525 | + $aliasRemoteCircleOwner.'.instance', |
|
526 | 526 | $this->createNamedParameter($remoteInstance->getInstance()) |
527 | 527 | ), |
528 | 528 | $expr->eq( |
529 | - $aliasRemoteCircleOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
529 | + $aliasRemoteCircleOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
530 | 530 | ) |
531 | 531 | ) |
532 | 532 | ); |
@@ -559,16 +559,16 @@ discard block |
||
559 | 559 | $expr = $this->expr(); |
560 | 560 | $orX = $expr->orX(); |
561 | 561 | $orX->add( |
562 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
562 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
563 | 563 | ); |
564 | 564 | |
565 | 565 | $orExtOrPassive = $expr->orX(); |
566 | 566 | $orExtOrPassive->add( |
567 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
567 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
568 | 568 | ); |
569 | 569 | if (!$sensitive) { |
570 | 570 | $orExtOrPassive->add( |
571 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
571 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
572 | 572 | ); |
573 | 573 | } else { |
574 | 574 | if ($this->getDefaultSelectAlias() === CoreQueryBuilder::MEMBER) { |
@@ -577,8 +577,8 @@ discard block |
||
577 | 577 | } |
578 | 578 | |
579 | 579 | $orInstance = $expr->orX(); |
580 | - $orInstance->add($expr->isNotNull($aliasRemoteMember . '.instance')); |
|
581 | - $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner . '.instance')); |
|
580 | + $orInstance->add($expr->isNotNull($aliasRemoteMember.'.instance')); |
|
581 | + $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner.'.instance')); |
|
582 | 582 | |
583 | 583 | $andExternal = $expr->andX(); |
584 | 584 | $andExternal->add($orExtOrPassive); |
@@ -587,13 +587,13 @@ discard block |
||
587 | 587 | $orExtOrTrusted = $expr->orX(); |
588 | 588 | $orExtOrTrusted->add($andExternal); |
589 | 589 | $orExtOrTrusted->add( |
590 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
590 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
591 | 591 | ); |
592 | 592 | |
593 | 593 | $andTrusted = $expr->andX(); |
594 | 594 | $andTrusted->add($orExtOrTrusted); |
595 | 595 | $andTrusted->add($this->exprLimitBitwise('config', Circle::CFG_FEDERATED, $aliasCircle)); |
596 | - $andTrusted->add($expr->emptyString($aliasOwner . '.instance')); |
|
596 | + $andTrusted->add($expr->emptyString($aliasOwner.'.instance')); |
|
597 | 597 | $orX->add($andTrusted); |
598 | 598 | |
599 | 599 | $this->andWhere($orX); |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | } |
621 | 621 | $this->leftJoin( |
622 | 622 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
623 | - $expr->eq($aliasMember . '.circle_id', $alias . '.unique_id') |
|
623 | + $expr->eq($aliasMember.'.circle_id', $alias.'.unique_id') |
|
624 | 624 | ); |
625 | 625 | |
626 | 626 | $this->filterDirectMembership($aliasMember, $member); |
@@ -641,30 +641,30 @@ discard block |
||
641 | 641 | |
642 | 642 | if ($member->getUserId() !== '') { |
643 | 643 | $andX->add( |
644 | - $expr->eq($aliasMember . '.user_id', $this->createNamedParameter($member->getUserId())) |
|
644 | + $expr->eq($aliasMember.'.user_id', $this->createNamedParameter($member->getUserId())) |
|
645 | 645 | ); |
646 | 646 | } |
647 | 647 | |
648 | 648 | if ($member->getSingleId() !== '') { |
649 | 649 | $andX->add( |
650 | - $expr->eq($aliasMember . '.single_id', $this->createNamedParameter($member->getSingleId())) |
|
650 | + $expr->eq($aliasMember.'.single_id', $this->createNamedParameter($member->getSingleId())) |
|
651 | 651 | ); |
652 | 652 | } |
653 | 653 | |
654 | 654 | if ($member->getUserType() > 0) { |
655 | 655 | $andX->add( |
656 | - $expr->eq($aliasMember . '.user_type', $this->createNamedParameter($member->getUserType())) |
|
656 | + $expr->eq($aliasMember.'.user_type', $this->createNamedParameter($member->getUserType())) |
|
657 | 657 | ); |
658 | 658 | } |
659 | 659 | |
660 | 660 | $andX->add( |
661 | - $expr->eq($aliasMember . '.instance', $this->createNamedParameter($this->getInstance($member))) |
|
661 | + $expr->eq($aliasMember.'.instance', $this->createNamedParameter($this->getInstance($member))) |
|
662 | 662 | ); |
663 | 663 | |
664 | 664 | if ($member->getLevel() > 0) { |
665 | 665 | $andX->add( |
666 | 666 | $expr->gte( |
667 | - $aliasMember . '.level', |
|
667 | + $aliasMember.'.level', |
|
668 | 668 | $this->createNamedParameter($member->getLevel(), IQueryBuilder::PARAM_INT) |
669 | 669 | ) |
670 | 670 | ); |
@@ -705,7 +705,7 @@ discard block |
||
705 | 705 | $helperAlias, |
706 | 706 | CoreRequestBuilder::TABLE_CIRCLE, |
707 | 707 | $aliasCircle, |
708 | - $expr->eq($aliasCircle . '.unique_id', $helperAlias . '.' . $field) |
|
708 | + $expr->eq($aliasCircle.'.unique_id', $helperAlias.'.'.$field) |
|
709 | 709 | ); |
710 | 710 | |
711 | 711 | if (!is_null($initiator)) { |
@@ -736,7 +736,7 @@ discard block |
||
736 | 736 | $this->generateCircleSelectAlias($aliasInvitedBy) |
737 | 737 | ->leftJoin( |
738 | 738 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasInvitedBy, |
739 | - $expr->eq($aliasMember . '.invited_by', $aliasInvitedBy . '.unique_id') |
|
739 | + $expr->eq($aliasMember.'.invited_by', $aliasInvitedBy.'.unique_id') |
|
740 | 740 | ); |
741 | 741 | |
742 | 742 | $this->leftJoinOwner($aliasInvitedBy); |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | $this->generateCircleSelectAlias($aliasBasedOn) |
768 | 768 | ->leftJoin( |
769 | 769 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasBasedOn, |
770 | - $expr->eq($aliasBasedOn . '.unique_id', $aliasMember . '.single_id') |
|
770 | + $expr->eq($aliasBasedOn.'.unique_id', $aliasMember.'.single_id') |
|
771 | 771 | ); |
772 | 772 | |
773 | 773 | if (!is_null($initiator)) { |
@@ -800,9 +800,9 @@ discard block |
||
800 | 800 | ->leftJoin( |
801 | 801 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
802 | 802 | $expr->andX( |
803 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $field), |
|
803 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$field), |
|
804 | 804 | $expr->eq( |
805 | - $aliasMember . '.level', |
|
805 | + $aliasMember.'.level', |
|
806 | 806 | $this->createNamedParameter(Member::LEVEL_OWNER, self::PARAM_INT) |
807 | 807 | ) |
808 | 808 | ) |
@@ -840,10 +840,10 @@ discard block |
||
840 | 840 | ->leftJoin( |
841 | 841 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
842 | 842 | $expr->andX( |
843 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $fieldCircleId), |
|
844 | - $expr->eq($aliasMember . '.single_id', $alias . '.' . $fieldSingleId), |
|
843 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$fieldCircleId), |
|
844 | + $expr->eq($aliasMember.'.single_id', $alias.'.'.$fieldSingleId), |
|
845 | 845 | $expr->gte( |
846 | - $aliasMember . '.level', |
|
846 | + $aliasMember.'.level', |
|
847 | 847 | $this->createNamedParameter(Member::LEVEL_MEMBER, self::PARAM_INT) |
848 | 848 | ) |
849 | 849 | ) |
@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | |
877 | 877 | $this->leftJoin( |
878 | 878 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
879 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
879 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
880 | 880 | ); |
881 | 881 | |
882 | 882 | // if (!$this->getBool('getData', $options, false)) { |
@@ -890,8 +890,8 @@ discard block |
||
890 | 890 | ->leftJoin( |
891 | 891 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
892 | 892 | $expr->andX( |
893 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id'), |
|
894 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id') |
|
893 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id'), |
|
894 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id') |
|
895 | 895 | ) |
896 | 896 | ); |
897 | 897 | |
@@ -908,12 +908,12 @@ discard block |
||
908 | 908 | $aliasUpstreamMembership = $this->generateAlias($alias, self::UPSTREAM_MEMBERSHIPS, $options); |
909 | 909 | $this->leftJoin( |
910 | 910 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasUpstreamMembership, |
911 | - $expr->eq($aliasUpstreamMembership . '.single_id', $this->createNamedParameter($singleId)) |
|
911 | + $expr->eq($aliasUpstreamMembership.'.single_id', $this->createNamedParameter($singleId)) |
|
912 | 912 | ); |
913 | 913 | |
914 | 914 | $orX = $expr->orX( |
915 | - $expr->eq($aliasUpstreamMembership . '.circle_id', $alias . '.' . $field), |
|
916 | - $expr->eq($alias . '.' . $field, $this->createNamedParameter($singleId)) |
|
915 | + $expr->eq($aliasUpstreamMembership.'.circle_id', $alias.'.'.$field), |
|
916 | + $expr->eq($alias.'.'.$field, $this->createNamedParameter($singleId)) |
|
917 | 917 | ); |
918 | 918 | |
919 | 919 | $this->andWhere($orX); |
@@ -934,11 +934,11 @@ discard block |
||
934 | 934 | |
935 | 935 | $expr = $this->expr(); |
936 | 936 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); |
937 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); |
|
937 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); |
|
938 | 938 | if ($level > 1) { |
939 | 939 | $this->andWhere( |
940 | 940 | $expr->gte( |
941 | - $aliasMembership . '.level', |
|
941 | + $aliasMembership.'.level', |
|
942 | 942 | $this->createNamedParameter($level, IQueryBuilder::PARAM_INT) |
943 | 943 | ) |
944 | 944 | ); |
@@ -966,8 +966,8 @@ discard block |
||
966 | 966 | $this->leftJoin( |
967 | 967 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
968 | 968 | $expr->andX( |
969 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field), |
|
970 | - $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') |
|
969 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field), |
|
970 | + $expr->eq($aliasMembership.'.single_id', $alias.'.single_id') |
|
971 | 971 | ) |
972 | 972 | ); |
973 | 973 | |
@@ -980,8 +980,8 @@ discard block |
||
980 | 980 | ->leftJoin( |
981 | 981 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, |
982 | 982 | $expr->andX( |
983 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), |
|
984 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') |
|
983 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), |
|
984 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') |
|
985 | 985 | ) |
986 | 986 | ); |
987 | 987 | } |
@@ -1047,7 +1047,7 @@ discard block |
||
1047 | 1047 | $aliasMembership, |
1048 | 1048 | $expr->andX( |
1049 | 1049 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasMembership), |
1050 | - $expr->eq($aliasMembership . '.circle_id', $helperAlias . '.' . $field) |
|
1050 | + $expr->eq($aliasMembership.'.circle_id', $helperAlias.'.'.$field) |
|
1051 | 1051 | ) |
1052 | 1052 | ); |
1053 | 1053 | |
@@ -1060,8 +1060,8 @@ discard block |
||
1060 | 1060 | $this->leftJoin( |
1061 | 1061 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
1062 | 1062 | $expr->andX( |
1063 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), |
|
1064 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') |
|
1063 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), |
|
1064 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') |
|
1065 | 1065 | ) |
1066 | 1066 | ); |
1067 | 1067 | |
@@ -1069,8 +1069,8 @@ discard block |
||
1069 | 1069 | $this->leftJoin( |
1070 | 1070 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
1071 | 1071 | $expr->andX( |
1072 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), |
|
1073 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') |
|
1072 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), |
|
1073 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') |
|
1074 | 1074 | ) |
1075 | 1075 | ); |
1076 | 1076 | |
@@ -1090,7 +1090,7 @@ discard block |
||
1090 | 1090 | $aliasInheritedByMembership = $this->generateAlias($aliasInheritedBy, self::MEMBERSHIPS); |
1091 | 1091 | $this->generateMembershipSelectAlias($aliasMembership, $aliasInheritedByMembership); |
1092 | 1092 | } catch (RequestBuilderException $e) { |
1093 | - \OC::$server->getLogger()->log(3, '-- ' . $e->getMessage()); |
|
1093 | + \OC::$server->getLogger()->log(3, '-- '.$e->getMessage()); |
|
1094 | 1094 | } |
1095 | 1095 | } |
1096 | 1096 | |
@@ -1114,7 +1114,7 @@ discard block |
||
1114 | 1114 | $orX = $expr->orX(); |
1115 | 1115 | $orX->add( |
1116 | 1116 | $expr->andX( |
1117 | - $expr->gte($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
1117 | + $expr->gte($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
1118 | 1118 | ) |
1119 | 1119 | ); |
1120 | 1120 | |
@@ -1122,7 +1122,7 @@ discard block |
||
1122 | 1122 | $orX->add( |
1123 | 1123 | $expr->andX( |
1124 | 1124 | $this->exprLimitBitwise('config', Circle::CFG_PERSONAL, $alias), |
1125 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1125 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1126 | 1126 | ) |
1127 | 1127 | ); |
1128 | 1128 | } |
@@ -1131,7 +1131,7 @@ discard block |
||
1131 | 1131 | } |
1132 | 1132 | if ($this->getBool('canBeVisitor', $options, false)) { |
1133 | 1133 | // TODO: should find a better way, also filter on remote initiator on non-federated ? |
1134 | - $orX->add($expr->gte($alias . '.config', $this->createNamedParameter(0))); |
|
1134 | + $orX->add($expr->gte($alias.'.config', $this->createNamedParameter(0))); |
|
1135 | 1135 | } |
1136 | 1136 | if ($this->getBool('canBeVisitorOnOpen', $options, false)) { |
1137 | 1137 | $andOpen = $expr->andX(); |
@@ -1199,21 +1199,21 @@ discard block |
||
1199 | 1199 | $expr = $this->expr(); |
1200 | 1200 | $andPassive = $expr->andX(); |
1201 | 1201 | $andPassive->add( |
1202 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1202 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1203 | 1203 | ); |
1204 | 1204 | |
1205 | 1205 | $orMemberOrLevel = $expr->orX(); |
1206 | 1206 | $orMemberOrLevel->add( |
1207 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance') |
|
1207 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance') |
|
1208 | 1208 | ); |
1209 | 1209 | // TODO: do we need this ? (display members from the local instance) |
1210 | 1210 | $orMemberOrLevel->add( |
1211 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance') |
|
1211 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance') |
|
1212 | 1212 | ); |
1213 | 1213 | |
1214 | 1214 | $orMemberOrLevel->add( |
1215 | 1215 | $expr->eq( |
1216 | - $this->getDefaultSelectAlias() . '.level', |
|
1216 | + $this->getDefaultSelectAlias().'.level', |
|
1217 | 1217 | $this->createNamedParameter(Member::LEVEL_OWNER) |
1218 | 1218 | ) |
1219 | 1219 | ); |
@@ -1250,11 +1250,11 @@ discard block |
||
1250 | 1250 | ) |
1251 | 1251 | ->leftJoin( |
1252 | 1252 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, |
1253 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') |
|
1253 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') |
|
1254 | 1254 | ) |
1255 | 1255 | ->leftJoin( |
1256 | 1256 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, |
1257 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') |
|
1257 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') |
|
1258 | 1258 | ); |
1259 | 1259 | } |
1260 | 1260 | |
@@ -1276,8 +1276,8 @@ discard block |
||
1276 | 1276 | $this->leftJoin( |
1277 | 1277 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, |
1278 | 1278 | $expr->andX( |
1279 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), |
|
1280 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') |
|
1279 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), |
|
1280 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') |
|
1281 | 1281 | ) |
1282 | 1282 | ); |
1283 | 1283 | |
@@ -1327,13 +1327,13 @@ discard block |
||
1327 | 1327 | $this->leftJoin( |
1328 | 1328 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, |
1329 | 1329 | $expr->andX( |
1330 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), |
|
1331 | - $expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id') |
|
1330 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), |
|
1331 | + $expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id') |
|
1332 | 1332 | ) |
1333 | 1333 | ); |
1334 | 1334 | |
1335 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); |
|
1336 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); |
|
1335 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); |
|
1336 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); |
|
1337 | 1337 | } |
1338 | 1338 | |
1339 | 1339 | |
@@ -1437,10 +1437,10 @@ discard block |
||
1437 | 1437 | */ |
1438 | 1438 | public function generateAlias(string $base, string $extension, ?array &$options = []): string { |
1439 | 1439 | $search = str_replace('_', '.', $base); |
1440 | - $path = $search . '.' . $extension; |
|
1440 | + $path = $search.'.'.$extension; |
|
1441 | 1441 | if (!$this->validKey($path, self::$SQL_PATH) |
1442 | 1442 | && !in_array($extension, $this->getArray($search, self::$SQL_PATH))) { |
1443 | - throw new RequestBuilderException($extension . ' not found in ' . $search); |
|
1443 | + throw new RequestBuilderException($extension.' not found in '.$search); |
|
1444 | 1444 | } |
1445 | 1445 | |
1446 | 1446 | if (!is_array($options)) { |
@@ -1449,15 +1449,15 @@ discard block |
||
1449 | 1449 | |
1450 | 1450 | $optionPath = ''; |
1451 | 1451 | foreach (explode('.', $path) as $p) { |
1452 | - $optionPath = trim($optionPath . '.' . $p, '.'); |
|
1452 | + $optionPath = trim($optionPath.'.'.$p, '.'); |
|
1453 | 1453 | $options = array_merge( |
1454 | 1454 | $options, |
1455 | - $this->getArray($optionPath . '.' . self::OPTIONS, self::$SQL_PATH), |
|
1456 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) |
|
1455 | + $this->getArray($optionPath.'.'.self::OPTIONS, self::$SQL_PATH), |
|
1456 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) |
|
1457 | 1457 | ); |
1458 | 1458 | } |
1459 | 1459 | |
1460 | - return $base . '_' . $extension; |
|
1460 | + return $base.'_'.$extension; |
|
1461 | 1461 | } |
1462 | 1462 | |
1463 | 1463 | |
@@ -1477,7 +1477,7 @@ discard block |
||
1477 | 1477 | } else { |
1478 | 1478 | $k = $arr; |
1479 | 1479 | } |
1480 | - $path[$k] = $prefix . '_' . $k . '_'; |
|
1480 | + $path[$k] = $prefix.'_'.$k.'_'; |
|
1481 | 1481 | } |
1482 | 1482 | |
1483 | 1483 | return $path; |
@@ -144,7 +144,7 @@ |
||
144 | 144 | $circle = new Circle(); |
145 | 145 | $circle->importFromDatabase( |
146 | 146 | $data, |
147 | - CoreQueryBuilder::HELPER . '_' . CoreQueryBuilder::CIRCLE . '_' |
|
147 | + CoreQueryBuilder::HELPER.'_'.CoreQueryBuilder::CIRCLE.'_' |
|
148 | 148 | ); |
149 | 149 | |
150 | 150 | return $circle; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
136 | - * @param mixed $class |
|
136 | + * @param string $class |
|
137 | 137 | * |
138 | 138 | * @return self |
139 | 139 | */ |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | |
455 | 455 | /** |
456 | 456 | * @param string $key |
457 | - * @param array $result |
|
457 | + * @param \OCA\Circles\Model\ShareWrapper[] $result |
|
458 | 458 | * |
459 | 459 | * @return $this |
460 | 460 | */ |
@@ -251,16 +251,16 @@ |
||
251 | 251 | try { |
252 | 252 | $test = new ReflectionClass($class); |
253 | 253 | } catch (ReflectionException $e) { |
254 | - throw new FederatedEventException('ReflectionException with ' . $class . ': ' . $e->getMessage()); |
|
254 | + throw new FederatedEventException('ReflectionException with '.$class.': '.$e->getMessage()); |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | if (!in_array(IFederatedItem::class, $test->getInterfaceNames())) { |
258 | - throw new FederatedEventException($class . ' does not implements IFederatedItem'); |
|
258 | + throw new FederatedEventException($class.' does not implements IFederatedItem'); |
|
259 | 259 | } |
260 | 260 | |
261 | 261 | $item = OC::$server->get($class); |
262 | 262 | if (!($item instanceof IFederatedItem)) { |
263 | - throw new FederatedEventException($class . ' not an IFederatedItem'); |
|
263 | + throw new FederatedEventException($class.' not an IFederatedItem'); |
|
264 | 264 | } |
265 | 265 | |
266 | 266 | if ($item instanceof IFederatedItemHighSeverity) { |
@@ -37,7 +37,6 @@ |
||
37 | 37 | use daita\MySmallPhpTools\Model\SimpleDataStore; |
38 | 38 | use daita\MySmallPhpTools\Traits\TArrayTools; |
39 | 39 | use JsonSerializable; |
40 | -use OCA\Circles\Exceptions\UnknownInterfaceException; |
|
41 | 40 | |
42 | 41 | |
43 | 42 | /** |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $this->sendMailExistingShares($template, $author, $recipient); |
243 | 243 | $this->sendPasswordExistingShares($author, $recipient, $password); |
244 | 244 | } catch (Exception $e) { |
245 | - $this->miscService->log('Failed to send mail about existing share ' . $e->getMessage()); |
|
245 | + $this->miscService->log('Failed to send mail about existing share '.$e->getMessage()); |
|
246 | 246 | } |
247 | 247 | } |
248 | 248 | |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | $authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author; |
393 | 393 | $authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null; |
394 | 394 | |
395 | - $this->miscService->log("Sending password mail about existing files to '" . $email . "'", 0); |
|
395 | + $this->miscService->log("Sending password mail about existing files to '".$email."'", 0); |
|
396 | 396 | |
397 | 397 | $plainBodyPart = $this->l10n->t( |
398 | 398 | "%1\$s shared multiple files with you.\nYou should have already received a separate email with a link to access them.\n", |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
435 | 435 | if ($authorEmail !== null) { |
436 | 436 | $message->setReplyTo([$authorEmail => $authorName]); |
437 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
437 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
438 | 438 | } else { |
439 | 439 | $emailTemplate->addFooter(); |
440 | 440 | } |
@@ -811,29 +811,29 @@ discard block |
||
811 | 811 | * @throws MemberNotFoundException |
812 | 812 | */ |
813 | 813 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
814 | - if ($this->get($prefix . 'single_id', $data) === '') { |
|
814 | + if ($this->get($prefix.'single_id', $data) === '') { |
|
815 | 815 | throw new MemberNotFoundException(); |
816 | 816 | } |
817 | 817 | |
818 | - $this->setId($this->get($prefix . 'member_id', $data)); |
|
819 | - $this->setCircleId($this->get($prefix . 'circle_id', $data)); |
|
820 | - $this->setSingleId($this->get($prefix . 'single_id', $data)); |
|
821 | - $this->setUserId($this->get($prefix . 'user_id', $data)); |
|
822 | - $this->setUserType($this->getInt($prefix . 'user_type', $data)); |
|
823 | - $this->setInstance($this->get($prefix . 'instance', $data)); |
|
824 | - $this->setLevel($this->getInt($prefix . 'level', $data)); |
|
825 | - $this->setStatus($this->get($prefix . 'status', $data)); |
|
826 | - $this->setDisplayName($this->get($prefix . 'cached_name', $data)); |
|
827 | - $this->setNotes($this->getArray($prefix . 'note', $data)); |
|
828 | - $this->setContactId($this->get($prefix . 'contact_id', $data)); |
|
829 | - $this->setContactMeta($this->get($prefix . 'contact_meta', $data)); |
|
830 | - |
|
831 | - $cachedUpdate = $this->get($prefix . 'cached_update', $data); |
|
818 | + $this->setId($this->get($prefix.'member_id', $data)); |
|
819 | + $this->setCircleId($this->get($prefix.'circle_id', $data)); |
|
820 | + $this->setSingleId($this->get($prefix.'single_id', $data)); |
|
821 | + $this->setUserId($this->get($prefix.'user_id', $data)); |
|
822 | + $this->setUserType($this->getInt($prefix.'user_type', $data)); |
|
823 | + $this->setInstance($this->get($prefix.'instance', $data)); |
|
824 | + $this->setLevel($this->getInt($prefix.'level', $data)); |
|
825 | + $this->setStatus($this->get($prefix.'status', $data)); |
|
826 | + $this->setDisplayName($this->get($prefix.'cached_name', $data)); |
|
827 | + $this->setNotes($this->getArray($prefix.'note', $data)); |
|
828 | + $this->setContactId($this->get($prefix.'contact_id', $data)); |
|
829 | + $this->setContactMeta($this->get($prefix.'contact_meta', $data)); |
|
830 | + |
|
831 | + $cachedUpdate = $this->get($prefix.'cached_update', $data); |
|
832 | 832 | if ($cachedUpdate !== '') { |
833 | 833 | $this->setDisplayUpdate(DateTime::createFromFormat('Y-m-d H:i:s', $cachedUpdate)->getTimestamp()); |
834 | 834 | } |
835 | 835 | |
836 | - $joined = $this->get($prefix . 'joined', $data); |
|
836 | + $joined = $this->get($prefix.'joined', $data); |
|
837 | 837 | if ($joined !== '') { |
838 | 838 | $this->setJoined(DateTime::createFromFormat('Y-m-d H:i:s', $joined)->getTimestamp()); |
839 | 839 | } |
@@ -924,7 +924,7 @@ discard block |
||
924 | 924 | public static function parseLevelInt(int $level): int { |
925 | 925 | if (!array_key_exists($level, self::$DEF_LEVEL)) { |
926 | 926 | $all = implode(', ', array_keys(self::$DEF_LEVEL)); |
927 | - throw new ParseMemberLevelException('Available levels: ' . $all, 121); |
|
927 | + throw new ParseMemberLevelException('Available levels: '.$all, 121); |
|
928 | 928 | } |
929 | 929 | |
930 | 930 | return $level; |
@@ -943,7 +943,7 @@ discard block |
||
943 | 943 | |
944 | 944 | if (!$level) { |
945 | 945 | $all = implode(', ', array_values(self::$DEF_LEVEL)); |
946 | - throw new ParseMemberLevelException('Available levels: ' . $all, 121); |
|
946 | + throw new ParseMemberLevelException('Available levels: '.$all, 121); |
|
947 | 947 | } |
948 | 948 | |
949 | 949 | return (int)$level; |
@@ -964,7 +964,7 @@ discard block |
||
964 | 964 | $type = array_search($typeString, Member::$TYPE); |
965 | 965 | if ($type === false) { |
966 | 966 | $all = implode(', ', array_values(self::$TYPE)); |
967 | - throw new UserTypeNotFoundException('Available types: ' . $all); |
|
967 | + throw new UserTypeNotFoundException('Available types: '.$all); |
|
968 | 968 | } |
969 | 969 | |
970 | 970 | return (int)$type; |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | return $value; |
177 | 177 | } |
178 | 178 | |
179 | - if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') { |
|
179 | + if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') { |
|
180 | 180 | return $value; |
181 | 181 | } |
182 | 182 | |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | } |
431 | 431 | |
432 | 432 | if (array_key_exists('port', $loopback)) { |
433 | - $loopbackCloudId = $loopback['host'] . ':' . $loopback['port']; |
|
433 | + $loopbackCloudId = $loopback['host'].':'.$loopback['port']; |
|
434 | 434 | } else { |
435 | 435 | $loopbackCloudId = $loopback['host']; |
436 | 436 | } |
@@ -459,12 +459,12 @@ discard block |
||
459 | 459 | $scheme = $this->getAppValue(self::LOOPBACK_CLOUD_SCHEME); |
460 | 460 | } |
461 | 461 | |
462 | - $base = $scheme . '://' . $instance; |
|
462 | + $base = $scheme.'://'.$instance; |
|
463 | 463 | if ($route === '') { |
464 | 464 | return $base; |
465 | 465 | } |
466 | 466 | |
467 | - return $base . $this->urlGenerator->linkToRoute($route, $args); |
|
467 | + return $base.$this->urlGenerator->linkToRoute($route, $args); |
|
468 | 468 | } |
469 | 469 | |
470 | 470 | |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | * @return string |
562 | 562 | */ |
563 | 563 | public function displayFederatedUser(IFederatedUser $federatedUser): string { |
564 | - return $federatedUser->getUserId() . $this->displayInstance($federatedUser->getInstance(), true); |
|
564 | + return $federatedUser->getUserId().$this->displayInstance($federatedUser->getInstance(), true); |
|
565 | 565 | } |
566 | 566 | |
567 | 567 | /** |
@@ -575,7 +575,7 @@ discard block |
||
575 | 575 | return ''; |
576 | 576 | } |
577 | 577 | |
578 | - return (($showAt) ? '@' : '') . $instance; |
|
578 | + return (($showAt) ? '@' : '').$instance; |
|
579 | 579 | } |
580 | 580 | |
581 | 581 |
@@ -83,7 +83,6 @@ |
||
83 | 83 | /** |
84 | 84 | * CirclesManager constructor. |
85 | 85 | * |
86 | - * @param IUserSession $userSession |
|
87 | 86 | * @param FederatedUserService $federatedUserService |
88 | 87 | * @param CircleService $circleService |
89 | 88 | * @param MemberService $memberService |