@@ -62,13 +62,13 @@ discard block |
||
62 | 62 | throw new \RuntimeException('no instance id!'); |
63 | 63 | } |
64 | 64 | |
65 | - $this->rootPath = 'appdata_' . $instanceId . '/' . Application::APP_FOLDER; |
|
65 | + $this->rootPath = 'appdata_'.$instanceId.'/'.Application::APP_FOLDER; |
|
66 | 66 | |
67 | 67 | return $this->rootPath; |
68 | 68 | } |
69 | 69 | |
70 | 70 | public function getCircleRootPath(string $circleId): string { |
71 | - return $this->getRootPath() . '/' . $circleId; |
|
71 | + return $this->getRootPath().'/'.$circleId; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | public function getRootFolder(): Folder { |
79 | 79 | $rootFolder = $this->rootFolder; |
80 | 80 | |
81 | - return (new LazyFolder(function () use ($rootFolder) { |
|
81 | + return (new LazyFolder(function() use ($rootFolder) { |
|
82 | 82 | try { |
83 | 83 | return $rootFolder->get($this->getRootPath()); |
84 | 84 | } catch (NotFoundException $e) { |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $baseStorage = new Jail( |
158 | 158 | [ |
159 | 159 | 'storage' => $storage, |
160 | - 'root' => $this->getRootFolder()->getInternalPath() . '/' . $folderMount->getCircleId() |
|
160 | + 'root' => $this->getRootFolder()->getInternalPath().'/'.$folderMount->getCircleId() |
|
161 | 161 | ] |
162 | 162 | ); |
163 | 163 | $circlesStorage = new CirclesFolderStorage([ |
@@ -204,8 +204,8 @@ discard block |
||
204 | 204 | * @return string |
205 | 205 | */ |
206 | 206 | public function getLandingPagePath(string $path, string $lang): string { |
207 | - $landingPagePathEnglish = $path . '/' . self::LANDING_PAGE_TITLE . '.en' . self::SUFFIX; |
|
208 | - $landingPagePathLocalized = $path . '/' . self::LANDING_PAGE_TITLE . '.' . $lang . self::SUFFIX; |
|
207 | + $landingPagePathEnglish = $path.'/'.self::LANDING_PAGE_TITLE.'.en'.self::SUFFIX; |
|
208 | + $landingPagePathLocalized = $path.'/'.self::LANDING_PAGE_TITLE.'.'.$lang.self::SUFFIX; |
|
209 | 209 | |
210 | 210 | return file_exists($landingPagePathLocalized) ? $landingPagePathLocalized : $landingPagePathEnglish; |
211 | 211 | } |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | try { |
278 | 278 | $folder = $this->getRootFolder()->get($circleId); |
279 | 279 | if (!$folder instanceof Folder) { |
280 | - throw new InvalidPathException('Not a folder: ' . $folder->getPath()); |
|
280 | + throw new InvalidPathException('Not a folder: '.$folder->getPath()); |
|
281 | 281 | } |
282 | 282 | } catch (NotFoundException $e) { |
283 | 283 | $folder = $this->getRootFolder()->newFolder($circleId); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $folders = $this->getFolderMountsForUser($user); |
79 | 79 | try { |
80 | 80 | return array_filter( |
81 | - array_map(function (FolderMount $folder) use ($user, $loader): ?IMountPoint { |
|
81 | + array_map(function(FolderMount $folder) use ($user, $loader): ?IMountPoint { |
|
82 | 82 | try { |
83 | 83 | return $this->circlesFolderManager->getMount($folder, $loader, $user); |
84 | 84 | } catch (Exception $e) { |
@@ -140,12 +140,12 @@ discard block |
||
140 | 140 | |
141 | 141 | foreach ($circles as $circle) { |
142 | 142 | $name = $circle->getSanitizedName(); |
143 | - $mountPoint = ($this->getCirclesFolderPath($user) === '/') ? '' : ($userFolder->getName() . '/'); |
|
143 | + $mountPoint = ($this->getCirclesFolderPath($user) === '/') ? '' : ($userFolder->getName().'/'); |
|
144 | 144 | $mountPoint .= ($name !== '') ? $name : $circle->getSingleId(); |
145 | 145 | |
146 | 146 | $folderMount = new FolderMount($circle->getSingleId()); |
147 | 147 | $folderMount->setMountPoint2($mountPoint); |
148 | - $folderMount->setAbsoluteMountPoint('/' . $user->getUID() . '/files/' . $mountPoint); |
|
148 | + $folderMount->setAbsoluteMountPoint('/'.$user->getUID().'/files/'.$mountPoint); |
|
149 | 149 | $folderMount->setPermissions($this->extractPermission($circle)); |
150 | 150 | |
151 | 151 | try { |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | // move existing node if it's a file and create the right folder |
190 | 190 | if (!$circlesFolder instanceof Folder) { |
191 | 191 | $new = $this->generateFolderName($userFolder, $userFolderPath); |
192 | - $circlesFolder->move($userFolder->getPath() . '/' . $new); |
|
192 | + $circlesFolder->move($userFolder->getPath().'/'.$new); |
|
193 | 193 | $circlesFolder = $userFolder->newFolder($userFolderPath); |
194 | 194 | } |
195 | 195 | } catch (NotFoundException $e) { |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | */ |
248 | 248 | private function generateFolderName(Folder $folder, string $filename, int $loop = 1): string { |
249 | 249 | $path = $filename; |
250 | - $path .= ($loop > 1) ? ' (' . $loop . ')' : ''; |
|
250 | + $path .= ($loop > 1) ? ' ('.$loop.')' : ''; |
|
251 | 251 | |
252 | 252 | if (!$folder->nodeExists($filename)) { |
253 | 253 | return $filename; |
@@ -90,7 +90,7 @@ |
||
90 | 90 | * @return string |
91 | 91 | */ |
92 | 92 | public function getSourcePath(): string { |
93 | - return '/' . $this->circlesFolderManager->getRootFolder()->getPath() . '/' |
|
93 | + return '/'.$this->circlesFolderManager->getRootFolder()->getPath().'/' |
|
94 | 94 | . $this->folderMount->getCircleId(); |
95 | 95 | } |
96 | 96 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | // notification service |
140 | 140 | $context->registerNotifierService(Notifier::class); |
141 | 141 | |
142 | - $context->registerService(MountProvider::class, function (DIContainer $c) { |
|
142 | + $context->registerService(MountProvider::class, function(DIContainer $c) { |
|
143 | 143 | return new MountProvider( |
144 | 144 | $c->get(IRootFolder::class), |
145 | 145 | $c->get(LoggerInterface::class), |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | // It seems that AccountManager use deprecated dispatcher, let's use a deprecated listener |
196 | 196 | $dispatcher = OC::$server->getEventDispatcher(); |
197 | 197 | $dispatcher->addListener( |
198 | - 'OC\AccountManager::userUpdated', function (GenericEvent $event) { |
|
198 | + 'OC\AccountManager::userUpdated', function(GenericEvent $event) { |
|
199 | 199 | /** @var IUser $user */ |
200 | 200 | $user = $event->getSubject(); |
201 | 201 | /** @var DeprecatedListener $deprecatedListener */ |
@@ -190,7 +190,7 @@ |
||
190 | 190 | return $this->mountPoint; |
191 | 191 | } |
192 | 192 | |
193 | - return '/' . $this->getInitiator()->getUserId() . '/files/' . ltrim($this->mountPoint, '/'); |
|
193 | + return '/'.$this->getInitiator()->getUserId().'/files/'.ltrim($this->mountPoint, '/'); |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | /** |
@@ -398,8 +398,8 @@ discard block |
||
398 | 398 | foreach (explode(' ', $circle->getDisplayName()) as $word) { |
399 | 399 | $andX->add( |
400 | 400 | $expr->iLike( |
401 | - $this->getDefaultSelectAlias() . '.' . 'display_name', |
|
402 | - $this->createNamedParameter('%' . $word . '%') |
|
401 | + $this->getDefaultSelectAlias().'.'.'display_name', |
|
402 | + $this->createNamedParameter('%'.$word.'%') |
|
403 | 403 | ) |
404 | 404 | ); |
405 | 405 | } |
@@ -410,8 +410,8 @@ discard block |
||
410 | 410 | foreach (explode(' ', $circle->getDescription()) as $word) { |
411 | 411 | $orDescription->add( |
412 | 412 | $expr->iLike( |
413 | - $this->getDefaultSelectAlias() . '.' . 'description', |
|
414 | - $this->createNamedParameter('%' . $word . '%') |
|
413 | + $this->getDefaultSelectAlias().'.'.'description', |
|
414 | + $this->createNamedParameter('%'.$word.'%') |
|
415 | 415 | ) |
416 | 416 | ); |
417 | 417 | } |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | $this->generateRemoteInstanceSelectAlias($aliasRemoteInstance) |
442 | 442 | ->leftJoin( |
443 | 443 | $alias, CoreRequestBuilder::TABLE_REMOTE, $aliasRemoteInstance, |
444 | - $expr->eq($alias . '.instance', $aliasRemoteInstance . '.instance') |
|
444 | + $expr->eq($alias.'.instance', $aliasRemoteInstance.'.instance') |
|
445 | 445 | ); |
446 | 446 | } catch (RequestBuilderException $e) { |
447 | 447 | } |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | $expr = $this->expr(); |
494 | 494 | $this->leftJoin( |
495 | 495 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_REMOTE, $aliasRemote, |
496 | - $expr->eq($aliasRemote . '.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
496 | + $expr->eq($aliasRemote.'.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
497 | 497 | ); |
498 | 498 | } |
499 | 499 | |
@@ -521,12 +521,12 @@ discard block |
||
521 | 521 | $this->leftJoin( |
522 | 522 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteMember, |
523 | 523 | $expr->andX( |
524 | - $expr->eq($aliasRemoteMember . '.circle_id', $aliasCircle . '.unique_id'), |
|
524 | + $expr->eq($aliasRemoteMember.'.circle_id', $aliasCircle.'.unique_id'), |
|
525 | 525 | $expr->eq( |
526 | - $aliasRemoteMember . '.instance', |
|
526 | + $aliasRemoteMember.'.instance', |
|
527 | 527 | $this->createNamedParameter($remoteInstance->getInstance()) |
528 | 528 | ), |
529 | - $expr->gte($aliasRemoteMember . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
529 | + $expr->gte($aliasRemoteMember.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
530 | 530 | ) |
531 | 531 | ); |
532 | 532 | } |
@@ -558,21 +558,21 @@ discard block |
||
558 | 558 | $this->leftJoin( |
559 | 559 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircle, |
560 | 560 | $expr->andX( |
561 | - $expr->eq($aliasRemoteCircle . '.single_id', $aliasCircle . '.unique_id'), |
|
562 | - $expr->emptyString($aliasRemoteCircle . '.instance'), |
|
563 | - $expr->gte($aliasRemoteCircle . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
561 | + $expr->eq($aliasRemoteCircle.'.single_id', $aliasCircle.'.unique_id'), |
|
562 | + $expr->emptyString($aliasRemoteCircle.'.instance'), |
|
563 | + $expr->gte($aliasRemoteCircle.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
564 | 564 | ) |
565 | 565 | ); |
566 | 566 | $this->leftJoin( |
567 | 567 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircleOwner, |
568 | 568 | $expr->andX( |
569 | - $expr->eq($aliasRemoteCircle . '.circle_id', $aliasRemoteCircleOwner . '.circle_id'), |
|
569 | + $expr->eq($aliasRemoteCircle.'.circle_id', $aliasRemoteCircleOwner.'.circle_id'), |
|
570 | 570 | $expr->eq( |
571 | - $aliasRemoteCircleOwner . '.instance', |
|
571 | + $aliasRemoteCircleOwner.'.instance', |
|
572 | 572 | $this->createNamedParameter($remoteInstance->getInstance()) |
573 | 573 | ), |
574 | 574 | $expr->eq( |
575 | - $aliasRemoteCircleOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
575 | + $aliasRemoteCircleOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
576 | 576 | ) |
577 | 577 | ) |
578 | 578 | ); |
@@ -605,16 +605,16 @@ discard block |
||
605 | 605 | $expr = $this->expr(); |
606 | 606 | $orX = $expr->orX(); |
607 | 607 | $orX->add( |
608 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
608 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
609 | 609 | ); |
610 | 610 | |
611 | 611 | $orExtOrPassive = $expr->orX(); |
612 | 612 | $orExtOrPassive->add( |
613 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
613 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
614 | 614 | ); |
615 | 615 | if (!$sensitive) { |
616 | 616 | $orExtOrPassive->add( |
617 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
617 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
618 | 618 | ); |
619 | 619 | } else { |
620 | 620 | if ($this->getDefaultSelectAlias() === CoreQueryBuilder::MEMBER) { |
@@ -623,8 +623,8 @@ discard block |
||
623 | 623 | } |
624 | 624 | |
625 | 625 | $orInstance = $expr->orX(); |
626 | - $orInstance->add($expr->isNotNull($aliasRemoteMember . '.instance')); |
|
627 | - $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner . '.instance')); |
|
626 | + $orInstance->add($expr->isNotNull($aliasRemoteMember.'.instance')); |
|
627 | + $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner.'.instance')); |
|
628 | 628 | |
629 | 629 | $andExternal = $expr->andX(); |
630 | 630 | $andExternal->add($orExtOrPassive); |
@@ -633,13 +633,13 @@ discard block |
||
633 | 633 | $orExtOrTrusted = $expr->orX(); |
634 | 634 | $orExtOrTrusted->add($andExternal); |
635 | 635 | $orExtOrTrusted->add( |
636 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
636 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
637 | 637 | ); |
638 | 638 | |
639 | 639 | $andTrusted = $expr->andX(); |
640 | 640 | $andTrusted->add($orExtOrTrusted); |
641 | 641 | $andTrusted->add($this->exprLimitBitwise('config', Circle::CFG_FEDERATED, $aliasCircle)); |
642 | - $andTrusted->add($expr->emptyString($aliasOwner . '.instance')); |
|
642 | + $andTrusted->add($expr->emptyString($aliasOwner.'.instance')); |
|
643 | 643 | $orX->add($andTrusted); |
644 | 644 | |
645 | 645 | $this->andWhere($orX); |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | } |
667 | 667 | $this->innerJoin( |
668 | 668 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
669 | - $expr->eq($aliasMember . '.circle_id', $alias . '.unique_id') |
|
669 | + $expr->eq($aliasMember.'.circle_id', $alias.'.unique_id') |
|
670 | 670 | ); |
671 | 671 | |
672 | 672 | $this->filterDirectMembership($aliasMember, $member); |
@@ -691,12 +691,12 @@ discard block |
||
691 | 691 | $aliasCircle, |
692 | 692 | 'circles_membership', |
693 | 693 | $aliasMembership, |
694 | - $this->expr()->eq($aliasCircle . '.unique_id', $aliasMembership . '.circle_id') |
|
694 | + $this->expr()->eq($aliasCircle.'.unique_id', $aliasMembership.'.circle_id') |
|
695 | 695 | ); |
696 | 696 | |
697 | 697 | $this->andWhere( |
698 | 698 | $this->expr()->eq( |
699 | - $aliasMembership . '.single_id', |
|
699 | + $aliasMembership.'.single_id', |
|
700 | 700 | $this->createNamedParameter($federatedUser->getSingleId()) |
701 | 701 | ) |
702 | 702 | ); |
@@ -717,19 +717,19 @@ discard block |
||
717 | 717 | |
718 | 718 | if ($member->getUserId() !== '') { |
719 | 719 | $andX->add( |
720 | - $expr->eq($aliasMember . '.user_id', $this->createNamedParameter($member->getUserId())) |
|
720 | + $expr->eq($aliasMember.'.user_id', $this->createNamedParameter($member->getUserId())) |
|
721 | 721 | ); |
722 | 722 | } |
723 | 723 | |
724 | 724 | if ($member->getSingleId() !== '') { |
725 | 725 | $andX->add( |
726 | - $expr->eq($aliasMember . '.single_id', $this->createNamedParameter($member->getSingleId())) |
|
726 | + $expr->eq($aliasMember.'.single_id', $this->createNamedParameter($member->getSingleId())) |
|
727 | 727 | ); |
728 | 728 | } |
729 | 729 | |
730 | 730 | if ($member->getUserType() > 0) { |
731 | 731 | $andX->add( |
732 | - $expr->eq($aliasMember . '.user_type', $this->createNamedParameter($member->getUserType())) |
|
732 | + $expr->eq($aliasMember.'.user_type', $this->createNamedParameter($member->getUserType())) |
|
733 | 733 | ); |
734 | 734 | } |
735 | 735 | |
@@ -738,7 +738,7 @@ discard block |
||
738 | 738 | if ($member->getLevel() > 0) { |
739 | 739 | $andX->add( |
740 | 740 | $expr->gte( |
741 | - $aliasMember . '.level', |
|
741 | + $aliasMember.'.level', |
|
742 | 742 | $this->createNamedParameter($member->getLevel(), IQueryBuilder::PARAM_INT) |
743 | 743 | ) |
744 | 744 | ); |
@@ -779,7 +779,7 @@ discard block |
||
779 | 779 | $helperAlias, |
780 | 780 | CoreRequestBuilder::TABLE_CIRCLE, |
781 | 781 | $aliasCircle, |
782 | - $expr->eq($aliasCircle . '.unique_id', $helperAlias . '.' . $field) |
|
782 | + $expr->eq($aliasCircle.'.unique_id', $helperAlias.'.'.$field) |
|
783 | 783 | ); |
784 | 784 | |
785 | 785 | if (!is_null($initiator)) { |
@@ -810,7 +810,7 @@ discard block |
||
810 | 810 | $this->generateCircleSelectAlias($aliasInvitedBy) |
811 | 811 | ->leftJoin( |
812 | 812 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasInvitedBy, |
813 | - $expr->eq($aliasMember . '.invited_by', $aliasInvitedBy . '.unique_id') |
|
813 | + $expr->eq($aliasMember.'.invited_by', $aliasInvitedBy.'.unique_id') |
|
814 | 814 | ); |
815 | 815 | |
816 | 816 | $this->leftJoinOwner($aliasInvitedBy); |
@@ -841,7 +841,7 @@ discard block |
||
841 | 841 | $this->generateCircleSelectAlias($aliasBasedOn) |
842 | 842 | ->leftJoin( |
843 | 843 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasBasedOn, |
844 | - $expr->eq($aliasBasedOn . '.unique_id', $aliasMember . '.single_id') |
|
844 | + $expr->eq($aliasBasedOn.'.unique_id', $aliasMember.'.single_id') |
|
845 | 845 | ); |
846 | 846 | |
847 | 847 | if (!is_null($initiator)) { |
@@ -874,9 +874,9 @@ discard block |
||
874 | 874 | ->leftJoin( |
875 | 875 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
876 | 876 | $expr->andX( |
877 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $field), |
|
877 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$field), |
|
878 | 878 | $expr->eq( |
879 | - $aliasMember . '.level', |
|
879 | + $aliasMember.'.level', |
|
880 | 880 | $this->createNamedParameter(Member::LEVEL_OWNER, self::PARAM_INT) |
881 | 881 | ) |
882 | 882 | ) |
@@ -908,7 +908,7 @@ discard block |
||
908 | 908 | |
909 | 909 | $expr = $this->expr(); |
910 | 910 | |
911 | - $on = $expr->andX($expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field)); |
|
911 | + $on = $expr->andX($expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field)); |
|
912 | 912 | |
913 | 913 | // limit on membership level if requested |
914 | 914 | $minLevel = $probe->getMinimumLevel(); |
@@ -949,8 +949,8 @@ discard block |
||
949 | 949 | ->leftJoin( |
950 | 950 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
951 | 951 | $expr->andX( |
952 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $fieldCircleId), |
|
953 | - $expr->eq($aliasMember . '.single_id', $alias . '.' . $fieldSingleId), |
|
952 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$fieldCircleId), |
|
953 | + $expr->eq($aliasMember.'.single_id', $alias.'.'.$fieldSingleId), |
|
954 | 954 | $this->exprGt('level', Member::LEVEL_MEMBER, true, $aliasMember) |
955 | 955 | ) |
956 | 956 | ); |
@@ -982,7 +982,7 @@ discard block |
||
982 | 982 | |
983 | 983 | $this->leftJoin( |
984 | 984 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
985 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
985 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
986 | 986 | ); |
987 | 987 | |
988 | 988 | // if (!$this->getBool('getData', $options, false)) { |
@@ -996,8 +996,8 @@ discard block |
||
996 | 996 | ->leftJoin( |
997 | 997 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
998 | 998 | $expr->andX( |
999 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id'), |
|
1000 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id') |
|
999 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id'), |
|
1000 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id') |
|
1001 | 1001 | ) |
1002 | 1002 | ); |
1003 | 1003 | |
@@ -1014,12 +1014,12 @@ discard block |
||
1014 | 1014 | $aliasUpstreamMembership = $this->generateAlias($alias, self::UPSTREAM_MEMBERSHIPS, $options); |
1015 | 1015 | $this->leftJoin( |
1016 | 1016 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasUpstreamMembership, |
1017 | - $expr->eq($aliasUpstreamMembership . '.single_id', $this->createNamedParameter($singleId)) |
|
1017 | + $expr->eq($aliasUpstreamMembership.'.single_id', $this->createNamedParameter($singleId)) |
|
1018 | 1018 | ); |
1019 | 1019 | |
1020 | 1020 | $orX = $expr->orX( |
1021 | - $expr->eq($aliasUpstreamMembership . '.circle_id', $alias . '.' . $field), |
|
1022 | - $expr->eq($alias . '.' . $field, $this->createNamedParameter($singleId)) |
|
1021 | + $expr->eq($aliasUpstreamMembership.'.circle_id', $alias.'.'.$field), |
|
1022 | + $expr->eq($alias.'.'.$field, $this->createNamedParameter($singleId)) |
|
1023 | 1023 | ); |
1024 | 1024 | |
1025 | 1025 | $this->andWhere($orX); |
@@ -1040,11 +1040,11 @@ discard block |
||
1040 | 1040 | |
1041 | 1041 | $expr = $this->expr(); |
1042 | 1042 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); |
1043 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); |
|
1043 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); |
|
1044 | 1044 | if ($level > 1) { |
1045 | 1045 | $this->andWhere( |
1046 | 1046 | $expr->gte( |
1047 | - $aliasMembership . '.level', |
|
1047 | + $aliasMembership.'.level', |
|
1048 | 1048 | $this->createNamedParameter($level, IQueryBuilder::PARAM_INT) |
1049 | 1049 | ) |
1050 | 1050 | ); |
@@ -1072,8 +1072,8 @@ discard block |
||
1072 | 1072 | $this->leftJoin( |
1073 | 1073 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
1074 | 1074 | $expr->andX( |
1075 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field), |
|
1076 | - $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') |
|
1075 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field), |
|
1076 | + $expr->eq($aliasMembership.'.single_id', $alias.'.single_id') |
|
1077 | 1077 | ) |
1078 | 1078 | ); |
1079 | 1079 | |
@@ -1086,8 +1086,8 @@ discard block |
||
1086 | 1086 | ->leftJoin( |
1087 | 1087 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, |
1088 | 1088 | $expr->andX( |
1089 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), |
|
1090 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') |
|
1089 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), |
|
1090 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') |
|
1091 | 1091 | ) |
1092 | 1092 | ); |
1093 | 1093 | } |
@@ -1127,7 +1127,7 @@ discard block |
||
1127 | 1127 | |
1128 | 1128 | $this->leftJoin( |
1129 | 1129 | $alias, CoreRequestBuilder::TABLE_TOKEN, $aliasShareToken, |
1130 | - $expr->eq($aliasShareToken . '.share_id', $alias . '.' . $field) |
|
1130 | + $expr->eq($aliasShareToken.'.share_id', $alias.'.'.$field) |
|
1131 | 1131 | ); |
1132 | 1132 | } |
1133 | 1133 | |
@@ -1169,14 +1169,14 @@ discard block |
||
1169 | 1169 | try { |
1170 | 1170 | $aliasConfig = $this->generateAlias($alias, self::CONFIG, $options); |
1171 | 1171 | $this->selectAlias( |
1172 | - $aliasConfig . '.config', |
|
1173 | - (($alias !== $this->getDefaultSelectAlias()) ? $alias . '_' : '') . 'circle_config' |
|
1172 | + $aliasConfig.'.config', |
|
1173 | + (($alias !== $this->getDefaultSelectAlias()) ? $alias.'_' : '').'circle_config' |
|
1174 | 1174 | ); |
1175 | 1175 | $this->leftJoin( |
1176 | 1176 | $alias, |
1177 | 1177 | CoreRequestBuilder::TABLE_CIRCLE, |
1178 | 1178 | $aliasConfig, |
1179 | - $expr->eq($alias . '.circle_id', $aliasConfig . '.unique_id') |
|
1179 | + $expr->eq($alias.'.circle_id', $aliasConfig.'.unique_id') |
|
1180 | 1180 | ); |
1181 | 1181 | } catch (RequestBuilderException $e) { |
1182 | 1182 | } |
@@ -1214,7 +1214,7 @@ discard block |
||
1214 | 1214 | $aliasMembership, |
1215 | 1215 | $expr->andX( |
1216 | 1216 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasMembership), |
1217 | - $expr->eq($aliasMembership . '.circle_id', $helperAlias . '.' . $field) |
|
1217 | + $expr->eq($aliasMembership.'.circle_id', $helperAlias.'.'.$field) |
|
1218 | 1218 | ) |
1219 | 1219 | ); |
1220 | 1220 | |
@@ -1233,11 +1233,11 @@ discard block |
||
1233 | 1233 | $aliasMembershipCircle = $this->generateAlias($aliasMembership, self::CONFIG, $options); |
1234 | 1234 | $orXMembershipCircle = $expr->orX(); |
1235 | 1235 | array_map( |
1236 | - function (string $alias) use ($orXMembershipCircle, $aliasMembershipCircle) { |
|
1236 | + function(string $alias) use ($orXMembershipCircle, $aliasMembershipCircle) { |
|
1237 | 1237 | $orXMembershipCircle->add( |
1238 | 1238 | $this->expr()->eq( |
1239 | - $alias . '.circle_id', |
|
1240 | - $aliasMembershipCircle . '.unique_id' |
|
1239 | + $alias.'.circle_id', |
|
1240 | + $aliasMembershipCircle.'.unique_id' |
|
1241 | 1241 | ) |
1242 | 1242 | ); |
1243 | 1243 | }, |
@@ -1269,7 +1269,7 @@ discard block |
||
1269 | 1269 | $aliasDirectInitiator, |
1270 | 1270 | $expr->andX( |
1271 | 1271 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasDirectInitiator), |
1272 | - $expr->eq($aliasDirectInitiator . '.circle_id', $helperAlias . '.' . $field) |
|
1272 | + $expr->eq($aliasDirectInitiator.'.circle_id', $helperAlias.'.'.$field) |
|
1273 | 1273 | ) |
1274 | 1274 | ); |
1275 | 1275 | } catch (RequestBuilderException $e) { |
@@ -1283,8 +1283,8 @@ discard block |
||
1283 | 1283 | $this->leftJoin( |
1284 | 1284 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
1285 | 1285 | $expr->andX( |
1286 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), |
|
1287 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') |
|
1286 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), |
|
1287 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') |
|
1288 | 1288 | ) |
1289 | 1289 | ); |
1290 | 1290 | |
@@ -1292,8 +1292,8 @@ discard block |
||
1292 | 1292 | $this->leftJoin( |
1293 | 1293 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
1294 | 1294 | $expr->andX( |
1295 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), |
|
1296 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') |
|
1295 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), |
|
1296 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') |
|
1297 | 1297 | ) |
1298 | 1298 | ); |
1299 | 1299 | |
@@ -1339,7 +1339,7 @@ discard block |
||
1339 | 1339 | ->leftJoin( |
1340 | 1340 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
1341 | 1341 | $expr->andX( |
1342 | - $expr->eq($aliasInitiator . '.circle_id', $helperAlias . '.' . $field), |
|
1342 | + $expr->eq($aliasInitiator.'.circle_id', $helperAlias.'.'.$field), |
|
1343 | 1343 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasInitiator) |
1344 | 1344 | ) |
1345 | 1345 | ); |
@@ -1375,7 +1375,7 @@ discard block |
||
1375 | 1375 | $orX->add( |
1376 | 1376 | $expr->andX( |
1377 | 1377 | $this->exprLimitBitwise('config', Circle::CFG_PERSONAL, $aliasMembershipCircle), |
1378 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1378 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1379 | 1379 | ) |
1380 | 1380 | ); |
1381 | 1381 | } |
@@ -1385,10 +1385,10 @@ discard block |
||
1385 | 1385 | $orXLevelCheck = $expr->orX(); |
1386 | 1386 | |
1387 | 1387 | array_map( |
1388 | - function (string $alias) use ($orXLevelCheck, $minimumLevel) { |
|
1388 | + function(string $alias) use ($orXLevelCheck, $minimumLevel) { |
|
1389 | 1389 | $orXLevelCheck->add( |
1390 | 1390 | $this->expr()->gte( |
1391 | - $alias . '.level', |
|
1391 | + $alias.'.level', |
|
1392 | 1392 | $this->createNamedParameter($minimumLevel) |
1393 | 1393 | ) |
1394 | 1394 | ); |
@@ -1482,21 +1482,21 @@ discard block |
||
1482 | 1482 | $expr = $this->expr(); |
1483 | 1483 | $andPassive = $expr->andX(); |
1484 | 1484 | $andPassive->add( |
1485 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1485 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1486 | 1486 | ); |
1487 | 1487 | |
1488 | 1488 | $orMemberOrLevel = $expr->orX(); |
1489 | 1489 | $orMemberOrLevel->add( |
1490 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance') |
|
1490 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance') |
|
1491 | 1491 | ); |
1492 | 1492 | // TODO: do we need this ? (display members from the local instance) |
1493 | 1493 | $orMemberOrLevel->add( |
1494 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance') |
|
1494 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance') |
|
1495 | 1495 | ); |
1496 | 1496 | |
1497 | 1497 | $orMemberOrLevel->add( |
1498 | 1498 | $expr->eq( |
1499 | - $this->getDefaultSelectAlias() . '.level', |
|
1499 | + $this->getDefaultSelectAlias().'.level', |
|
1500 | 1500 | $this->createNamedParameter(Member::LEVEL_OWNER) |
1501 | 1501 | ) |
1502 | 1502 | ); |
@@ -1533,11 +1533,11 @@ discard block |
||
1533 | 1533 | ) |
1534 | 1534 | ->leftJoin( |
1535 | 1535 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, |
1536 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') |
|
1536 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') |
|
1537 | 1537 | ) |
1538 | 1538 | ->leftJoin( |
1539 | 1539 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, |
1540 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') |
|
1540 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') |
|
1541 | 1541 | ); |
1542 | 1542 | } |
1543 | 1543 | |
@@ -1559,8 +1559,8 @@ discard block |
||
1559 | 1559 | $this->leftJoin( |
1560 | 1560 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, |
1561 | 1561 | $expr->andX( |
1562 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), |
|
1563 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') |
|
1562 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), |
|
1563 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') |
|
1564 | 1564 | ) |
1565 | 1565 | ); |
1566 | 1566 | |
@@ -1610,13 +1610,13 @@ discard block |
||
1610 | 1610 | $this->leftJoin( |
1611 | 1611 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, |
1612 | 1612 | $expr->andX( |
1613 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), |
|
1614 | - $expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id') |
|
1613 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), |
|
1614 | + $expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id') |
|
1615 | 1615 | ) |
1616 | 1616 | ); |
1617 | 1617 | |
1618 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); |
|
1619 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); |
|
1618 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); |
|
1619 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); |
|
1620 | 1620 | } |
1621 | 1621 | |
1622 | 1622 | |
@@ -1724,10 +1724,10 @@ discard block |
||
1724 | 1724 | */ |
1725 | 1725 | public function generateAlias(string $base, string $extension, ?array &$options = []): string { |
1726 | 1726 | $search = str_replace('_', '.', $base); |
1727 | - $path = $search . '.' . $extension; |
|
1727 | + $path = $search.'.'.$extension; |
|
1728 | 1728 | if (!$this->validKey($path, $this->getSqlPath()) |
1729 | 1729 | && !in_array($extension, $this->getArray($search, $this->getSqlPath()))) { |
1730 | - throw new RequestBuilderException($extension . ' not found in ' . $search); |
|
1730 | + throw new RequestBuilderException($extension.' not found in '.$search); |
|
1731 | 1731 | } |
1732 | 1732 | |
1733 | 1733 | if (!is_array($options)) { |
@@ -1736,15 +1736,15 @@ discard block |
||
1736 | 1736 | |
1737 | 1737 | $optionPath = ''; |
1738 | 1738 | foreach (explode('.', $path) as $p) { |
1739 | - $optionPath = trim($optionPath . '.' . $p, '.'); |
|
1739 | + $optionPath = trim($optionPath.'.'.$p, '.'); |
|
1740 | 1740 | $options = array_merge( |
1741 | 1741 | $options, |
1742 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->getSqlPath()), |
|
1743 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) |
|
1742 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->getSqlPath()), |
|
1743 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) |
|
1744 | 1744 | ); |
1745 | 1745 | } |
1746 | 1746 | |
1747 | - return $base . '_' . $extension; |
|
1747 | + return $base.'_'.$extension; |
|
1748 | 1748 | } |
1749 | 1749 | |
1750 | 1750 | |
@@ -1764,7 +1764,7 @@ discard block |
||
1764 | 1764 | } else { |
1765 | 1765 | $k = $arr; |
1766 | 1766 | } |
1767 | - $path[$k] = $prefix . '_' . $k . '_'; |
|
1767 | + $path[$k] = $prefix.'_'.$k.'_'; |
|
1768 | 1768 | } |
1769 | 1769 | |
1770 | 1770 | return $path; |