@@ -87,26 +87,26 @@ discard block |
||
87 | 87 | |
88 | 88 | |
89 | 89 | // specific value |
90 | - public const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
91 | - public const CFG_SINGLE = 1; // Circle with only one single member. |
|
92 | - public const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
90 | + public const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
91 | + public const CFG_SINGLE = 1; // Circle with only one single member. |
|
92 | + public const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
93 | 93 | |
94 | 94 | // bitwise |
95 | - public const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
96 | - public const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
97 | - public const CFG_OPEN = 16; // Circle is open, people can join |
|
98 | - public const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
99 | - public const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
100 | - public const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
101 | - public const CFG_PROTECTED = 256; // Password protected to join/request |
|
102 | - public const CFG_NO_OWNER = 512; // no owner, only members |
|
103 | - public const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
104 | - public const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
105 | - public const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
106 | - public const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
107 | - public const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
108 | - public const CFG_FEDERATED = 32768; // Federated |
|
109 | - public const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
95 | + public const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
96 | + public const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
97 | + public const CFG_OPEN = 16; // Circle is open, people can join |
|
98 | + public const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
99 | + public const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
100 | + public const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
101 | + public const CFG_PROTECTED = 256; // Password protected to join/request |
|
102 | + public const CFG_NO_OWNER = 512; // no owner, only members |
|
103 | + public const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
104 | + public const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
105 | + public const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
106 | + public const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
107 | + public const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
108 | + public const CFG_FEDERATED = 32768; // Federated |
|
109 | + public const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
110 | 110 | |
111 | 111 | public static $DEF_CFG_MAX = 131071; |
112 | 112 | |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | */ |
470 | 470 | public function addInheritedMembers(array $members): self { |
471 | 471 | $knownIds = array_map( |
472 | - function (Member $member): string { |
|
472 | + function(Member $member): string { |
|
473 | 473 | return $member->getId(); |
474 | 474 | }, $this->inheritedMembers |
475 | 475 | ); |
@@ -842,24 +842,24 @@ discard block |
||
842 | 842 | * @throws CircleNotFoundException |
843 | 843 | */ |
844 | 844 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
845 | - if ($this->get($prefix . 'unique_id', $data) === '') { |
|
845 | + if ($this->get($prefix.'unique_id', $data) === '') { |
|
846 | 846 | throw new CircleNotFoundException(); |
847 | 847 | } |
848 | 848 | |
849 | - $this->setSingleId($this->get($prefix . 'unique_id', $data)) |
|
850 | - ->setName($this->get($prefix . 'name', $data)) |
|
851 | - ->setDisplayName($this->get($prefix . 'display_name', $data)) |
|
852 | - ->setSanitizedName($this->get($prefix . 'sanitized_name', $data)) |
|
853 | - ->setConfig($this->getInt($prefix . 'config', $data)) |
|
854 | - ->setSource($this->getInt($prefix . 'source', $data)) |
|
855 | - ->setInstance($this->get($prefix . 'instance', $data)) |
|
856 | - ->setPopulation($this->getInt($prefix . 'population', $data)) |
|
857 | - ->setSettings($this->getArray($prefix . 'settings', $data)) |
|
858 | - ->setContactAddressBook($this->getInt($prefix . 'contact_addressbook', $data)) |
|
859 | - ->setContactGroupName($this->get($prefix . 'contact_groupname', $data)) |
|
860 | - ->setDescription($this->get($prefix . 'description', $data)); |
|
861 | - |
|
862 | - $creation = $this->get($prefix . 'creation', $data); |
|
849 | + $this->setSingleId($this->get($prefix.'unique_id', $data)) |
|
850 | + ->setName($this->get($prefix.'name', $data)) |
|
851 | + ->setDisplayName($this->get($prefix.'display_name', $data)) |
|
852 | + ->setSanitizedName($this->get($prefix.'sanitized_name', $data)) |
|
853 | + ->setConfig($this->getInt($prefix.'config', $data)) |
|
854 | + ->setSource($this->getInt($prefix.'source', $data)) |
|
855 | + ->setInstance($this->get($prefix.'instance', $data)) |
|
856 | + ->setPopulation($this->getInt($prefix.'population', $data)) |
|
857 | + ->setSettings($this->getArray($prefix.'settings', $data)) |
|
858 | + ->setContactAddressBook($this->getInt($prefix.'contact_addressbook', $data)) |
|
859 | + ->setContactGroupName($this->get($prefix.'contact_groupname', $data)) |
|
860 | + ->setDescription($this->get($prefix.'description', $data)); |
|
861 | + |
|
862 | + $creation = $this->get($prefix.'creation', $data); |
|
863 | 863 | $this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp()); |
864 | 864 | |
865 | 865 | $this->getManager()->manageImportFromDatabase($this, $data, $prefix); |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $done = []; |
240 | 240 | foreach ($circles as $circle) { |
241 | 241 | $this->outputService->output( |
242 | - 'Caching memberships for Members of \'' . $circle->getDisplayName() . '\'', |
|
242 | + 'Caching memberships for Members of \''.$circle->getDisplayName().'\'', |
|
243 | 243 | true |
244 | 244 | ); |
245 | 245 | |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | try { |
288 | 288 | $data = new SimpleDataStore($row); |
289 | 289 | $this->outputService->output( |
290 | - 'Migrating Circle \'' . $data->g('name') . '\' (' . $data->g('unique_id') . ')', |
|
290 | + 'Migrating Circle \''.$data->g('name').'\' ('.$data->g('unique_id').')', |
|
291 | 291 | true |
292 | 292 | ); |
293 | 293 | |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | try { |
392 | 392 | $data = new SimpleDataStore($row); |
393 | 393 | $this->outputService->output( |
394 | - 'Migrating Member \'' . $data->g('user_id') . '\' from \'' . $data->g('circle_id') |
|
394 | + 'Migrating Member \''.$data->g('user_id').'\' from \''.$data->g('circle_id') |
|
395 | 395 | . '\'', |
396 | 396 | true |
397 | 397 | ); |
@@ -506,8 +506,8 @@ discard block |
||
506 | 506 | $federatedUser = |
507 | 507 | $this->federatedUserService->getLocalFederatedUser($data->g('share_with')); |
508 | 508 | $this->outputService->output( |
509 | - 'Migrating child share #' . $data->gInt('id') . ' owner: ' . $data->g('share_with') |
|
510 | - . ' -> ' . $federatedUser->getSingleId(), |
|
509 | + 'Migrating child share #'.$data->gInt('id').' owner: '.$data->g('share_with') |
|
510 | + . ' -> '.$federatedUser->getSingleId(), |
|
511 | 511 | true |
512 | 512 | ); |
513 | 513 | |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | $addressBook = |
579 | 579 | $this->contactService->getAddressBoxById($cm, $this->get('addressbook-key', $entry)); |
580 | 580 | |
581 | - $member->setUserId($userId . '/' . $addressBook->getUri() . '/' . $contactId); |
|
581 | + $member->setUserId($userId.'/'.$addressBook->getUri().'/'.$contactId); |
|
582 | 582 | } |
583 | 583 | } |
584 | 584 | |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | try { |
614 | 614 | $data = new SimpleDataStore($row); |
615 | 615 | $this->outputService->output( |
616 | - 'Migrating ShareToken \'' . $data->g('token') . '\' for \'' . $data->g('user_id') |
|
616 | + 'Migrating ShareToken \''.$data->g('token').'\' for \''.$data->g('user_id') |
|
617 | 617 | . '\'', |
618 | 618 | true |
619 | 619 | ); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | */ |
251 | 251 | private function getChildrenMembers(string $id, array &$knownIds = []): array { |
252 | 252 | $singleIds = array_map( |
253 | - function (Member $item): string { |
|
253 | + function(Member $item): string { |
|
254 | 254 | return $item->getSingleId(); |
255 | 255 | }, $this->memberRequest->getMembers($id) |
256 | 256 | ); |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | */ |
275 | 275 | private function getChildrenMemberships(string $id, array &$knownIds = []): array { |
276 | 276 | $singleIds = array_map( |
277 | - function (Membership $item): string { |
|
277 | + function(Membership $item): string { |
|
278 | 278 | return $item->getSingleId(); |
279 | 279 | }, $this->membershipRequest->getInherited($id) |
280 | 280 | ); |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | */ |
321 | 321 | private function removeDeprecatedMemberships(array $memberships, array $known): array { |
322 | 322 | $circleIds = array_map( |
323 | - function (Membership $membership): string { |
|
323 | + function(Membership $membership): string { |
|
324 | 324 | return $membership->getCircleId(); |
325 | 325 | }, $memberships |
326 | 326 | ); |
@@ -212,10 +212,10 @@ discard block |
||
212 | 212 | // return 0; |
213 | 213 | // } |
214 | 214 | |
215 | - $output->writeln('Id: <info>' . $federatedUser->getUserId() . '</info>'); |
|
216 | - $output->writeln('Instance: <info>' . $federatedUser->getInstance() . '</info>'); |
|
217 | - $output->writeln('Type: <info>' . Member::$TYPE[$federatedUser->getUserType()] . '</info>'); |
|
218 | - $output->writeln('SingleId: <info>' . $federatedUser->getSingleId() . '</info>'); |
|
215 | + $output->writeln('Id: <info>'.$federatedUser->getUserId().'</info>'); |
|
216 | + $output->writeln('Instance: <info>'.$federatedUser->getInstance().'</info>'); |
|
217 | + $output->writeln('Type: <info>'.Member::$TYPE[$federatedUser->getUserType()].'</info>'); |
|
218 | + $output->writeln('SingleId: <info>'.$federatedUser->getSingleId().'</info>'); |
|
219 | 219 | |
220 | 220 | $output->writeln(''); |
221 | 221 | $output->writeln('Memberships:'); |
@@ -224,14 +224,14 @@ discard block |
||
224 | 224 | if ($count === 0) { |
225 | 225 | $output->writeln('(database not updated)'); |
226 | 226 | } else { |
227 | - $output->writeln('(' . $count . ' entries generated/updated in the database)'); |
|
227 | + $output->writeln('('.$count.' entries generated/updated in the database)'); |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | foreach ($federatedUser->getMemberships() as $membership) { |
231 | 231 | $this->memberships[$membership->getCircleId()] = $membership; |
232 | 232 | $output->writeln( |
233 | - '- <info>' . $membership->getCircleId() . '</info> (' |
|
234 | - . Member::$DEF_LEVEL[$membership->getLevel()] . ')' |
|
233 | + '- <info>'.$membership->getCircleId().'</info> (' |
|
234 | + . Member::$DEF_LEVEL[$membership->getLevel()].')' |
|
235 | 235 | ); |
236 | 236 | } |
237 | 237 | |
@@ -305,9 +305,9 @@ discard block |
||
305 | 305 | if ($lineNumber === 2) { |
306 | 306 | return ''; |
307 | 307 | } |
308 | - $line .= '<info>' . $federatedUser->getSingleId() . '</info>'; |
|
308 | + $line .= '<info>'.$federatedUser->getSingleId().'</info>'; |
|
309 | 309 | if (!$this->configService->isLocalInstance($federatedUser->getInstance())) { |
310 | - $line .= '@' . $federatedUser->getInstance(); |
|
310 | + $line .= '@'.$federatedUser->getInstance(); |
|
311 | 311 | } |
312 | 312 | |
313 | 313 | return $line; |
@@ -319,28 +319,28 @@ discard block |
||
319 | 319 | $circle = $member->getCircle(); |
320 | 320 | |
321 | 321 | if ($lineNumber === 1) { |
322 | - $line .= '<info>' . $circle->getSingleId() . '</info>'; |
|
322 | + $line .= '<info>'.$circle->getSingleId().'</info>'; |
|
323 | 323 | if (!$this->configService->isLocalInstance($circle->getInstance())) { |
324 | - $line .= '@' . $circle->getInstance(); |
|
324 | + $line .= '@'.$circle->getInstance(); |
|
325 | 325 | } |
326 | - $line .= ' (' . ($this->input->getOption('display-name') ? |
|
327 | - $circle->getDisplayName() : $circle->getName()) . ')'; |
|
328 | - $line .= ' <info>MemberId</info>: ' . $member->getId(); |
|
329 | - $line .= ' <info>Level</info>: ' . Member::$DEF_LEVEL[$member->getLevel()]; |
|
326 | + $line .= ' ('.($this->input->getOption('display-name') ? |
|
327 | + $circle->getDisplayName() : $circle->getName()).')'; |
|
328 | + $line .= ' <info>MemberId</info>: '.$member->getId(); |
|
329 | + $line .= ' <info>Level</info>: '.Member::$DEF_LEVEL[$member->getLevel()]; |
|
330 | 330 | |
331 | 331 | $knownMembership = $this->memberships[$member->getCircleId()]; |
332 | 332 | if ($member->getLevel() !== $knownMembership->getLevel()) { |
333 | - $line .= ' (' . Member::$DEF_LEVEL[$knownMembership->getLevel()] . ')'; |
|
333 | + $line .= ' ('.Member::$DEF_LEVEL[$knownMembership->getLevel()].')'; |
|
334 | 334 | } |
335 | 335 | } |
336 | 336 | if ($lineNumber === 2) { |
337 | 337 | $owner = $circle->getOwner(); |
338 | - $line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance() . ' '; |
|
338 | + $line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance().' '; |
|
339 | 339 | if ($owner->hasBasedOn()) { |
340 | - $line .= '(' . Circle::$DEF_SOURCE[$owner->getBasedOn()->getSource()] . ') '; |
|
340 | + $line .= '('.Circle::$DEF_SOURCE[$owner->getBasedOn()->getSource()].') '; |
|
341 | 341 | } |
342 | 342 | $type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
343 | - $line .= ($type === '') ? '' : '<info>Config</info>: ' . $type; |
|
343 | + $line .= ($type === '') ? '' : '<info>Config</info>: '.$type; |
|
344 | 344 | } |
345 | 345 | |
346 | 346 | return $line; |
@@ -399,6 +399,6 @@ discard block |
||
399 | 399 | ); |
400 | 400 | } |
401 | 401 | |
402 | - $output->writeln($count . ' memberships updated'); |
|
402 | + $output->writeln($count.' memberships updated'); |
|
403 | 403 | } |
404 | 404 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | '<error>WARNING! You are about to delete all data related to the Circles App!</error>' |
118 | 118 | ); |
119 | 119 | $question = new ConfirmationQuestion( |
120 | - '<comment>Do you really want to ' . $action . ' Circles ?</comment> (y/N) ', false, |
|
120 | + '<comment>Do you really want to '.$action.' Circles ?</comment> (y/N) ', false, |
|
121 | 121 | '/^(y|Y)/i' |
122 | 122 | ); |
123 | 123 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $output->writeln('<error>WARNING! This operation is not reversible.</error>'); |
133 | 133 | |
134 | 134 | $question = new Question( |
135 | - '<comment>Please confirm this destructive operation by typing \'' . $action |
|
135 | + '<comment>Please confirm this destructive operation by typing \''.$action |
|
136 | 136 | . '\'</comment>: ', '' |
137 | 137 | ); |
138 | 138 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $this->coreRequestBuilder->uninstall(); |
150 | 150 | } |
151 | 151 | |
152 | - $output->writeln('<info>' . $action . ' done</info>'); |
|
152 | + $output->writeln('<info>'.$action.' done</info>'); |
|
153 | 153 | |
154 | 154 | return 0; |
155 | 155 | } |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | class RemoteInstance extends NC22Signatory implements INC22QueryRow, JsonSerializable { |
47 | 47 | use TArrayTools; |
48 | 48 | |
49 | - public const TYPE_UNKNOWN = 'Unknown'; // not trusted |
|
50 | - public const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle. |
|
51 | - public const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted if a member belongs to the circle. |
|
52 | - public const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted. |
|
53 | - public const TYPE_GLOBALSCALE = 'GlobalScale'; // every Circle is broadcasted, |
|
49 | + public const TYPE_UNKNOWN = 'Unknown'; // not trusted |
|
50 | + public const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle. |
|
51 | + public const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted if a member belongs to the circle. |
|
52 | + public const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted. |
|
53 | + public const TYPE_GLOBALSCALE = 'GlobalScale'; // every Circle is broadcasted, |
|
54 | 54 | |
55 | 55 | public static $LIST_TYPE = [ |
56 | 56 | self::TYPE_UNKNOWN, |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | ]; |
527 | 527 | |
528 | 528 | if ($this->getAuthSigned() !== '') { |
529 | - $data[self::AUTH_SIGNED] = $this->getAlgorithm() . ':' . $this->getAuthSigned(); |
|
529 | + $data[self::AUTH_SIGNED] = $this->getAlgorithm().':'.$this->getAuthSigned(); |
|
530 | 530 | } |
531 | 531 | |
532 | 532 | if (!empty($this->getAliases())) { |
@@ -545,17 +545,17 @@ discard block |
||
545 | 545 | * @throws RemoteNotFoundException |
546 | 546 | */ |
547 | 547 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
548 | - if ($this->getInt($prefix . 'id', $data) === 0) { |
|
548 | + if ($this->getInt($prefix.'id', $data) === 0) { |
|
549 | 549 | throw new RemoteNotFoundException(); |
550 | 550 | } |
551 | 551 | |
552 | - $this->setDbId($this->getInt($prefix . 'id', $data)); |
|
553 | - $this->import($this->getArray($prefix . 'item', $data)); |
|
554 | - $this->setOrigData($this->getArray($prefix . 'item', $data)); |
|
555 | - $this->setType($this->get($prefix . 'type', $data)); |
|
556 | - $this->setInterface($this->getInt($prefix . 'interface', $data)); |
|
557 | - $this->setInstance($this->get($prefix . 'instance', $data)); |
|
558 | - $this->setId($this->get($prefix . 'href', $data)); |
|
552 | + $this->setDbId($this->getInt($prefix.'id', $data)); |
|
553 | + $this->import($this->getArray($prefix.'item', $data)); |
|
554 | + $this->setOrigData($this->getArray($prefix.'item', $data)); |
|
555 | + $this->setType($this->get($prefix.'type', $data)); |
|
556 | + $this->setInterface($this->getInt($prefix.'interface', $data)); |
|
557 | + $this->setInstance($this->get($prefix.'instance', $data)); |
|
558 | + $this->setId($this->get($prefix.'href', $data)); |
|
559 | 559 | |
560 | 560 | return $this; |
561 | 561 | } |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | } |
395 | 395 | |
396 | 396 | if ($circle->getDisplayName() !== '') { |
397 | - $this->searchInDBField('display_name', '%' . $circle->getDisplayName() . '%'); |
|
397 | + $this->searchInDBField('display_name', '%'.$circle->getDisplayName().'%'); |
|
398 | 398 | } |
399 | 399 | if ($circle->getSource() > 0) { |
400 | 400 | $this->limitInt('source', $circle->getSource()); |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | $this->generateRemoteInstanceSelectAlias($aliasRemoteInstance) |
417 | 417 | ->leftJoin( |
418 | 418 | $alias, CoreRequestBuilder::TABLE_REMOTE, $aliasRemoteInstance, |
419 | - $expr->eq($alias . '.instance', $aliasRemoteInstance . '.instance') |
|
419 | + $expr->eq($alias.'.instance', $aliasRemoteInstance.'.instance') |
|
420 | 420 | ); |
421 | 421 | } catch (RequestBuilderException $e) { |
422 | 422 | } |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | $expr = $this->expr(); |
469 | 469 | $this->leftJoin( |
470 | 470 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_REMOTE, $aliasRemote, |
471 | - $expr->eq($aliasRemote . '.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
471 | + $expr->eq($aliasRemote.'.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
472 | 472 | ); |
473 | 473 | } |
474 | 474 | |
@@ -496,12 +496,12 @@ discard block |
||
496 | 496 | $this->leftJoin( |
497 | 497 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteMember, |
498 | 498 | $expr->andX( |
499 | - $expr->eq($aliasRemoteMember . '.circle_id', $aliasCircle . '.unique_id'), |
|
499 | + $expr->eq($aliasRemoteMember.'.circle_id', $aliasCircle.'.unique_id'), |
|
500 | 500 | $expr->eq( |
501 | - $aliasRemoteMember . '.instance', |
|
501 | + $aliasRemoteMember.'.instance', |
|
502 | 502 | $this->createNamedParameter($remoteInstance->getInstance()) |
503 | 503 | ), |
504 | - $expr->gte($aliasRemoteMember . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
504 | + $expr->gte($aliasRemoteMember.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
505 | 505 | ) |
506 | 506 | ); |
507 | 507 | } |
@@ -533,21 +533,21 @@ discard block |
||
533 | 533 | $this->leftJoin( |
534 | 534 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircle, |
535 | 535 | $expr->andX( |
536 | - $expr->eq($aliasRemoteCircle . '.single_id', $aliasCircle . '.unique_id'), |
|
537 | - $expr->emptyString($aliasRemoteCircle . '.instance'), |
|
538 | - $expr->gte($aliasRemoteCircle . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
536 | + $expr->eq($aliasRemoteCircle.'.single_id', $aliasCircle.'.unique_id'), |
|
537 | + $expr->emptyString($aliasRemoteCircle.'.instance'), |
|
538 | + $expr->gte($aliasRemoteCircle.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
539 | 539 | ) |
540 | 540 | ); |
541 | 541 | $this->leftJoin( |
542 | 542 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircleOwner, |
543 | 543 | $expr->andX( |
544 | - $expr->eq($aliasRemoteCircle . '.circle_id', $aliasRemoteCircleOwner . '.circle_id'), |
|
544 | + $expr->eq($aliasRemoteCircle.'.circle_id', $aliasRemoteCircleOwner.'.circle_id'), |
|
545 | 545 | $expr->eq( |
546 | - $aliasRemoteCircleOwner . '.instance', |
|
546 | + $aliasRemoteCircleOwner.'.instance', |
|
547 | 547 | $this->createNamedParameter($remoteInstance->getInstance()) |
548 | 548 | ), |
549 | 549 | $expr->eq( |
550 | - $aliasRemoteCircleOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
550 | + $aliasRemoteCircleOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
551 | 551 | ) |
552 | 552 | ) |
553 | 553 | ); |
@@ -580,16 +580,16 @@ discard block |
||
580 | 580 | $expr = $this->expr(); |
581 | 581 | $orX = $expr->orX(); |
582 | 582 | $orX->add( |
583 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
583 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
584 | 584 | ); |
585 | 585 | |
586 | 586 | $orExtOrPassive = $expr->orX(); |
587 | 587 | $orExtOrPassive->add( |
588 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
588 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
589 | 589 | ); |
590 | 590 | if (!$sensitive) { |
591 | 591 | $orExtOrPassive->add( |
592 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
592 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
593 | 593 | ); |
594 | 594 | } else { |
595 | 595 | if ($this->getDefaultSelectAlias() === CoreQueryBuilder::MEMBER) { |
@@ -598,8 +598,8 @@ discard block |
||
598 | 598 | } |
599 | 599 | |
600 | 600 | $orInstance = $expr->orX(); |
601 | - $orInstance->add($expr->isNotNull($aliasRemoteMember . '.instance')); |
|
602 | - $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner . '.instance')); |
|
601 | + $orInstance->add($expr->isNotNull($aliasRemoteMember.'.instance')); |
|
602 | + $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner.'.instance')); |
|
603 | 603 | |
604 | 604 | $andExternal = $expr->andX(); |
605 | 605 | $andExternal->add($orExtOrPassive); |
@@ -608,13 +608,13 @@ discard block |
||
608 | 608 | $orExtOrTrusted = $expr->orX(); |
609 | 609 | $orExtOrTrusted->add($andExternal); |
610 | 610 | $orExtOrTrusted->add( |
611 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
611 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
612 | 612 | ); |
613 | 613 | |
614 | 614 | $andTrusted = $expr->andX(); |
615 | 615 | $andTrusted->add($orExtOrTrusted); |
616 | 616 | $andTrusted->add($this->exprLimitBitwise('config', Circle::CFG_FEDERATED, $aliasCircle)); |
617 | - $andTrusted->add($expr->emptyString($aliasOwner . '.instance')); |
|
617 | + $andTrusted->add($expr->emptyString($aliasOwner.'.instance')); |
|
618 | 618 | $orX->add($andTrusted); |
619 | 619 | |
620 | 620 | $this->andWhere($orX); |
@@ -641,7 +641,7 @@ discard block |
||
641 | 641 | } |
642 | 642 | $this->innerJoin( |
643 | 643 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
644 | - $expr->eq($aliasMember . '.circle_id', $alias . '.unique_id') |
|
644 | + $expr->eq($aliasMember.'.circle_id', $alias.'.unique_id') |
|
645 | 645 | ); |
646 | 646 | |
647 | 647 | $this->filterDirectMembership($aliasMember, $member); |
@@ -662,30 +662,30 @@ discard block |
||
662 | 662 | |
663 | 663 | if ($member->getUserId() !== '') { |
664 | 664 | $andX->add( |
665 | - $expr->eq($aliasMember . '.user_id', $this->createNamedParameter($member->getUserId())) |
|
665 | + $expr->eq($aliasMember.'.user_id', $this->createNamedParameter($member->getUserId())) |
|
666 | 666 | ); |
667 | 667 | } |
668 | 668 | |
669 | 669 | if ($member->getSingleId() !== '') { |
670 | 670 | $andX->add( |
671 | - $expr->eq($aliasMember . '.single_id', $this->createNamedParameter($member->getSingleId())) |
|
671 | + $expr->eq($aliasMember.'.single_id', $this->createNamedParameter($member->getSingleId())) |
|
672 | 672 | ); |
673 | 673 | } |
674 | 674 | |
675 | 675 | if ($member->getUserType() > 0) { |
676 | 676 | $andX->add( |
677 | - $expr->eq($aliasMember . '.user_type', $this->createNamedParameter($member->getUserType())) |
|
677 | + $expr->eq($aliasMember.'.user_type', $this->createNamedParameter($member->getUserType())) |
|
678 | 678 | ); |
679 | 679 | } |
680 | 680 | |
681 | 681 | $andX->add( |
682 | - $expr->eq($aliasMember . '.instance', $this->createNamedParameter($this->getInstance($member))) |
|
682 | + $expr->eq($aliasMember.'.instance', $this->createNamedParameter($this->getInstance($member))) |
|
683 | 683 | ); |
684 | 684 | |
685 | 685 | if ($member->getLevel() > 0) { |
686 | 686 | $andX->add( |
687 | 687 | $expr->gte( |
688 | - $aliasMember . '.level', |
|
688 | + $aliasMember.'.level', |
|
689 | 689 | $this->createNamedParameter($member->getLevel(), IQueryBuilder::PARAM_INT) |
690 | 690 | ) |
691 | 691 | ); |
@@ -716,12 +716,12 @@ discard block |
||
716 | 716 | |
717 | 717 | $expr = $this->expr(); |
718 | 718 | $this->selectAlias( |
719 | - $this->createFunction('COUNT(`' . $aliasMemberCount . '`.`member_id`)'), |
|
720 | - (($alias !== $this->getDefaultSelectAlias()) ? $alias . '_' : '') . 'population' |
|
719 | + $this->createFunction('COUNT(`'.$aliasMemberCount.'`.`member_id`)'), |
|
720 | + (($alias !== $this->getDefaultSelectAlias()) ? $alias.'_' : '').'population' |
|
721 | 721 | ); |
722 | 722 | $this->leftJoin( |
723 | 723 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMemberCount, |
724 | - $expr->eq($alias . '.unique_id', $aliasMemberCount . '.circle_id') |
|
724 | + $expr->eq($alias.'.unique_id', $aliasMemberCount.'.circle_id') |
|
725 | 725 | ); |
726 | 726 | } |
727 | 727 | |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | $helperAlias, |
758 | 758 | CoreRequestBuilder::TABLE_CIRCLE, |
759 | 759 | $aliasCircle, |
760 | - $expr->eq($aliasCircle . '.unique_id', $helperAlias . '.' . $field) |
|
760 | + $expr->eq($aliasCircle.'.unique_id', $helperAlias.'.'.$field) |
|
761 | 761 | ); |
762 | 762 | |
763 | 763 | if (!is_null($initiator)) { |
@@ -788,7 +788,7 @@ discard block |
||
788 | 788 | $this->generateCircleSelectAlias($aliasInvitedBy) |
789 | 789 | ->leftJoin( |
790 | 790 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasInvitedBy, |
791 | - $expr->eq($aliasMember . '.invited_by', $aliasInvitedBy . '.unique_id') |
|
791 | + $expr->eq($aliasMember.'.invited_by', $aliasInvitedBy.'.unique_id') |
|
792 | 792 | ); |
793 | 793 | |
794 | 794 | $this->leftJoinOwner($aliasInvitedBy); |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | $this->generateCircleSelectAlias($aliasBasedOn) |
820 | 820 | ->leftJoin( |
821 | 821 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasBasedOn, |
822 | - $expr->eq($aliasBasedOn . '.unique_id', $aliasMember . '.single_id') |
|
822 | + $expr->eq($aliasBasedOn.'.unique_id', $aliasMember.'.single_id') |
|
823 | 823 | ); |
824 | 824 | |
825 | 825 | if (!is_null($initiator)) { |
@@ -852,9 +852,9 @@ discard block |
||
852 | 852 | ->leftJoin( |
853 | 853 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
854 | 854 | $expr->andX( |
855 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $field), |
|
855 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$field), |
|
856 | 856 | $expr->eq( |
857 | - $aliasMember . '.level', |
|
857 | + $aliasMember.'.level', |
|
858 | 858 | $this->createNamedParameter(Member::LEVEL_OWNER, self::PARAM_INT) |
859 | 859 | ) |
860 | 860 | ) |
@@ -892,10 +892,10 @@ discard block |
||
892 | 892 | ->leftJoin( |
893 | 893 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
894 | 894 | $expr->andX( |
895 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $fieldCircleId), |
|
896 | - $expr->eq($aliasMember . '.single_id', $alias . '.' . $fieldSingleId), |
|
895 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$fieldCircleId), |
|
896 | + $expr->eq($aliasMember.'.single_id', $alias.'.'.$fieldSingleId), |
|
897 | 897 | $expr->gte( |
898 | - $aliasMember . '.level', |
|
898 | + $aliasMember.'.level', |
|
899 | 899 | $this->createNamedParameter(Member::LEVEL_MEMBER, self::PARAM_INT) |
900 | 900 | ) |
901 | 901 | ) |
@@ -928,7 +928,7 @@ discard block |
||
928 | 928 | |
929 | 929 | $this->leftJoin( |
930 | 930 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
931 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
931 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
932 | 932 | ); |
933 | 933 | |
934 | 934 | // if (!$this->getBool('getData', $options, false)) { |
@@ -942,8 +942,8 @@ discard block |
||
942 | 942 | ->leftJoin( |
943 | 943 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
944 | 944 | $expr->andX( |
945 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id'), |
|
946 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id') |
|
945 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id'), |
|
946 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id') |
|
947 | 947 | ) |
948 | 948 | ); |
949 | 949 | |
@@ -960,12 +960,12 @@ discard block |
||
960 | 960 | $aliasUpstreamMembership = $this->generateAlias($alias, self::UPSTREAM_MEMBERSHIPS, $options); |
961 | 961 | $this->leftJoin( |
962 | 962 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasUpstreamMembership, |
963 | - $expr->eq($aliasUpstreamMembership . '.single_id', $this->createNamedParameter($singleId)) |
|
963 | + $expr->eq($aliasUpstreamMembership.'.single_id', $this->createNamedParameter($singleId)) |
|
964 | 964 | ); |
965 | 965 | |
966 | 966 | $orX = $expr->orX( |
967 | - $expr->eq($aliasUpstreamMembership . '.circle_id', $alias . '.' . $field), |
|
968 | - $expr->eq($alias . '.' . $field, $this->createNamedParameter($singleId)) |
|
967 | + $expr->eq($aliasUpstreamMembership.'.circle_id', $alias.'.'.$field), |
|
968 | + $expr->eq($alias.'.'.$field, $this->createNamedParameter($singleId)) |
|
969 | 969 | ); |
970 | 970 | |
971 | 971 | $this->andWhere($orX); |
@@ -986,11 +986,11 @@ discard block |
||
986 | 986 | |
987 | 987 | $expr = $this->expr(); |
988 | 988 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); |
989 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); |
|
989 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); |
|
990 | 990 | if ($level > 1) { |
991 | 991 | $this->andWhere( |
992 | 992 | $expr->gte( |
993 | - $aliasMembership . '.level', |
|
993 | + $aliasMembership.'.level', |
|
994 | 994 | $this->createNamedParameter($level, IQueryBuilder::PARAM_INT) |
995 | 995 | ) |
996 | 996 | ); |
@@ -1018,8 +1018,8 @@ discard block |
||
1018 | 1018 | $this->leftJoin( |
1019 | 1019 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
1020 | 1020 | $expr->andX( |
1021 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field), |
|
1022 | - $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') |
|
1021 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field), |
|
1022 | + $expr->eq($aliasMembership.'.single_id', $alias.'.single_id') |
|
1023 | 1023 | ) |
1024 | 1024 | ); |
1025 | 1025 | |
@@ -1032,8 +1032,8 @@ discard block |
||
1032 | 1032 | ->leftJoin( |
1033 | 1033 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, |
1034 | 1034 | $expr->andX( |
1035 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), |
|
1036 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') |
|
1035 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), |
|
1036 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') |
|
1037 | 1037 | ) |
1038 | 1038 | ); |
1039 | 1039 | } |
@@ -1066,7 +1066,7 @@ discard block |
||
1066 | 1066 | |
1067 | 1067 | $this->leftJoin( |
1068 | 1068 | $alias, CoreRequestBuilder::TABLE_TOKEN, $aliasShareToken, |
1069 | - $expr->eq($aliasShareToken . '.share_id', $alias . '.' . $field) |
|
1069 | + $expr->eq($aliasShareToken.'.share_id', $alias.'.'.$field) |
|
1070 | 1070 | ); |
1071 | 1071 | } |
1072 | 1072 | |
@@ -1108,14 +1108,14 @@ discard block |
||
1108 | 1108 | try { |
1109 | 1109 | $aliasConfig = $this->generateAlias($alias, self::CONFIG, $options); |
1110 | 1110 | $this->selectAlias( |
1111 | - $aliasConfig . '.config', |
|
1112 | - (($alias !== $this->getDefaultSelectAlias()) ? $alias . '_' : '') . 'circle_config' |
|
1111 | + $aliasConfig.'.config', |
|
1112 | + (($alias !== $this->getDefaultSelectAlias()) ? $alias.'_' : '').'circle_config' |
|
1113 | 1113 | ); |
1114 | 1114 | $this->leftJoin( |
1115 | 1115 | $alias, |
1116 | 1116 | CoreRequestBuilder::TABLE_CIRCLE, |
1117 | 1117 | $aliasConfig, |
1118 | - $expr->eq($alias . '.circle_id', $aliasConfig . '.unique_id') |
|
1118 | + $expr->eq($alias.'.circle_id', $aliasConfig.'.unique_id') |
|
1119 | 1119 | ); |
1120 | 1120 | } catch (RequestBuilderException $e) { |
1121 | 1121 | } |
@@ -1153,7 +1153,7 @@ discard block |
||
1153 | 1153 | $aliasMembership, |
1154 | 1154 | $expr->andX( |
1155 | 1155 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasMembership), |
1156 | - $expr->eq($aliasMembership . '.circle_id', $helperAlias . '.' . $field) |
|
1156 | + $expr->eq($aliasMembership.'.circle_id', $helperAlias.'.'.$field) |
|
1157 | 1157 | ) |
1158 | 1158 | ); |
1159 | 1159 | |
@@ -1172,11 +1172,11 @@ discard block |
||
1172 | 1172 | $aliasMembershipCircle = $this->generateAlias($aliasMembership, self::CONFIG, $options); |
1173 | 1173 | $orXMembershipCircle = $expr->orX(); |
1174 | 1174 | array_map( |
1175 | - function (string $alias) use ($orXMembershipCircle, $aliasMembershipCircle) { |
|
1175 | + function(string $alias) use ($orXMembershipCircle, $aliasMembershipCircle) { |
|
1176 | 1176 | $orXMembershipCircle->add( |
1177 | 1177 | $this->expr()->eq( |
1178 | - $alias . '.circle_id', |
|
1179 | - $aliasMembershipCircle . '.unique_id' |
|
1178 | + $alias.'.circle_id', |
|
1179 | + $aliasMembershipCircle.'.unique_id' |
|
1180 | 1180 | ) |
1181 | 1181 | ); |
1182 | 1182 | }, |
@@ -1208,7 +1208,7 @@ discard block |
||
1208 | 1208 | $aliasDirectInitiator, |
1209 | 1209 | $expr->andX( |
1210 | 1210 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasDirectInitiator), |
1211 | - $expr->eq($aliasDirectInitiator . '.circle_id', $helperAlias . '.' . $field) |
|
1211 | + $expr->eq($aliasDirectInitiator.'.circle_id', $helperAlias.'.'.$field) |
|
1212 | 1212 | ) |
1213 | 1213 | ); |
1214 | 1214 | } catch (RequestBuilderException $e) { |
@@ -1222,8 +1222,8 @@ discard block |
||
1222 | 1222 | $this->leftJoin( |
1223 | 1223 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
1224 | 1224 | $expr->andX( |
1225 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), |
|
1226 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') |
|
1225 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), |
|
1226 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') |
|
1227 | 1227 | ) |
1228 | 1228 | ); |
1229 | 1229 | |
@@ -1231,8 +1231,8 @@ discard block |
||
1231 | 1231 | $this->leftJoin( |
1232 | 1232 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
1233 | 1233 | $expr->andX( |
1234 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), |
|
1235 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') |
|
1234 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), |
|
1235 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') |
|
1236 | 1236 | ) |
1237 | 1237 | ); |
1238 | 1238 | |
@@ -1283,7 +1283,7 @@ discard block |
||
1283 | 1283 | $orX->add( |
1284 | 1284 | $expr->andX( |
1285 | 1285 | $this->exprLimitBitwise('config', Circle::CFG_PERSONAL, $aliasMembershipCircle), |
1286 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1286 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1287 | 1287 | ) |
1288 | 1288 | ); |
1289 | 1289 | } |
@@ -1293,10 +1293,10 @@ discard block |
||
1293 | 1293 | $orXLevelCheck = $expr->orX(); |
1294 | 1294 | |
1295 | 1295 | array_map( |
1296 | - function (string $alias) use ($orXLevelCheck, $minimumLevel) { |
|
1296 | + function(string $alias) use ($orXLevelCheck, $minimumLevel) { |
|
1297 | 1297 | $orXLevelCheck->add( |
1298 | 1298 | $this->expr()->gte( |
1299 | - $alias . '.level', |
|
1299 | + $alias.'.level', |
|
1300 | 1300 | $this->createNamedParameter($minimumLevel) |
1301 | 1301 | ) |
1302 | 1302 | ); |
@@ -1382,21 +1382,21 @@ discard block |
||
1382 | 1382 | $expr = $this->expr(); |
1383 | 1383 | $andPassive = $expr->andX(); |
1384 | 1384 | $andPassive->add( |
1385 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1385 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1386 | 1386 | ); |
1387 | 1387 | |
1388 | 1388 | $orMemberOrLevel = $expr->orX(); |
1389 | 1389 | $orMemberOrLevel->add( |
1390 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance') |
|
1390 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance') |
|
1391 | 1391 | ); |
1392 | 1392 | // TODO: do we need this ? (display members from the local instance) |
1393 | 1393 | $orMemberOrLevel->add( |
1394 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance') |
|
1394 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance') |
|
1395 | 1395 | ); |
1396 | 1396 | |
1397 | 1397 | $orMemberOrLevel->add( |
1398 | 1398 | $expr->eq( |
1399 | - $this->getDefaultSelectAlias() . '.level', |
|
1399 | + $this->getDefaultSelectAlias().'.level', |
|
1400 | 1400 | $this->createNamedParameter(Member::LEVEL_OWNER) |
1401 | 1401 | ) |
1402 | 1402 | ); |
@@ -1433,11 +1433,11 @@ discard block |
||
1433 | 1433 | ) |
1434 | 1434 | ->leftJoin( |
1435 | 1435 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, |
1436 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') |
|
1436 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') |
|
1437 | 1437 | ) |
1438 | 1438 | ->leftJoin( |
1439 | 1439 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, |
1440 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') |
|
1440 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') |
|
1441 | 1441 | ); |
1442 | 1442 | } |
1443 | 1443 | |
@@ -1459,8 +1459,8 @@ discard block |
||
1459 | 1459 | $this->leftJoin( |
1460 | 1460 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, |
1461 | 1461 | $expr->andX( |
1462 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), |
|
1463 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') |
|
1462 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), |
|
1463 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') |
|
1464 | 1464 | ) |
1465 | 1465 | ); |
1466 | 1466 | |
@@ -1510,13 +1510,13 @@ discard block |
||
1510 | 1510 | $this->leftJoin( |
1511 | 1511 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, |
1512 | 1512 | $expr->andX( |
1513 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), |
|
1514 | - $expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id') |
|
1513 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), |
|
1514 | + $expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id') |
|
1515 | 1515 | ) |
1516 | 1516 | ); |
1517 | 1517 | |
1518 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); |
|
1519 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); |
|
1518 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); |
|
1519 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); |
|
1520 | 1520 | } |
1521 | 1521 | |
1522 | 1522 | |
@@ -1620,10 +1620,10 @@ discard block |
||
1620 | 1620 | */ |
1621 | 1621 | public function generateAlias(string $base, string $extension, ?array &$options = []): string { |
1622 | 1622 | $search = str_replace('_', '.', $base); |
1623 | - $path = $search . '.' . $extension; |
|
1623 | + $path = $search.'.'.$extension; |
|
1624 | 1624 | if (!$this->validKey($path, self::$SQL_PATH) |
1625 | 1625 | && !in_array($extension, $this->getArray($search, self::$SQL_PATH))) { |
1626 | - throw new RequestBuilderException($extension . ' not found in ' . $search); |
|
1626 | + throw new RequestBuilderException($extension.' not found in '.$search); |
|
1627 | 1627 | } |
1628 | 1628 | |
1629 | 1629 | if (!is_array($options)) { |
@@ -1632,15 +1632,15 @@ discard block |
||
1632 | 1632 | |
1633 | 1633 | $optionPath = ''; |
1634 | 1634 | foreach (explode('.', $path) as $p) { |
1635 | - $optionPath = trim($optionPath . '.' . $p, '.'); |
|
1635 | + $optionPath = trim($optionPath.'.'.$p, '.'); |
|
1636 | 1636 | $options = array_merge( |
1637 | 1637 | $options, |
1638 | - $this->getArray($optionPath . '.' . self::OPTIONS, self::$SQL_PATH), |
|
1639 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) |
|
1638 | + $this->getArray($optionPath.'.'.self::OPTIONS, self::$SQL_PATH), |
|
1639 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) |
|
1640 | 1640 | ); |
1641 | 1641 | } |
1642 | 1642 | |
1643 | - return $base . '_' . $extension; |
|
1643 | + return $base.'_'.$extension; |
|
1644 | 1644 | } |
1645 | 1645 | |
1646 | 1646 | |
@@ -1660,7 +1660,7 @@ discard block |
||
1660 | 1660 | } else { |
1661 | 1661 | $k = $arr; |
1662 | 1662 | } |
1663 | - $path[$k] = $prefix . '_' . $k . '_'; |
|
1663 | + $path[$k] = $prefix.'_'.$k.'_'; |
|
1664 | 1664 | } |
1665 | 1665 | |
1666 | 1666 | return $path; |
@@ -81,7 +81,7 @@ |
||
81 | 81 | ->generateGroupBy(self::$tables[self::TABLE_CIRCLE], $alias); |
82 | 82 | |
83 | 83 | if (!$single) { |
84 | - $qb->orderBy($alias . '.creation', 'asc'); |
|
84 | + $qb->orderBy($alias.'.creation', 'asc'); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | return $qb; |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | if ($check) { |
479 | 479 | $user = $this->userManager->get($userId); |
480 | 480 | if ($user === null) { |
481 | - throw new FederatedUserNotFoundException('user ' . $userId . ' not found'); |
|
481 | + throw new FederatedUserNotFoundException('user '.$userId.' not found'); |
|
482 | 482 | } |
483 | 483 | $userId = $user->getUID(); |
484 | 484 | $displayName = $user->getDisplayName(); |
@@ -953,7 +953,7 @@ discard block |
||
953 | 953 | $prefix = ($federatedUser->getUserType() === Member::TYPE_APP) ? 'app' |
954 | 954 | : Member::$TYPE[$federatedUser->getUserType()]; |
955 | 955 | |
956 | - $circle->setName($prefix . ':' . $federatedUser->getUserId() . ':' . $id) |
|
956 | + $circle->setName($prefix.':'.$federatedUser->getUserId().':'.$id) |
|
957 | 957 | ->setDisplayName($federatedUser->getDisplayName()) |
958 | 958 | ->setSingleId($id) |
959 | 959 | ->setSource($source); |
@@ -1157,7 +1157,7 @@ discard block |
||
1157 | 1157 | $owner = $this->getCurrentApp(); |
1158 | 1158 | |
1159 | 1159 | $circle = new Circle(); |
1160 | - $circle->setName('group:' . $groupId) |
|
1160 | + $circle->setName('group:'.$groupId) |
|
1161 | 1161 | ->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN) |
1162 | 1162 | ->setSingleId($this->token(ManagedModel::ID_LENGTH)) |
1163 | 1163 | ->setSource(Member::TYPE_GROUP); |
@@ -1223,8 +1223,8 @@ discard block |
||
1223 | 1223 | * @return string |
1224 | 1224 | */ |
1225 | 1225 | private function generateCacheKey(FederatedUser $federatedUser): string { |
1226 | - return $federatedUser->getInstance() . '#' |
|
1227 | - . $federatedUser->getUserType() . '#' |
|
1226 | + return $federatedUser->getInstance().'#' |
|
1227 | + . $federatedUser->getUserType().'#' |
|
1228 | 1228 | . $federatedUser->getUserId(); |
1229 | 1229 | } |
1230 | 1230 | } |