@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | return $value; |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | - if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') { |
|
| 178 | + if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') { |
|
| 179 | 179 | return $value; |
| 180 | 180 | } |
| 181 | 181 | |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | } |
| 430 | 430 | |
| 431 | 431 | if (array_key_exists('port', $loopback)) { |
| 432 | - $loopbackCloudId = $loopback['host'] . ':' . $loopback['port']; |
|
| 432 | + $loopbackCloudId = $loopback['host'].':'.$loopback['port']; |
|
| 433 | 433 | } else { |
| 434 | 434 | $loopbackCloudId = $loopback['host']; |
| 435 | 435 | } |
@@ -458,12 +458,12 @@ discard block |
||
| 458 | 458 | $scheme = $this->getAppValue(self::LOOPBACK_CLOUD_SCHEME); |
| 459 | 459 | } |
| 460 | 460 | |
| 461 | - $base = $scheme . '://' . $instance; |
|
| 461 | + $base = $scheme.'://'.$instance; |
|
| 462 | 462 | if ($route === '') { |
| 463 | 463 | return $base; |
| 464 | 464 | } |
| 465 | 465 | |
| 466 | - return $base . $this->urlGenerator->linkToRoute($route, $args); |
|
| 466 | + return $base.$this->urlGenerator->linkToRoute($route, $args); |
|
| 467 | 467 | } |
| 468 | 468 | |
| 469 | 469 | |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | return ''; |
| 564 | 564 | } |
| 565 | 565 | |
| 566 | - return (($showAt) ? '@' : '') . $instance; |
|
| 566 | + return (($showAt) ? '@' : '').$instance; |
|
| 567 | 567 | } |
| 568 | 568 | |
| 569 | 569 | |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | * @param int $config |
| 276 | 276 | */ |
| 277 | 277 | public function limitToConfigFlag(int $config): void { |
| 278 | - $this->andWhere($this->expr()->bitwiseAnd($this->getDefaultSelectAlias() . '.config', $config)); |
|
| 278 | + $this->andWhere($this->expr()->bitwiseAnd($this->getDefaultSelectAlias().'.config', $config)); |
|
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | if ($circle->getDisplayName() !== '') { |
| 362 | - $this->searchInDBField('display_name', '%' . $circle->getDisplayName() . '%'); |
|
| 362 | + $this->searchInDBField('display_name', '%'.$circle->getDisplayName().'%'); |
|
| 363 | 363 | } |
| 364 | 364 | } |
| 365 | 365 | |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | $this->generateRemoteInstanceSelectAlias($aliasRemoteInstance) |
| 376 | 376 | ->leftJoin( |
| 377 | 377 | $alias, CoreRequestBuilder::TABLE_REMOTE, $aliasRemoteInstance, |
| 378 | - $expr->eq($alias . '.instance', $aliasRemoteInstance . '.instance') |
|
| 378 | + $expr->eq($alias.'.instance', $aliasRemoteInstance.'.instance') |
|
| 379 | 379 | ); |
| 380 | 380 | } catch (RequestBuilderException $e) { |
| 381 | 381 | } |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | $expr = $this->expr(); |
| 429 | 429 | $this->leftJoin( |
| 430 | 430 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_REMOTE, $aliasRemote, |
| 431 | - $expr->eq($aliasRemote . '.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
| 431 | + $expr->eq($aliasRemote.'.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
| 432 | 432 | ); |
| 433 | 433 | } |
| 434 | 434 | |
@@ -456,12 +456,12 @@ discard block |
||
| 456 | 456 | $this->leftJoin( |
| 457 | 457 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteMember, |
| 458 | 458 | $expr->andX( |
| 459 | - $expr->eq($aliasRemoteMember . '.circle_id', $aliasCircle . '.unique_id'), |
|
| 459 | + $expr->eq($aliasRemoteMember.'.circle_id', $aliasCircle.'.unique_id'), |
|
| 460 | 460 | $expr->eq( |
| 461 | - $aliasRemoteMember . '.instance', |
|
| 461 | + $aliasRemoteMember.'.instance', |
|
| 462 | 462 | $this->createNamedParameter($remoteInstance->getInstance()) |
| 463 | 463 | ), |
| 464 | - $expr->gte($aliasRemoteMember . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 464 | + $expr->gte($aliasRemoteMember.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 465 | 465 | ) |
| 466 | 466 | ); |
| 467 | 467 | } |
@@ -493,21 +493,21 @@ discard block |
||
| 493 | 493 | $this->leftJoin( |
| 494 | 494 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircle, |
| 495 | 495 | $expr->andX( |
| 496 | - $expr->eq($aliasRemoteCircle . '.single_id', $aliasCircle . '.unique_id'), |
|
| 497 | - $expr->emptyString($aliasRemoteCircle . '.instance'), |
|
| 498 | - $expr->gte($aliasRemoteCircle . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 496 | + $expr->eq($aliasRemoteCircle.'.single_id', $aliasCircle.'.unique_id'), |
|
| 497 | + $expr->emptyString($aliasRemoteCircle.'.instance'), |
|
| 498 | + $expr->gte($aliasRemoteCircle.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 499 | 499 | ) |
| 500 | 500 | ); |
| 501 | 501 | $this->leftJoin( |
| 502 | 502 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircleOwner, |
| 503 | 503 | $expr->andX( |
| 504 | - $expr->eq($aliasRemoteCircle . '.circle_id', $aliasRemoteCircleOwner . '.circle_id'), |
|
| 504 | + $expr->eq($aliasRemoteCircle.'.circle_id', $aliasRemoteCircleOwner.'.circle_id'), |
|
| 505 | 505 | $expr->eq( |
| 506 | - $aliasRemoteCircleOwner . '.instance', |
|
| 506 | + $aliasRemoteCircleOwner.'.instance', |
|
| 507 | 507 | $this->createNamedParameter($remoteInstance->getInstance()) |
| 508 | 508 | ), |
| 509 | 509 | $expr->eq( |
| 510 | - $aliasRemoteCircleOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
| 510 | + $aliasRemoteCircleOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
| 511 | 511 | ) |
| 512 | 512 | ) |
| 513 | 513 | ); |
@@ -540,16 +540,16 @@ discard block |
||
| 540 | 540 | $expr = $this->expr(); |
| 541 | 541 | $orX = $expr->orX(); |
| 542 | 542 | $orX->add( |
| 543 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
| 543 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
| 544 | 544 | ); |
| 545 | 545 | |
| 546 | 546 | $orExtOrPassive = $expr->orX(); |
| 547 | 547 | $orExtOrPassive->add( |
| 548 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
| 548 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
| 549 | 549 | ); |
| 550 | 550 | if (!$sensitive) { |
| 551 | 551 | $orExtOrPassive->add( |
| 552 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
| 552 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
| 553 | 553 | ); |
| 554 | 554 | } else { |
| 555 | 555 | if ($this->getDefaultSelectAlias() === CoreQueryBuilder::MEMBER) { |
@@ -558,8 +558,8 @@ discard block |
||
| 558 | 558 | } |
| 559 | 559 | |
| 560 | 560 | $orInstance = $expr->orX(); |
| 561 | - $orInstance->add($expr->isNotNull($aliasRemoteMember . '.instance')); |
|
| 562 | - $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner . '.instance')); |
|
| 561 | + $orInstance->add($expr->isNotNull($aliasRemoteMember.'.instance')); |
|
| 562 | + $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner.'.instance')); |
|
| 563 | 563 | |
| 564 | 564 | $andExternal = $expr->andX(); |
| 565 | 565 | $andExternal->add($orExtOrPassive); |
@@ -568,13 +568,13 @@ discard block |
||
| 568 | 568 | $orExtOrTrusted = $expr->orX(); |
| 569 | 569 | $orExtOrTrusted->add($andExternal); |
| 570 | 570 | $orExtOrTrusted->add( |
| 571 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
| 571 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
| 572 | 572 | ); |
| 573 | 573 | |
| 574 | 574 | $andTrusted = $expr->andX(); |
| 575 | 575 | $andTrusted->add($orExtOrTrusted); |
| 576 | - $andTrusted->add($expr->bitwiseAnd($aliasCircle . '.config', Circle::CFG_FEDERATED)); |
|
| 577 | - $andTrusted->add($expr->emptyString($aliasOwner . '.instance')); |
|
| 576 | + $andTrusted->add($expr->bitwiseAnd($aliasCircle.'.config', Circle::CFG_FEDERATED)); |
|
| 577 | + $andTrusted->add($expr->emptyString($aliasOwner.'.instance')); |
|
| 578 | 578 | $orX->add($andTrusted); |
| 579 | 579 | |
| 580 | 580 | $this->andWhere($orX); |
@@ -601,7 +601,7 @@ discard block |
||
| 601 | 601 | } |
| 602 | 602 | $this->leftJoin( |
| 603 | 603 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
| 604 | - $expr->eq($aliasMember . '.circle_id', $alias . '.unique_id') |
|
| 604 | + $expr->eq($aliasMember.'.circle_id', $alias.'.unique_id') |
|
| 605 | 605 | ); |
| 606 | 606 | |
| 607 | 607 | $this->filterDirectMembership($aliasMember, $member); |
@@ -622,28 +622,28 @@ discard block |
||
| 622 | 622 | |
| 623 | 623 | if ($member->getUserId() !== '') { |
| 624 | 624 | $andX->add( |
| 625 | - $expr->eq($aliasMember . '.user_id', $this->createNamedParameter($member->getUserId())) |
|
| 625 | + $expr->eq($aliasMember.'.user_id', $this->createNamedParameter($member->getUserId())) |
|
| 626 | 626 | ); |
| 627 | 627 | } |
| 628 | 628 | |
| 629 | 629 | if ($member->getSingleId() !== '') { |
| 630 | 630 | $andX->add( |
| 631 | - $expr->eq($aliasMember . '.single_id', $this->createNamedParameter($member->getSingleId())) |
|
| 631 | + $expr->eq($aliasMember.'.single_id', $this->createNamedParameter($member->getSingleId())) |
|
| 632 | 632 | ); |
| 633 | 633 | } |
| 634 | 634 | |
| 635 | 635 | if ($member->getUserType() > 0) { |
| 636 | 636 | $andX->add( |
| 637 | - $expr->eq($aliasMember . '.user_type', $this->createNamedParameter($member->getUserType())) |
|
| 637 | + $expr->eq($aliasMember.'.user_type', $this->createNamedParameter($member->getUserType())) |
|
| 638 | 638 | ); |
| 639 | 639 | } |
| 640 | 640 | |
| 641 | 641 | $andX->add( |
| 642 | - $expr->eq($aliasMember . '.instance', $this->createNamedParameter($this->getInstance($member))) |
|
| 642 | + $expr->eq($aliasMember.'.instance', $this->createNamedParameter($this->getInstance($member))) |
|
| 643 | 643 | ); |
| 644 | 644 | |
| 645 | 645 | if ($member->getLevel() > 0) { |
| 646 | - $andX->add($expr->gte($aliasMember . '.level', $this->createNamedParameter($member->getLevel()))); |
|
| 646 | + $andX->add($expr->gte($aliasMember.'.level', $this->createNamedParameter($member->getLevel()))); |
|
| 647 | 647 | } |
| 648 | 648 | |
| 649 | 649 | $this->andWhere($andX); |
@@ -681,7 +681,7 @@ discard block |
||
| 681 | 681 | $helperAlias, |
| 682 | 682 | CoreRequestBuilder::TABLE_CIRCLE, |
| 683 | 683 | $aliasCircle, |
| 684 | - $expr->eq($aliasCircle . '.unique_id', $helperAlias . '.' . $field) |
|
| 684 | + $expr->eq($aliasCircle.'.unique_id', $helperAlias.'.'.$field) |
|
| 685 | 685 | ); |
| 686 | 686 | |
| 687 | 687 | if (!is_null($initiator)) { |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | $this->generateCircleSelectAlias($aliasInvitedBy) |
| 713 | 713 | ->leftJoin( |
| 714 | 714 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasInvitedBy, |
| 715 | - $expr->eq($aliasMember . '.invited_by', $aliasInvitedBy . '.unique_id') |
|
| 715 | + $expr->eq($aliasMember.'.invited_by', $aliasInvitedBy.'.unique_id') |
|
| 716 | 716 | ); |
| 717 | 717 | |
| 718 | 718 | $this->leftJoinOwner($aliasInvitedBy); |
@@ -743,7 +743,7 @@ discard block |
||
| 743 | 743 | $this->generateCircleSelectAlias($aliasBasedOn) |
| 744 | 744 | ->leftJoin( |
| 745 | 745 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasBasedOn, |
| 746 | - $expr->eq($aliasBasedOn . '.unique_id', $aliasMember . '.single_id') |
|
| 746 | + $expr->eq($aliasBasedOn.'.unique_id', $aliasMember.'.single_id') |
|
| 747 | 747 | ); |
| 748 | 748 | |
| 749 | 749 | if (!is_null($initiator)) { |
@@ -776,9 +776,9 @@ discard block |
||
| 776 | 776 | ->leftJoin( |
| 777 | 777 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
| 778 | 778 | $expr->andX( |
| 779 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $field), |
|
| 779 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$field), |
|
| 780 | 780 | $expr->eq( |
| 781 | - $aliasMember . '.level', |
|
| 781 | + $aliasMember.'.level', |
|
| 782 | 782 | $this->createNamedParameter(Member::LEVEL_OWNER, self::PARAM_INT) |
| 783 | 783 | ) |
| 784 | 784 | ) |
@@ -816,10 +816,10 @@ discard block |
||
| 816 | 816 | ->leftJoin( |
| 817 | 817 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
| 818 | 818 | $expr->andX( |
| 819 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $fieldCircleId), |
|
| 820 | - $expr->eq($aliasMember . '.single_id', $alias . '.' . $fieldSingleId), |
|
| 819 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$fieldCircleId), |
|
| 820 | + $expr->eq($aliasMember.'.single_id', $alias.'.'.$fieldSingleId), |
|
| 821 | 821 | $expr->gte( |
| 822 | - $aliasMember . '.level', |
|
| 822 | + $aliasMember.'.level', |
|
| 823 | 823 | $this->createNamedParameter(Member::LEVEL_MEMBER, self::PARAM_INT) |
| 824 | 824 | ) |
| 825 | 825 | ) |
@@ -852,7 +852,7 @@ discard block |
||
| 852 | 852 | |
| 853 | 853 | $this->leftJoin( |
| 854 | 854 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
| 855 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
| 855 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
| 856 | 856 | ); |
| 857 | 857 | |
| 858 | 858 | // if (!$this->getBool('getData', $options, false)) { |
@@ -866,8 +866,8 @@ discard block |
||
| 866 | 866 | ->leftJoin( |
| 867 | 867 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
| 868 | 868 | $expr->andX( |
| 869 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id'), |
|
| 870 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id') |
|
| 869 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id'), |
|
| 870 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id') |
|
| 871 | 871 | ) |
| 872 | 872 | ); |
| 873 | 873 | |
@@ -884,12 +884,12 @@ discard block |
||
| 884 | 884 | $aliasUpstreamMembership = $this->generateAlias($alias, self::UPSTREAM_MEMBERSHIPS, $options); |
| 885 | 885 | $this->leftJoin( |
| 886 | 886 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasUpstreamMembership, |
| 887 | - $expr->eq($aliasUpstreamMembership . '.single_id', $this->createNamedParameter($singleId)) |
|
| 887 | + $expr->eq($aliasUpstreamMembership.'.single_id', $this->createNamedParameter($singleId)) |
|
| 888 | 888 | ); |
| 889 | 889 | |
| 890 | 890 | $orX = $expr->orX( |
| 891 | - $expr->eq($aliasUpstreamMembership . '.circle_id', $alias . '.' . $field), |
|
| 892 | - $expr->eq($alias . '.' . $field, $this->createNamedParameter($singleId)) |
|
| 891 | + $expr->eq($aliasUpstreamMembership.'.circle_id', $alias.'.'.$field), |
|
| 892 | + $expr->eq($alias.'.'.$field, $this->createNamedParameter($singleId)) |
|
| 893 | 893 | ); |
| 894 | 894 | |
| 895 | 895 | $this->andWhere($orX); |
@@ -909,7 +909,7 @@ discard block |
||
| 909 | 909 | |
| 910 | 910 | $expr = $this->expr(); |
| 911 | 911 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); |
| 912 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); |
|
| 912 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); |
|
| 913 | 913 | } |
| 914 | 914 | |
| 915 | 915 | |
@@ -933,7 +933,7 @@ discard block |
||
| 933 | 933 | $this->leftJoin( |
| 934 | 934 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
| 935 | 935 | // $expr->andX( |
| 936 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field) |
|
| 936 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field) |
|
| 937 | 937 | // $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') |
| 938 | 938 | // ) |
| 939 | 939 | ); |
@@ -947,8 +947,8 @@ discard block |
||
| 947 | 947 | ->leftJoin( |
| 948 | 948 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, |
| 949 | 949 | $expr->andX( |
| 950 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), |
|
| 951 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') |
|
| 950 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), |
|
| 951 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') |
|
| 952 | 952 | ) |
| 953 | 953 | ); |
| 954 | 954 | } |
@@ -1014,7 +1014,7 @@ discard block |
||
| 1014 | 1014 | $aliasMembership, |
| 1015 | 1015 | $expr->andX( |
| 1016 | 1016 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasMembership), |
| 1017 | - $expr->eq($aliasMembership . '.circle_id', $helperAlias . '.' . $field) |
|
| 1017 | + $expr->eq($aliasMembership.'.circle_id', $helperAlias.'.'.$field) |
|
| 1018 | 1018 | ) |
| 1019 | 1019 | ); |
| 1020 | 1020 | |
@@ -1027,8 +1027,8 @@ discard block |
||
| 1027 | 1027 | $this->leftJoin( |
| 1028 | 1028 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
| 1029 | 1029 | $expr->andX( |
| 1030 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), |
|
| 1031 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') |
|
| 1030 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), |
|
| 1031 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') |
|
| 1032 | 1032 | ) |
| 1033 | 1033 | ); |
| 1034 | 1034 | |
@@ -1036,8 +1036,8 @@ discard block |
||
| 1036 | 1036 | $this->leftJoin( |
| 1037 | 1037 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
| 1038 | 1038 | $expr->andX( |
| 1039 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), |
|
| 1040 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') |
|
| 1039 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), |
|
| 1040 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') |
|
| 1041 | 1041 | ) |
| 1042 | 1042 | ); |
| 1043 | 1043 | |
@@ -1056,7 +1056,7 @@ discard block |
||
| 1056 | 1056 | $aliasInheritedByMembership = $this->generateAlias($aliasInheritedBy, self::MEMBERSHIPS); |
| 1057 | 1057 | $this->generateMembershipSelectAlias($aliasMembership, $aliasInheritedByMembership); |
| 1058 | 1058 | } catch (RequestBuilderException $e) { |
| 1059 | - \OC::$server->getLogger()->log(3, '-- ' . $e->getMessage()); |
|
| 1059 | + \OC::$server->getLogger()->log(3, '-- '.$e->getMessage()); |
|
| 1060 | 1060 | } |
| 1061 | 1061 | } |
| 1062 | 1062 | |
@@ -1080,30 +1080,30 @@ discard block |
||
| 1080 | 1080 | $orX = $expr->orX(); |
| 1081 | 1081 | $orX->add( |
| 1082 | 1082 | $expr->andX( |
| 1083 | - $expr->gte($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 1083 | + $expr->gte($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 1084 | 1084 | ) |
| 1085 | 1085 | ); |
| 1086 | 1086 | |
| 1087 | 1087 | if ($getPersonalCircle) { |
| 1088 | 1088 | $orX->add( |
| 1089 | 1089 | $expr->andX( |
| 1090 | - $expr->bitwiseAnd($alias . '.config', Circle::CFG_PERSONAL), |
|
| 1091 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
| 1090 | + $expr->bitwiseAnd($alias.'.config', Circle::CFG_PERSONAL), |
|
| 1091 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
| 1092 | 1092 | ) |
| 1093 | 1093 | ); |
| 1094 | 1094 | } |
| 1095 | 1095 | if (!$this->getBool('mustBeMember', $options, true)) { |
| 1096 | - $orX->add($expr->bitwiseAnd($alias . '.config', Circle::CFG_VISIBLE)); |
|
| 1096 | + $orX->add($expr->bitwiseAnd($alias.'.config', Circle::CFG_VISIBLE)); |
|
| 1097 | 1097 | } |
| 1098 | 1098 | if ($this->getBool('canBeVisitor', $options, false)) { |
| 1099 | 1099 | // TODO: should find a better way, also filter on remote initiator on non-federated ? |
| 1100 | - $orX->add($expr->gte($alias . '.config', $this->createNamedParameter(0))); |
|
| 1100 | + $orX->add($expr->gte($alias.'.config', $this->createNamedParameter(0))); |
|
| 1101 | 1101 | } |
| 1102 | 1102 | if ($this->getBool('canBeVisitorOnOpen', $options, false)) { |
| 1103 | 1103 | $andOpen = $expr->andX(); |
| 1104 | - $andOpen->add($expr->bitwiseAnd($alias . '.config', Circle::CFG_OPEN)); |
|
| 1104 | + $andOpen->add($expr->bitwiseAnd($alias.'.config', Circle::CFG_OPEN)); |
|
| 1105 | 1105 | $andOpen->add( |
| 1106 | - $this->createFunction('NOT') . $expr->bitwiseAnd($alias . '.config', Circle::CFG_REQUEST) |
|
| 1106 | + $this->createFunction('NOT').$expr->bitwiseAnd($alias.'.config', Circle::CFG_REQUEST) |
|
| 1107 | 1107 | ); |
| 1108 | 1108 | $orX->add($andOpen); |
| 1109 | 1109 | } |
@@ -1148,7 +1148,7 @@ discard block |
||
| 1148 | 1148 | $hide = $expr->andX(); |
| 1149 | 1149 | foreach (Circle::$DEF_CFG as $cfg => $v) { |
| 1150 | 1150 | if ($flag & $cfg) { |
| 1151 | - $hide->add($this->createFunction('NOT') . $expr->bitwiseAnd($aliasCircle . '.config', $cfg)); |
|
| 1151 | + $hide->add($this->createFunction('NOT').$expr->bitwiseAnd($aliasCircle.'.config', $cfg)); |
|
| 1152 | 1152 | } |
| 1153 | 1153 | } |
| 1154 | 1154 | |
@@ -1167,21 +1167,21 @@ discard block |
||
| 1167 | 1167 | $expr = $this->expr(); |
| 1168 | 1168 | $andPassive = $expr->andX(); |
| 1169 | 1169 | $andPassive->add( |
| 1170 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
| 1170 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
| 1171 | 1171 | ); |
| 1172 | 1172 | |
| 1173 | 1173 | $orMemberOrLevel = $expr->orX(); |
| 1174 | 1174 | $orMemberOrLevel->add( |
| 1175 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance') |
|
| 1175 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance') |
|
| 1176 | 1176 | ); |
| 1177 | 1177 | // TODO: do we need this ? (display members from the local instance) |
| 1178 | 1178 | $orMemberOrLevel->add( |
| 1179 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance') |
|
| 1179 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance') |
|
| 1180 | 1180 | ); |
| 1181 | 1181 | |
| 1182 | 1182 | $orMemberOrLevel->add( |
| 1183 | 1183 | $expr->eq( |
| 1184 | - $this->getDefaultSelectAlias() . '.level', |
|
| 1184 | + $this->getDefaultSelectAlias().'.level', |
|
| 1185 | 1185 | $this->createNamedParameter(Member::LEVEL_OWNER) |
| 1186 | 1186 | ) |
| 1187 | 1187 | ); |
@@ -1197,7 +1197,7 @@ discard block |
||
| 1197 | 1197 | * @param int $flag |
| 1198 | 1198 | */ |
| 1199 | 1199 | public function filterConfig(string $aliasCircle, int $flag): void { |
| 1200 | - $this->andWhere($this->expr()->bitwiseAnd($aliasCircle . '.config', $flag)); |
|
| 1200 | + $this->andWhere($this->expr()->bitwiseAnd($aliasCircle.'.config', $flag)); |
|
| 1201 | 1201 | } |
| 1202 | 1202 | |
| 1203 | 1203 | |
@@ -1228,11 +1228,11 @@ discard block |
||
| 1228 | 1228 | ) |
| 1229 | 1229 | ->leftJoin( |
| 1230 | 1230 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, |
| 1231 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') |
|
| 1231 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') |
|
| 1232 | 1232 | ) |
| 1233 | 1233 | ->leftJoin( |
| 1234 | 1234 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, |
| 1235 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') |
|
| 1235 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') |
|
| 1236 | 1236 | ); |
| 1237 | 1237 | } |
| 1238 | 1238 | |
@@ -1254,8 +1254,8 @@ discard block |
||
| 1254 | 1254 | $this->leftJoin( |
| 1255 | 1255 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, |
| 1256 | 1256 | $expr->andX( |
| 1257 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), |
|
| 1258 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') |
|
| 1257 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), |
|
| 1258 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') |
|
| 1259 | 1259 | ) |
| 1260 | 1260 | ); |
| 1261 | 1261 | |
@@ -1305,13 +1305,13 @@ discard block |
||
| 1305 | 1305 | $this->leftJoin( |
| 1306 | 1306 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, |
| 1307 | 1307 | $expr->andX( |
| 1308 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), |
|
| 1309 | - $expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id') |
|
| 1308 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), |
|
| 1309 | + $expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id') |
|
| 1310 | 1310 | ) |
| 1311 | 1311 | ); |
| 1312 | 1312 | |
| 1313 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); |
|
| 1314 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); |
|
| 1313 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); |
|
| 1314 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); |
|
| 1315 | 1315 | } |
| 1316 | 1316 | |
| 1317 | 1317 | |
@@ -1415,10 +1415,10 @@ discard block |
||
| 1415 | 1415 | */ |
| 1416 | 1416 | public function generateAlias(string $base, string $extension, ?array &$options = []): string { |
| 1417 | 1417 | $search = str_replace('_', '.', $base); |
| 1418 | - $path = $search . '.' . $extension; |
|
| 1418 | + $path = $search.'.'.$extension; |
|
| 1419 | 1419 | if (!$this->validKey($path, self::$SQL_PATH) |
| 1420 | 1420 | && !in_array($extension, $this->getArray($search, self::$SQL_PATH))) { |
| 1421 | - throw new RequestBuilderException($extension . ' not found in ' . $search); |
|
| 1421 | + throw new RequestBuilderException($extension.' not found in '.$search); |
|
| 1422 | 1422 | } |
| 1423 | 1423 | |
| 1424 | 1424 | if (!is_array($options)) { |
@@ -1427,15 +1427,15 @@ discard block |
||
| 1427 | 1427 | |
| 1428 | 1428 | $optionPath = ''; |
| 1429 | 1429 | foreach (explode('.', $path) as $p) { |
| 1430 | - $optionPath = trim($optionPath . '.' . $p, '.'); |
|
| 1430 | + $optionPath = trim($optionPath.'.'.$p, '.'); |
|
| 1431 | 1431 | $options = array_merge( |
| 1432 | 1432 | $options, |
| 1433 | - $this->getArray($optionPath . '.' . self::OPTIONS, self::$SQL_PATH), |
|
| 1434 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) |
|
| 1433 | + $this->getArray($optionPath.'.'.self::OPTIONS, self::$SQL_PATH), |
|
| 1434 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) |
|
| 1435 | 1435 | ); |
| 1436 | 1436 | } |
| 1437 | 1437 | |
| 1438 | - return $base . '_' . $extension; |
|
| 1438 | + return $base.'_'.$extension; |
|
| 1439 | 1439 | } |
| 1440 | 1440 | |
| 1441 | 1441 | |
@@ -1455,7 +1455,7 @@ discard block |
||
| 1455 | 1455 | } else { |
| 1456 | 1456 | $k = $arr; |
| 1457 | 1457 | } |
| 1458 | - $path[$k] = $prefix . '_' . $k . '_'; |
|
| 1458 | + $path[$k] = $prefix.'_'.$k.'_'; |
|
| 1459 | 1459 | } |
| 1460 | 1460 | |
| 1461 | 1461 | return $path; |
@@ -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; |