@@ -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 | |
@@ -84,26 +84,26 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | |
| 86 | 86 | // specific value |
| 87 | - const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
| 88 | - const CFG_SINGLE = 1; // Circle with only one single member. |
|
| 89 | - const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
| 87 | + const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
| 88 | + const CFG_SINGLE = 1; // Circle with only one single member. |
|
| 89 | + const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
| 90 | 90 | |
| 91 | 91 | // bitwise |
| 92 | - const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
| 93 | - const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
| 94 | - const CFG_OPEN = 16; // Circle is open, people can join |
|
| 95 | - const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
| 96 | - const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
| 97 | - const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
| 98 | - const CFG_PROTECTED = 256; // Password protected to join/request |
|
| 99 | - const CFG_NO_OWNER = 512; // no owner, only members |
|
| 100 | - const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
| 101 | - const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
| 102 | - const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
| 103 | - const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
| 104 | - const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
| 105 | - const CFG_FEDERATED = 32768; // Federated |
|
| 106 | - const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
| 92 | + const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
| 93 | + const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
| 94 | + const CFG_OPEN = 16; // Circle is open, people can join |
|
| 95 | + const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
| 96 | + const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
| 97 | + const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
| 98 | + const CFG_PROTECTED = 256; // Password protected to join/request |
|
| 99 | + const CFG_NO_OWNER = 512; // no owner, only members |
|
| 100 | + const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
| 101 | + const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
| 102 | + const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
| 103 | + const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
| 104 | + const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
| 105 | + const CFG_FEDERATED = 32768; // Federated |
|
| 106 | + const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
| 107 | 107 | |
| 108 | 108 | public static $DEF_CFG_MAX = 131071; |
| 109 | 109 | |
@@ -742,23 +742,23 @@ discard block |
||
| 742 | 742 | * @throws CircleNotFoundException |
| 743 | 743 | */ |
| 744 | 744 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
| 745 | - if ($this->get($prefix . 'unique_id', $data) === '') { |
|
| 745 | + if ($this->get($prefix.'unique_id', $data) === '') { |
|
| 746 | 746 | throw new CircleNotFoundException(); |
| 747 | 747 | } |
| 748 | 748 | |
| 749 | - $this->setSingleId($this->get($prefix . 'unique_id', $data)) |
|
| 750 | - ->setName($this->get($prefix . 'name', $data)) |
|
| 751 | - ->setDisplayName($this->get($prefix . 'display_name', $data)) |
|
| 752 | - ->setSanitizedName($this->get($prefix . 'sanitized_name', $data)) |
|
| 753 | - ->setConfig($this->getInt($prefix . 'config', $data)) |
|
| 754 | - ->setSource($this->getInt($prefix . 'source', $data)) |
|
| 755 | - ->setInstance($this->get($prefix . 'instance', $data)) |
|
| 756 | - ->setSettings($this->getArray($prefix . 'settings', $data)) |
|
| 757 | - ->setContactAddressBook($this->getInt($prefix . 'contact_addressbook', $data)) |
|
| 758 | - ->setContactGroupName($this->get($prefix . 'contact_groupname', $data)) |
|
| 759 | - ->setDescription($this->get($prefix . 'description', $data)); |
|
| 760 | - |
|
| 761 | - $creation = $this->get($prefix . 'creation', $data); |
|
| 749 | + $this->setSingleId($this->get($prefix.'unique_id', $data)) |
|
| 750 | + ->setName($this->get($prefix.'name', $data)) |
|
| 751 | + ->setDisplayName($this->get($prefix.'display_name', $data)) |
|
| 752 | + ->setSanitizedName($this->get($prefix.'sanitized_name', $data)) |
|
| 753 | + ->setConfig($this->getInt($prefix.'config', $data)) |
|
| 754 | + ->setSource($this->getInt($prefix.'source', $data)) |
|
| 755 | + ->setInstance($this->get($prefix.'instance', $data)) |
|
| 756 | + ->setSettings($this->getArray($prefix.'settings', $data)) |
|
| 757 | + ->setContactAddressBook($this->getInt($prefix.'contact_addressbook', $data)) |
|
| 758 | + ->setContactGroupName($this->get($prefix.'contact_groupname', $data)) |
|
| 759 | + ->setDescription($this->get($prefix.'description', $data)); |
|
| 760 | + |
|
| 761 | + $creation = $this->get($prefix.'creation', $data); |
|
| 762 | 762 | $this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp()); |
| 763 | 763 | |
| 764 | 764 | $this->getManager()->manageImportFromDatabase($this, $data, $prefix); |
@@ -96,13 +96,13 @@ discard block |
||
| 96 | 96 | $circle = $event->getCircle(); |
| 97 | 97 | $eventType = ($event->getType() === CircleGenericEvent::INVITED) ? 'invited' : 'joined'; |
| 98 | 98 | |
| 99 | - $info = 'A new member have been added (' . $eventType . ') to a Circle. '; |
|
| 99 | + $info = 'A new member have been added ('.$eventType.') to a Circle. '; |
|
| 100 | 100 | |
| 101 | - $info .= 'userId: ' . $member->getUserId() . '; userType: ' . Member::$TYPE[$member->getUserType( |
|
| 101 | + $info .= 'userId: '.$member->getUserId().'; userType: '.Member::$TYPE[$member->getUserType( |
|
| 102 | 102 | )] |
| 103 | - . '; singleId: ' . $member->getSingleId() . '; memberId: ' . $member->getId() |
|
| 104 | - . '; isLocal: ' . json_encode($member->isLocal()) . '; level: ' |
|
| 105 | - . Member::$DEF_LEVEL[$member->getLevel()] . '; '; |
|
| 103 | + . '; singleId: '.$member->getSingleId().'; memberId: '.$member->getId() |
|
| 104 | + . '; isLocal: '.json_encode($member->isLocal()).'; level: ' |
|
| 105 | + . Member::$DEF_LEVEL[$member->getLevel()].'; '; |
|
| 106 | 106 | |
| 107 | 107 | $memberships = array_map( |
| 108 | 108 | function(Membership $membership) { |
@@ -111,22 +111,22 @@ discard block |
||
| 111 | 111 | ); |
| 112 | 112 | |
| 113 | 113 | $listMemberships = (count($memberships) > 0) ? implode(', ', $memberships) : 'none'; |
| 114 | - $info .= 'circleName: ' . $circle->getDisplayName() . '; circleId: ' . $circle->getSingleId() |
|
| 115 | - . '; Circle memberships: ' . $listMemberships . '.'; |
|
| 114 | + $info .= 'circleName: '.$circle->getDisplayName().'; circleId: '.$circle->getSingleId() |
|
| 115 | + . '; Circle memberships: '.$listMemberships.'.'; |
|
| 116 | 116 | |
| 117 | 117 | if ($member->getUserType() === Member::TYPE_CIRCLE) { |
| 118 | 118 | $basedOn = $member->getBasedOn(); |
| 119 | 119 | $members = array_map( |
| 120 | 120 | function(Member $member) { |
| 121 | - return $member->getUserId() . ' (' . Member::$TYPE[$member->getUserType()] . ')'; |
|
| 121 | + return $member->getUserId().' ('.Member::$TYPE[$member->getUserType()].')'; |
|
| 122 | 122 | }, $basedOn->getInheritedMembers() |
| 123 | 123 | ); |
| 124 | 124 | |
| 125 | - $info .= ' Member is a Circle (singleId: ' . $basedOn->getSingleId() |
|
| 126 | - . ') that contains those inherited members: ' . implode(', ', $members); |
|
| 125 | + $info .= ' Member is a Circle (singleId: '.$basedOn->getSingleId() |
|
| 126 | + . ') that contains those inherited members: '.implode(', ', $members); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | - $this->log(3, $prefix . $info); |
|
| 129 | + $this->log(3, $prefix.$info); |
|
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | |
@@ -169,7 +169,7 @@ |
||
| 169 | 169 | */ |
| 170 | 170 | private function output(string $message): void { |
| 171 | 171 | if (!is_null($this->output)) { |
| 172 | - $this->output->writeln('- ' . $message); |
|
| 172 | + $this->output->writeln('- '.$message); |
|
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | |
@@ -400,15 +400,15 @@ |
||
| 400 | 400 | * @throws FederatedUserNotFoundException |
| 401 | 401 | */ |
| 402 | 402 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
| 403 | - if ($this->get($prefix . 'single_id', $data) === '') { |
|
| 403 | + if ($this->get($prefix.'single_id', $data) === '') { |
|
| 404 | 404 | throw new FederatedUserNotFoundException(); |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | - $this->setSingleId($this->get($prefix . 'single_id', $data)); |
|
| 408 | - $this->setUserId($this->get($prefix . 'user_id', $data)); |
|
| 409 | - $this->setUserType($this->getInt($prefix . 'user_type', $data)); |
|
| 410 | - $this->setDisplayName($this->get($prefix . 'cached_name', $data)); |
|
| 411 | - $this->setInstance($this->get($prefix . 'instance', $data)); |
|
| 407 | + $this->setSingleId($this->get($prefix.'single_id', $data)); |
|
| 408 | + $this->setUserId($this->get($prefix.'user_id', $data)); |
|
| 409 | + $this->setUserType($this->getInt($prefix.'user_type', $data)); |
|
| 410 | + $this->setDisplayName($this->get($prefix.'cached_name', $data)); |
|
| 411 | + $this->setInstance($this->get($prefix.'instance', $data)); |
|
| 412 | 412 | |
| 413 | 413 | $this->getManager()->manageImportFromDatabase($this, $data, $prefix); |
| 414 | 414 | |
@@ -50,11 +50,11 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | use TArrayTools; |
| 52 | 52 | |
| 53 | - const TYPE_UNKNOWN = 'Unknown'; // not trusted |
|
| 54 | - const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle. |
|
| 55 | - const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted if a member belongs to the circle. |
|
| 56 | - const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted. |
|
| 57 | - const TYPE_GLOBALSCALE = 'GlobalScale'; // every Circle is broadcasted, |
|
| 53 | + const TYPE_UNKNOWN = 'Unknown'; // not trusted |
|
| 54 | + const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle. |
|
| 55 | + const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted if a member belongs to the circle. |
|
| 56 | + const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted. |
|
| 57 | + const TYPE_GLOBALSCALE = 'GlobalScale'; // every Circle is broadcasted, |
|
| 58 | 58 | |
| 59 | 59 | public static $LIST_TYPE = [ |
| 60 | 60 | self::TYPE_UNKNOWN, |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | ]; |
| 478 | 478 | |
| 479 | 479 | if ($this->getAuthSigned() !== '') { |
| 480 | - $data['auth-signed'] = $this->getAlgorithm() . ':' . $this->getAuthSigned(); |
|
| 480 | + $data['auth-signed'] = $this->getAlgorithm().':'.$this->getAuthSigned(); |
|
| 481 | 481 | } |
| 482 | 482 | |
| 483 | 483 | if (!empty($this->getAliases())) { |
@@ -496,17 +496,17 @@ discard block |
||
| 496 | 496 | * @throws RemoteNotFoundException |
| 497 | 497 | */ |
| 498 | 498 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
| 499 | - if ($this->getInt($prefix . 'id', $data) === 0) { |
|
| 499 | + if ($this->getInt($prefix.'id', $data) === 0) { |
|
| 500 | 500 | throw new RemoteNotFoundException(); |
| 501 | 501 | } |
| 502 | 502 | |
| 503 | - $this->setDbId($this->getInt($prefix . 'id', $data)); |
|
| 504 | - $this->import($this->getArray($prefix . 'item', $data)); |
|
| 505 | - $this->setOrigData($this->getArray($prefix . 'item', $data)); |
|
| 506 | - $this->setType($this->get($prefix . 'type', $data)); |
|
| 507 | - $this->setInterface($this->getInt($prefix . 'interface', $data)); |
|
| 508 | - $this->setInstance($this->get($prefix . 'instance', $data)); |
|
| 509 | - $this->setId($this->get($prefix . 'href', $data)); |
|
| 503 | + $this->setDbId($this->getInt($prefix.'id', $data)); |
|
| 504 | + $this->import($this->getArray($prefix.'item', $data)); |
|
| 505 | + $this->setOrigData($this->getArray($prefix.'item', $data)); |
|
| 506 | + $this->setType($this->get($prefix.'type', $data)); |
|
| 507 | + $this->setInterface($this->getInt($prefix.'interface', $data)); |
|
| 508 | + $this->setInstance($this->get($prefix.'instance', $data)); |
|
| 509 | + $this->setId($this->get($prefix.'href', $data)); |
|
| 510 | 510 | |
| 511 | 511 | return $this; |
| 512 | 512 | } |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | if ($check) { |
| 395 | 395 | $user = $this->userManager->get($userId); |
| 396 | 396 | if ($user === null) { |
| 397 | - throw new FederatedUserNotFoundException('user ' . $userId . ' not found'); |
|
| 397 | + throw new FederatedUserNotFoundException('user '.$userId.' not found'); |
|
| 398 | 398 | } |
| 399 | 399 | $userId = $user->getUID(); |
| 400 | 400 | $displayName = $user->getDisplayName(); |
@@ -852,7 +852,7 @@ discard block |
||
| 852 | 852 | $prefix = ($federatedUser->getUserType() === Member::TYPE_APP) ? 'app' |
| 853 | 853 | : Member::$TYPE[$federatedUser->getUserType()]; |
| 854 | 854 | |
| 855 | - $circle->setName($prefix . ':' . $federatedUser->getUserId() . ':' . $id) |
|
| 855 | + $circle->setName($prefix.':'.$federatedUser->getUserId().':'.$id) |
|
| 856 | 856 | ->setDisplayName($federatedUser->getDisplayName()) |
| 857 | 857 | ->setSingleId($id) |
| 858 | 858 | ->setSource($source); |
@@ -976,7 +976,7 @@ discard block |
||
| 976 | 976 | $owner = $this->getCurrentApp(); |
| 977 | 977 | |
| 978 | 978 | $circle = new Circle(); |
| 979 | - $circle->setName('group:' . $groupId) |
|
| 979 | + $circle->setName('group:'.$groupId) |
|
| 980 | 980 | ->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN) |
| 981 | 981 | ->setSingleId($this->token(ManagedModel::ID_LENGTH)) |
| 982 | 982 | ->setSource(Member::TYPE_GROUP); |
@@ -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); |
@@ -933,7 +933,7 @@ discard block |
||
| 933 | 933 | |
| 934 | 934 | $expr = $this->expr(); |
| 935 | 935 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); |
| 936 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); |
|
| 936 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); |
|
| 937 | 937 | } |
| 938 | 938 | |
| 939 | 939 | |
@@ -957,7 +957,7 @@ discard block |
||
| 957 | 957 | $this->leftJoin( |
| 958 | 958 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
| 959 | 959 | // $expr->andX( |
| 960 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field) |
|
| 960 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field) |
|
| 961 | 961 | // $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') |
| 962 | 962 | // ) |
| 963 | 963 | ); |
@@ -971,8 +971,8 @@ discard block |
||
| 971 | 971 | ->leftJoin( |
| 972 | 972 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, |
| 973 | 973 | $expr->andX( |
| 974 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), |
|
| 975 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') |
|
| 974 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), |
|
| 975 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') |
|
| 976 | 976 | ) |
| 977 | 977 | ); |
| 978 | 978 | } |
@@ -1038,7 +1038,7 @@ discard block |
||
| 1038 | 1038 | $aliasMembership, |
| 1039 | 1039 | $expr->andX( |
| 1040 | 1040 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasMembership), |
| 1041 | - $expr->eq($aliasMembership . '.circle_id', $helperAlias . '.' . $field) |
|
| 1041 | + $expr->eq($aliasMembership.'.circle_id', $helperAlias.'.'.$field) |
|
| 1042 | 1042 | ) |
| 1043 | 1043 | ); |
| 1044 | 1044 | |
@@ -1051,8 +1051,8 @@ discard block |
||
| 1051 | 1051 | $this->leftJoin( |
| 1052 | 1052 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
| 1053 | 1053 | $expr->andX( |
| 1054 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), |
|
| 1055 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') |
|
| 1054 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), |
|
| 1055 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') |
|
| 1056 | 1056 | ) |
| 1057 | 1057 | ); |
| 1058 | 1058 | |
@@ -1060,8 +1060,8 @@ discard block |
||
| 1060 | 1060 | $this->leftJoin( |
| 1061 | 1061 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
| 1062 | 1062 | $expr->andX( |
| 1063 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), |
|
| 1064 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') |
|
| 1063 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), |
|
| 1064 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') |
|
| 1065 | 1065 | ) |
| 1066 | 1066 | ); |
| 1067 | 1067 | |
@@ -1080,7 +1080,7 @@ discard block |
||
| 1080 | 1080 | $aliasInheritedByMembership = $this->generateAlias($aliasInheritedBy, self::MEMBERSHIPS); |
| 1081 | 1081 | $this->generateMembershipSelectAlias($aliasMembership, $aliasInheritedByMembership); |
| 1082 | 1082 | } catch (RequestBuilderException $e) { |
| 1083 | - \OC::$server->getLogger()->log(3, '-- ' . $e->getMessage()); |
|
| 1083 | + \OC::$server->getLogger()->log(3, '-- '.$e->getMessage()); |
|
| 1084 | 1084 | } |
| 1085 | 1085 | } |
| 1086 | 1086 | |
@@ -1104,7 +1104,7 @@ discard block |
||
| 1104 | 1104 | $orX = $expr->orX(); |
| 1105 | 1105 | $orX->add( |
| 1106 | 1106 | $expr->andX( |
| 1107 | - $expr->gte($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 1107 | + $expr->gte($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 1108 | 1108 | ) |
| 1109 | 1109 | ); |
| 1110 | 1110 | |
@@ -1112,7 +1112,7 @@ discard block |
||
| 1112 | 1112 | $orX->add( |
| 1113 | 1113 | $expr->andX( |
| 1114 | 1114 | $this->exprLimitBitwise('config', Circle::CFG_PERSONAL, $alias), |
| 1115 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
| 1115 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
| 1116 | 1116 | ) |
| 1117 | 1117 | ); |
| 1118 | 1118 | } |
@@ -1121,7 +1121,7 @@ discard block |
||
| 1121 | 1121 | } |
| 1122 | 1122 | if ($this->getBool('canBeVisitor', $options, false)) { |
| 1123 | 1123 | // TODO: should find a better way, also filter on remote initiator on non-federated ? |
| 1124 | - $orX->add($expr->gte($alias . '.config', $this->createNamedParameter(0))); |
|
| 1124 | + $orX->add($expr->gte($alias.'.config', $this->createNamedParameter(0))); |
|
| 1125 | 1125 | } |
| 1126 | 1126 | if ($this->getBool('canBeVisitorOnOpen', $options, false)) { |
| 1127 | 1127 | $andOpen = $expr->andX(); |
@@ -1189,21 +1189,21 @@ discard block |
||
| 1189 | 1189 | $expr = $this->expr(); |
| 1190 | 1190 | $andPassive = $expr->andX(); |
| 1191 | 1191 | $andPassive->add( |
| 1192 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
| 1192 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
| 1193 | 1193 | ); |
| 1194 | 1194 | |
| 1195 | 1195 | $orMemberOrLevel = $expr->orX(); |
| 1196 | 1196 | $orMemberOrLevel->add( |
| 1197 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance') |
|
| 1197 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance') |
|
| 1198 | 1198 | ); |
| 1199 | 1199 | // TODO: do we need this ? (display members from the local instance) |
| 1200 | 1200 | $orMemberOrLevel->add( |
| 1201 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance') |
|
| 1201 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance') |
|
| 1202 | 1202 | ); |
| 1203 | 1203 | |
| 1204 | 1204 | $orMemberOrLevel->add( |
| 1205 | 1205 | $expr->eq( |
| 1206 | - $this->getDefaultSelectAlias() . '.level', |
|
| 1206 | + $this->getDefaultSelectAlias().'.level', |
|
| 1207 | 1207 | $this->createNamedParameter(Member::LEVEL_OWNER) |
| 1208 | 1208 | ) |
| 1209 | 1209 | ); |
@@ -1240,11 +1240,11 @@ discard block |
||
| 1240 | 1240 | ) |
| 1241 | 1241 | ->leftJoin( |
| 1242 | 1242 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, |
| 1243 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') |
|
| 1243 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') |
|
| 1244 | 1244 | ) |
| 1245 | 1245 | ->leftJoin( |
| 1246 | 1246 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, |
| 1247 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') |
|
| 1247 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') |
|
| 1248 | 1248 | ); |
| 1249 | 1249 | } |
| 1250 | 1250 | |
@@ -1266,8 +1266,8 @@ discard block |
||
| 1266 | 1266 | $this->leftJoin( |
| 1267 | 1267 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, |
| 1268 | 1268 | $expr->andX( |
| 1269 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), |
|
| 1270 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') |
|
| 1269 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), |
|
| 1270 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') |
|
| 1271 | 1271 | ) |
| 1272 | 1272 | ); |
| 1273 | 1273 | |
@@ -1317,13 +1317,13 @@ discard block |
||
| 1317 | 1317 | $this->leftJoin( |
| 1318 | 1318 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, |
| 1319 | 1319 | $expr->andX( |
| 1320 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), |
|
| 1321 | - $expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id') |
|
| 1320 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), |
|
| 1321 | + $expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id') |
|
| 1322 | 1322 | ) |
| 1323 | 1323 | ); |
| 1324 | 1324 | |
| 1325 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); |
|
| 1326 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); |
|
| 1325 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); |
|
| 1326 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); |
|
| 1327 | 1327 | } |
| 1328 | 1328 | |
| 1329 | 1329 | |
@@ -1427,10 +1427,10 @@ discard block |
||
| 1427 | 1427 | */ |
| 1428 | 1428 | public function generateAlias(string $base, string $extension, ?array &$options = []): string { |
| 1429 | 1429 | $search = str_replace('_', '.', $base); |
| 1430 | - $path = $search . '.' . $extension; |
|
| 1430 | + $path = $search.'.'.$extension; |
|
| 1431 | 1431 | if (!$this->validKey($path, self::$SQL_PATH) |
| 1432 | 1432 | && !in_array($extension, $this->getArray($search, self::$SQL_PATH))) { |
| 1433 | - throw new RequestBuilderException($extension . ' not found in ' . $search); |
|
| 1433 | + throw new RequestBuilderException($extension.' not found in '.$search); |
|
| 1434 | 1434 | } |
| 1435 | 1435 | |
| 1436 | 1436 | if (!is_array($options)) { |
@@ -1439,15 +1439,15 @@ discard block |
||
| 1439 | 1439 | |
| 1440 | 1440 | $optionPath = ''; |
| 1441 | 1441 | foreach (explode('.', $path) as $p) { |
| 1442 | - $optionPath = trim($optionPath . '.' . $p, '.'); |
|
| 1442 | + $optionPath = trim($optionPath.'.'.$p, '.'); |
|
| 1443 | 1443 | $options = array_merge( |
| 1444 | 1444 | $options, |
| 1445 | - $this->getArray($optionPath . '.' . self::OPTIONS, self::$SQL_PATH), |
|
| 1446 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) |
|
| 1445 | + $this->getArray($optionPath.'.'.self::OPTIONS, self::$SQL_PATH), |
|
| 1446 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) |
|
| 1447 | 1447 | ); |
| 1448 | 1448 | } |
| 1449 | 1449 | |
| 1450 | - return $base . '_' . $extension; |
|
| 1450 | + return $base.'_'.$extension; |
|
| 1451 | 1451 | } |
| 1452 | 1452 | |
| 1453 | 1453 | |
@@ -1467,7 +1467,7 @@ discard block |
||
| 1467 | 1467 | } else { |
| 1468 | 1468 | $k = $arr; |
| 1469 | 1469 | } |
| 1470 | - $path[$k] = $prefix . '_' . $k . '_'; |
|
| 1470 | + $path[$k] = $prefix.'_'.$k.'_'; |
|
| 1471 | 1471 | } |
| 1472 | 1472 | |
| 1473 | 1473 | return $path; |