@@ -192,10 +192,10 @@ discard block |
||
| 192 | 192 | // return 0; |
| 193 | 193 | // } |
| 194 | 194 | |
| 195 | - $output->writeln('Id: <info>' . $federatedUser->getUserId() . '</info>'); |
|
| 196 | - $output->writeln('Instance: <info>' . $federatedUser->getInstance() . '</info>'); |
|
| 197 | - $output->writeln('Type: <info>' . Member::$TYPE[$federatedUser->getUserType()] . '</info>'); |
|
| 198 | - $output->writeln('SingleId: <info>' . $federatedUser->getSingleId() . '</info>'); |
|
| 195 | + $output->writeln('Id: <info>'.$federatedUser->getUserId().'</info>'); |
|
| 196 | + $output->writeln('Instance: <info>'.$federatedUser->getInstance().'</info>'); |
|
| 197 | + $output->writeln('Type: <info>'.Member::$TYPE[$federatedUser->getUserType()].'</info>'); |
|
| 198 | + $output->writeln('SingleId: <info>'.$federatedUser->getSingleId().'</info>'); |
|
| 199 | 199 | |
| 200 | 200 | $output->writeln(''); |
| 201 | 201 | $output->writeln('Memberships:'); |
@@ -204,14 +204,14 @@ discard block |
||
| 204 | 204 | if ($count === 0) { |
| 205 | 205 | $output->writeln('(database not updated)'); |
| 206 | 206 | } else { |
| 207 | - $output->writeln('(' . ((string)$count) . ' entries generated/updated in the database)'); |
|
| 207 | + $output->writeln('('.((string)$count).' entries generated/updated in the database)'); |
|
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | foreach ($federatedUser->getMemberships() as $membership) { |
| 211 | 211 | $this->memberships[$membership->getCircleId()] = $membership; |
| 212 | 212 | $output->writeln( |
| 213 | - '- <info>' . $membership->getCircleId() . '</info> (' |
|
| 214 | - . Member::$DEF_LEVEL[$membership->getLevel()] . ')' |
|
| 213 | + '- <info>'.$membership->getCircleId().'</info> (' |
|
| 214 | + . Member::$DEF_LEVEL[$membership->getLevel()].')' |
|
| 215 | 215 | ); |
| 216 | 216 | } |
| 217 | 217 | |
@@ -285,9 +285,9 @@ discard block |
||
| 285 | 285 | if ($lineNumber === 2) { |
| 286 | 286 | return ''; |
| 287 | 287 | } |
| 288 | - $line .= '<info>' . $federatedUser->getSingleId() . '</info>'; |
|
| 288 | + $line .= '<info>'.$federatedUser->getSingleId().'</info>'; |
|
| 289 | 289 | if (!$this->configService->isLocalInstance($federatedUser->getInstance())) { |
| 290 | - $line .= '@' . $federatedUser->getInstance(); |
|
| 290 | + $line .= '@'.$federatedUser->getInstance(); |
|
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | return $line; |
@@ -299,33 +299,33 @@ discard block |
||
| 299 | 299 | $circle = $member->getCircle(); |
| 300 | 300 | |
| 301 | 301 | if ($lineNumber === 1) { |
| 302 | - $line .= '<info>' . $circle->getSingleId() . '</info>'; |
|
| 302 | + $line .= '<info>'.$circle->getSingleId().'</info>'; |
|
| 303 | 303 | if (!$this->configService->isLocalInstance($circle->getInstance())) { |
| 304 | - $line .= '@' . $circle->getInstance(); |
|
| 304 | + $line .= '@'.$circle->getInstance(); |
|
| 305 | 305 | } |
| 306 | - $line .= ' (' . ($this->input->getOption('display-name') ? |
|
| 307 | - $circle->getDisplayName() : $circle->getName()) . ')'; |
|
| 308 | - $line .= ' <info>MemberId</info>: ' . $member->getId(); |
|
| 309 | - $line .= ' <info>Level</info>: ' . Member::$DEF_LEVEL[$member->getLevel()]; |
|
| 306 | + $line .= ' ('.($this->input->getOption('display-name') ? |
|
| 307 | + $circle->getDisplayName() : $circle->getName()).')'; |
|
| 308 | + $line .= ' <info>MemberId</info>: '.$member->getId(); |
|
| 309 | + $line .= ' <info>Level</info>: '.Member::$DEF_LEVEL[$member->getLevel()]; |
|
| 310 | 310 | |
| 311 | 311 | $knownMembership = $this->memberships[$member->getCircleId()]; |
| 312 | 312 | if ($member->getLevel() !== $knownMembership->getLevel()) { |
| 313 | - $line .= ' (' . Member::$DEF_LEVEL[$knownMembership->getLevel()] . ')'; |
|
| 313 | + $line .= ' ('.Member::$DEF_LEVEL[$knownMembership->getLevel()].')'; |
|
| 314 | 314 | } |
| 315 | 315 | } |
| 316 | 316 | if ($lineNumber === 2) { |
| 317 | 317 | $owner = $circle->getOwner(); |
| 318 | - $line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance() . ' '; |
|
| 318 | + $line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance().' '; |
|
| 319 | 319 | if ($owner->hasBasedOn()) { |
| 320 | - $line .= '(' . Circle::$DEF_SOURCE[$owner->getBasedOn()->getSource()] . ') '; |
|
| 320 | + $line .= '('.Circle::$DEF_SOURCE[$owner->getBasedOn()->getSource()].') '; |
|
| 321 | 321 | } |
| 322 | 322 | $type = implode(', ', Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
| 323 | - $line .= ($type === '') ? '' : '<info>Config</info>: ' . $type; |
|
| 323 | + $line .= ($type === '') ? '' : '<info>Config</info>: '.$type; |
|
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | return $line; |
| 327 | 327 | } |
| 328 | - } catch (InvalidItemException|ItemNotFoundException|UnknownTypeException $e) { |
|
| 328 | + } catch (InvalidItemException | ItemNotFoundException | UnknownTypeException $e) { |
|
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | return ''; |
@@ -380,6 +380,6 @@ discard block |
||
| 380 | 380 | $table->setRows($rows); |
| 381 | 381 | $table->render(); |
| 382 | 382 | |
| 383 | - $output->writeln(((string)$count) . ' memberships updated'); |
|
| 383 | + $output->writeln(((string)$count).' memberships updated'); |
|
| 384 | 384 | } |
| 385 | 385 | } |
@@ -14,10 +14,10 @@ |
||
| 14 | 14 | define('PHPUNIT_RUN', 1); |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | -require_once __DIR__ . '/../../../lib/base.php'; |
|
| 18 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
| 17 | +require_once __DIR__.'/../../../lib/base.php'; |
|
| 18 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
| 19 | 19 | |
| 20 | -require_once __DIR__ . '/../../../tests/autoload.php'; |
|
| 20 | +require_once __DIR__.'/../../../tests/autoload.php'; |
|
| 21 | 21 | |
| 22 | 22 | Server::get(IAppManager::class)->loadApp('circles'); |
| 23 | 23 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | '<error>WARNING! You are about to delete all data related to the Circles App!</error>' |
| 107 | 107 | ); |
| 108 | 108 | $question = new ConfirmationQuestion( |
| 109 | - '<comment>Do you really want to ' . $action . ' Circles ?</comment> (y/N) ', false, |
|
| 109 | + '<comment>Do you really want to '.$action.' Circles ?</comment> (y/N) ', false, |
|
| 110 | 110 | '/^(y|Y)/i' |
| 111 | 111 | ); |
| 112 | 112 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $output->writeln('<error>WARNING! This operation is not reversible.</error>'); |
| 123 | 123 | |
| 124 | 124 | $question = new Question( |
| 125 | - '<comment>Please confirm this destructive operation by typing \'' . $action |
|
| 125 | + '<comment>Please confirm this destructive operation by typing \''.$action |
|
| 126 | 126 | . '\'</comment>: ', '' |
| 127 | 127 | ); |
| 128 | 128 | |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | $this->coreRequestBuilder->uninstall(); |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | - $output->writeln('<info>' . $action . ' done</info>'); |
|
| 143 | + $output->writeln('<info>'.$action.' done</info>'); |
|
| 144 | 144 | |
| 145 | 145 | return 0; |
| 146 | 146 | } |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | $this->maintenanceService->runMaintenance($i, $input->getOption('force-refresh')); |
| 154 | 154 | } catch (MaintenanceException $e) { |
| 155 | 155 | $this->logger->warning('issue while performing maintenance', ['level' => $i, ['exception' => $e]]); |
| 156 | - $output->writeln('- <error>issue while performing maintenance</error> ' . $e->getMessage() . ' (more details in logs)'); |
|
| 156 | + $output->writeln('- <error>issue while performing maintenance</error> '.$e->getMessage().' (more details in logs)'); |
|
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | $federatedUser = $this->federatedUserService->getLocalFederatedUser($userId); |
| 174 | 174 | $displayName = $this->maintenanceService->updateDisplayName($federatedUser); |
| 175 | 175 | if ($displayName !== '') { |
| 176 | - $output->writeln('Display name of ' . $federatedUser->getSingleId() . ' updated to ' . $displayName); |
|
| 176 | + $output->writeln('Display name of '.$federatedUser->getSingleId().' updated to '.$displayName); |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | return 0; |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | try { |
| 189 | 189 | $this->refreshSingleDisplayName($row['uid'], $output); |
| 190 | 190 | } catch (Exception $e) { |
| 191 | - $output->writeln(get_class($e) . ' while trying to update display name of ' . $row['uid']); |
|
| 191 | + $output->writeln(get_class($e).' while trying to update display name of '.$row['uid']); |
|
| 192 | 192 | } |
| 193 | 193 | } |
| 194 | 194 | } |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | try { |
| 202 | 202 | $this->refreshSingleDisplayName($user['name'], $output); |
| 203 | 203 | } catch (Exception $e) { |
| 204 | - $output->writeln(get_class($e) . ' while trying to update display name of ' . $user['name']); |
|
| 204 | + $output->writeln(get_class($e).' while trying to update display name of '.$user['name']); |
|
| 205 | 205 | } |
| 206 | 206 | } |
| 207 | 207 | } |
@@ -197,8 +197,8 @@ discard block |
||
| 197 | 197 | throw new SignatureException('missing elements in \'headers\''); |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | - $target = strtolower($request->getMethod()) . ' ' . urldecode($request->getRequestUri()); |
|
| 201 | - $estimated = ['(request-target): ' . $target]; |
|
| 200 | + $target = strtolower($request->getMethod()).' '.urldecode($request->getRequestUri()); |
|
| 201 | + $estimated = ['(request-target): '.$target]; |
|
| 202 | 202 | |
| 203 | 203 | foreach ($headers as $key) { |
| 204 | 204 | $value = $request->getHeader($key); |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | throw new SignatureException('empty elements in \'headers\''); |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | - $estimated[] = $key . ': ' . $value; |
|
| 212 | + $estimated[] = $key.': '.$value; |
|
| 213 | 213 | } |
| 214 | 214 | $signedRequest->setClearSignature(implode("\n", $estimated)); |
| 215 | 215 | } |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | $request = $signedRequest->getOutgoingRequest(); |
| 282 | 282 | |
| 283 | 283 | $data = new SimpleDataStore(); |
| 284 | - $data->s('(request-target)', NCRequest::method($request->getType()) . ' ' . $request->getPath()) |
|
| 284 | + $data->s('(request-target)', NCRequest::method($request->getType()).' '.$request->getPath()) |
|
| 285 | 285 | ->sInt('content-length', strlen($signedRequest->getBody())) |
| 286 | 286 | ->s('date', gmdate($this->dateHeader)) |
| 287 | 287 | ->s('digest', $signedRequest->getDigest()) |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | foreach ($data->keys() as $element) { |
| 301 | 301 | try { |
| 302 | 302 | $value = $data->gItem($element); |
| 303 | - $signing[] = $element . ': ' . $value; |
|
| 303 | + $signing[] = $element.': '.$value; |
|
| 304 | 304 | if ($element !== '(request-target)') { |
| 305 | 305 | $signedRequest->getOutgoingRequest()->addHeader($element, $value); |
| 306 | 306 | } |
@@ -333,10 +333,10 @@ discard block |
||
| 333 | 333 | $headers = array_diff($signedRequest->getSignatureHeader()->keys(), ['(request-target)']); |
| 334 | 334 | $signatory = $signedRequest->getSignatory(); |
| 335 | 335 | $signatureElements = [ |
| 336 | - 'keyId="' . $signatory->getKeyId() . '"', |
|
| 337 | - 'algorithm="' . $this->getChosenEncryption($signatory) . '"', |
|
| 338 | - 'headers="' . implode(' ', $headers) . '"', |
|
| 339 | - 'signature="' . $signedRequest->getSignedSignature() . '"' |
|
| 336 | + 'keyId="'.$signatory->getKeyId().'"', |
|
| 337 | + 'algorithm="'.$this->getChosenEncryption($signatory).'"', |
|
| 338 | + 'headers="'.implode(' ', $headers).'"', |
|
| 339 | + 'signature="'.$signedRequest->getSignedSignature().'"' |
|
| 340 | 340 | ]; |
| 341 | 341 | |
| 342 | 342 | $signedRequest->getOutgoingRequest()->addHeader('Signature', implode(',', $signatureElements)); |
@@ -267,7 +267,7 @@ |
||
| 267 | 267 | // also the default footer contains a "Do not reply" which needs to be adjusted. |
| 268 | 268 | if ($initiatorEmail !== null) { |
| 269 | 269 | $message->setReplyTo([$initiatorEmail => $initiatorDisplayName]); |
| 270 | - $emailTemplate->addFooter($instanceName . ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : '')); |
|
| 270 | + $emailTemplate->addFooter($instanceName.($this->defaults->getSlogan() !== '' ? ' - '.$this->defaults->getSlogan() : '')); |
|
| 271 | 271 | } else { |
| 272 | 272 | $emailTemplate->addFooter(); |
| 273 | 273 | } |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | ); |
| 101 | 101 | $resources = $resourceService->getAllTeamResources($circle->getSingleId()); |
| 102 | 102 | } catch (\Exception $e) { |
| 103 | - $this->logger->warning('Failed to fetch resources for circle ' . $circle->getSingleId() . ': ' . $e->getMessage()); |
|
| 103 | + $this->logger->warning('Failed to fetch resources for circle '.$circle->getSingleId().': '.$e->getMessage()); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | $teams[] = [ |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | ]; |
| 58 | 58 | |
| 59 | 59 | } catch (\Exception $e) { |
| 60 | - $this->logger->warning('Failed to process team resource: ' . $e->getMessage()); |
|
| 60 | + $this->logger->warning('Failed to process team resource: '.$e->getMessage()); |
|
| 61 | 61 | continue; |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | return $resources; |
| 66 | 66 | |
| 67 | 67 | } catch (\Exception $e) { |
| 68 | - $this->logger->error('Failed to fetch team resources: ' . $e->getMessage()); |
|
| 68 | + $this->logger->error('Failed to fetch team resources: '.$e->getMessage()); |
|
| 69 | 69 | return []; |
| 70 | 70 | } |
| 71 | 71 | } |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | $l10n = Server::get(IFactory::class)->get('circles'); |
| 468 | 468 | $display = $l10n->t('%s (Team owned by %s)', [$display, $circle->getOwner()->getDisplayName()]); |
| 469 | 469 | } else { |
| 470 | - $display .= ' (' . Circle::$DEF_SOURCE[$circle->getSource()] . ')'; |
|
| 470 | + $display .= ' ('.Circle::$DEF_SOURCE[$circle->getSource()].')'; |
|
| 471 | 471 | } |
| 472 | 472 | |
| 473 | 473 | $share->setSharedWithDisplayName($display); |
@@ -560,25 +560,25 @@ discard block |
||
| 560 | 560 | |
| 561 | 561 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
| 562 | 562 | $shareTime = new DateTime(); |
| 563 | - $shareTime->setTimestamp($this->getInt($prefix . 'stime', $data)); |
|
| 564 | - |
|
| 565 | - $this->setId($this->get($prefix . 'id', $data)) |
|
| 566 | - ->setShareType($this->getInt($prefix . 'share_type', $data)) |
|
| 567 | - ->setPermissions($this->getInt($prefix . 'permissions', $data)) |
|
| 568 | - ->setItemType($this->get($prefix . 'item_type', $data)) |
|
| 569 | - ->setItemSource($this->getInt($prefix . 'item_source', $data)) |
|
| 570 | - ->setItemTarget($this->get($prefix . 'item_target', $data)) |
|
| 571 | - ->setFileSource($this->getInt($prefix . 'file_source', $data)) |
|
| 572 | - ->setFileTarget($this->get($prefix . 'file_target', $data)) |
|
| 573 | - ->setSharedWith($this->get($prefix . 'share_with', $data)) |
|
| 574 | - ->setSharedBy($this->get($prefix . 'uid_initiator', $data)) |
|
| 575 | - ->setShareOwner($this->get($prefix . 'uid_owner', $data)) |
|
| 576 | - ->setToken($this->get($prefix . 'token', $data)) |
|
| 563 | + $shareTime->setTimestamp($this->getInt($prefix.'stime', $data)); |
|
| 564 | + |
|
| 565 | + $this->setId($this->get($prefix.'id', $data)) |
|
| 566 | + ->setShareType($this->getInt($prefix.'share_type', $data)) |
|
| 567 | + ->setPermissions($this->getInt($prefix.'permissions', $data)) |
|
| 568 | + ->setItemType($this->get($prefix.'item_type', $data)) |
|
| 569 | + ->setItemSource($this->getInt($prefix.'item_source', $data)) |
|
| 570 | + ->setItemTarget($this->get($prefix.'item_target', $data)) |
|
| 571 | + ->setFileSource($this->getInt($prefix.'file_source', $data)) |
|
| 572 | + ->setFileTarget($this->get($prefix.'file_target', $data)) |
|
| 573 | + ->setSharedWith($this->get($prefix.'share_with', $data)) |
|
| 574 | + ->setSharedBy($this->get($prefix.'uid_initiator', $data)) |
|
| 575 | + ->setShareOwner($this->get($prefix.'uid_owner', $data)) |
|
| 576 | + ->setToken($this->get($prefix.'token', $data)) |
|
| 577 | 577 | ->setShareTime($shareTime) |
| 578 | - ->setShareNote($this->get($prefix . 'note', $data)); |
|
| 578 | + ->setShareNote($this->get($prefix.'note', $data)); |
|
| 579 | 579 | |
| 580 | 580 | try { |
| 581 | - $expirationDate = $this->get($prefix . 'expiration', $data); |
|
| 581 | + $expirationDate = $this->get($prefix.'expiration', $data); |
|
| 582 | 582 | if ($expirationDate !== '') { |
| 583 | 583 | $this->setExpirationDate(new DateTime($expirationDate)); |
| 584 | 584 | } |
@@ -594,9 +594,9 @@ discard block |
||
| 594 | 594 | // $share->setPassword($this->get('password', $data, '')); |
| 595 | 595 | // } |
| 596 | 596 | |
| 597 | - $this->setChildId($this->getInt($prefix . 'child_id', $data)) |
|
| 598 | - ->setChildFileTarget($this->get($prefix . 'child_file_target', $data)) |
|
| 599 | - ->setChildPermissions($this->getInt($prefix . 'child_permissions', $data)) |
|
| 597 | + $this->setChildId($this->getInt($prefix.'child_id', $data)) |
|
| 598 | + ->setChildFileTarget($this->get($prefix.'child_file_target', $data)) |
|
| 599 | + ->setChildPermissions($this->getInt($prefix.'child_permissions', $data)) |
|
| 600 | 600 | ->setProviderId(ShareByCircleProvider::IDENTIFIER) |
| 601 | 601 | ->setStatus(Ishare::STATUS_ACCEPTED); |
| 602 | 602 | |
@@ -377,8 +377,8 @@ discard block |
||
| 377 | 377 | $andX = []; |
| 378 | 378 | foreach (explode(' ', $circle->getDisplayName()) as $word) { |
| 379 | 379 | $andX[] = $expr->iLike( |
| 380 | - $this->getDefaultSelectAlias() . '.' . 'display_name', |
|
| 381 | - $this->createNamedParameter('%' . $word . '%') |
|
| 380 | + $this->getDefaultSelectAlias().'.'.'display_name', |
|
| 381 | + $this->createNamedParameter('%'.$word.'%') |
|
| 382 | 382 | ); |
| 383 | 383 | } |
| 384 | 384 | } |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | $this->generateRemoteInstanceSelectAlias($aliasRemoteInstance) |
| 408 | 408 | ->leftJoin( |
| 409 | 409 | $alias, CoreRequestBuilder::TABLE_REMOTE, $aliasRemoteInstance, |
| 410 | - $expr->eq($alias . '.instance', $aliasRemoteInstance . '.instance') |
|
| 410 | + $expr->eq($alias.'.instance', $aliasRemoteInstance.'.instance') |
|
| 411 | 411 | ); |
| 412 | 412 | } catch (RequestBuilderException $e) { |
| 413 | 413 | } |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | $expr = $this->expr(); |
| 460 | 460 | $this->leftJoin( |
| 461 | 461 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_REMOTE, $aliasRemote, |
| 462 | - $expr->eq($aliasRemote . '.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
| 462 | + $expr->eq($aliasRemote.'.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
| 463 | 463 | ); |
| 464 | 464 | } |
| 465 | 465 | |
@@ -487,12 +487,12 @@ discard block |
||
| 487 | 487 | $this->leftJoin( |
| 488 | 488 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteMember, |
| 489 | 489 | $expr->andX( |
| 490 | - $expr->eq($aliasRemoteMember . '.circle_id', $aliasCircle . '.unique_id'), |
|
| 490 | + $expr->eq($aliasRemoteMember.'.circle_id', $aliasCircle.'.unique_id'), |
|
| 491 | 491 | $expr->eq( |
| 492 | - $aliasRemoteMember . '.instance', |
|
| 492 | + $aliasRemoteMember.'.instance', |
|
| 493 | 493 | $this->createNamedParameter($remoteInstance->getInstance()) |
| 494 | 494 | ), |
| 495 | - $expr->gte($aliasRemoteMember . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 495 | + $expr->gte($aliasRemoteMember.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 496 | 496 | ) |
| 497 | 497 | ); |
| 498 | 498 | } |
@@ -524,21 +524,21 @@ discard block |
||
| 524 | 524 | $this->leftJoin( |
| 525 | 525 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircle, |
| 526 | 526 | $expr->andX( |
| 527 | - $expr->eq($aliasRemoteCircle . '.single_id', $aliasCircle . '.unique_id'), |
|
| 528 | - $expr->emptyString($aliasRemoteCircle . '.instance'), |
|
| 529 | - $expr->gte($aliasRemoteCircle . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 527 | + $expr->eq($aliasRemoteCircle.'.single_id', $aliasCircle.'.unique_id'), |
|
| 528 | + $expr->emptyString($aliasRemoteCircle.'.instance'), |
|
| 529 | + $expr->gte($aliasRemoteCircle.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 530 | 530 | ) |
| 531 | 531 | ); |
| 532 | 532 | $this->leftJoin( |
| 533 | 533 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircleOwner, |
| 534 | 534 | $expr->andX( |
| 535 | - $expr->eq($aliasRemoteCircle . '.circle_id', $aliasRemoteCircleOwner . '.circle_id'), |
|
| 535 | + $expr->eq($aliasRemoteCircle.'.circle_id', $aliasRemoteCircleOwner.'.circle_id'), |
|
| 536 | 536 | $expr->eq( |
| 537 | - $aliasRemoteCircleOwner . '.instance', |
|
| 537 | + $aliasRemoteCircleOwner.'.instance', |
|
| 538 | 538 | $this->createNamedParameter($remoteInstance->getInstance()) |
| 539 | 539 | ), |
| 540 | 540 | $expr->eq( |
| 541 | - $aliasRemoteCircleOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
| 541 | + $aliasRemoteCircleOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
| 542 | 542 | ) |
| 543 | 543 | ) |
| 544 | 544 | ); |
@@ -569,11 +569,11 @@ discard block |
||
| 569 | 569 | $aliasRemoteCircleOwner = $this->generateAlias($aliasRemoteCircle, self::OWNER); |
| 570 | 570 | |
| 571 | 571 | $expr = $this->expr(); |
| 572 | - $orX = [$expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE))]; |
|
| 572 | + $orX = [$expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE))]; |
|
| 573 | 573 | |
| 574 | - $orExtOrPassive = [$expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL))]; |
|
| 574 | + $orExtOrPassive = [$expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL))]; |
|
| 575 | 575 | if (!$sensitive) { |
| 576 | - $orExtOrPassive[] = $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)); |
|
| 576 | + $orExtOrPassive[] = $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)); |
|
| 577 | 577 | } else { |
| 578 | 578 | if ($this->getDefaultSelectAlias() === CoreQueryBuilder::MEMBER) { |
| 579 | 579 | $orExtOrPassive[] = $this->limitRemoteVisibility_Sensitive_Members($aliasRemote); |
@@ -581,8 +581,8 @@ discard block |
||
| 581 | 581 | } |
| 582 | 582 | |
| 583 | 583 | $orInstance = $expr->orX( |
| 584 | - $expr->isNotNull($aliasRemoteMember . '.instance'), |
|
| 585 | - $expr->isNotNull($aliasRemoteCircleOwner . '.instance'), |
|
| 584 | + $expr->isNotNull($aliasRemoteMember.'.instance'), |
|
| 585 | + $expr->isNotNull($aliasRemoteCircleOwner.'.instance'), |
|
| 586 | 586 | ); |
| 587 | 587 | |
| 588 | 588 | $andExternal = $expr->andX( |
@@ -592,13 +592,13 @@ discard block |
||
| 592 | 592 | |
| 593 | 593 | $orExtOrTrusted = $expr->orX( |
| 594 | 594 | $andExternal, |
| 595 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)), |
|
| 595 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)), |
|
| 596 | 596 | ); |
| 597 | 597 | |
| 598 | 598 | $orX[] = $expr->andX( |
| 599 | 599 | $orExtOrTrusted, |
| 600 | 600 | $this->exprLimitBitwise('config', Circle::CFG_FEDERATED, $aliasCircle), |
| 601 | - $expr->emptyString($aliasOwner . '.instance'), |
|
| 601 | + $expr->emptyString($aliasOwner.'.instance'), |
|
| 602 | 602 | ); |
| 603 | 603 | |
| 604 | 604 | $this->andWhere($expr->orX(...$orX)); |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | } |
| 626 | 626 | $this->innerJoin( |
| 627 | 627 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
| 628 | - $expr->eq($aliasMember . '.circle_id', $alias . '.unique_id') |
|
| 628 | + $expr->eq($aliasMember.'.circle_id', $alias.'.unique_id') |
|
| 629 | 629 | ); |
| 630 | 630 | |
| 631 | 631 | $this->filterDirectMembership($aliasMember, $member); |
@@ -650,12 +650,12 @@ discard block |
||
| 650 | 650 | $aliasCircle, |
| 651 | 651 | 'circles_membership', |
| 652 | 652 | $aliasMembership, |
| 653 | - $this->expr()->eq($aliasCircle . '.unique_id', $aliasMembership . '.circle_id') |
|
| 653 | + $this->expr()->eq($aliasCircle.'.unique_id', $aliasMembership.'.circle_id') |
|
| 654 | 654 | ); |
| 655 | 655 | |
| 656 | 656 | $this->andWhere( |
| 657 | 657 | $this->expr()->eq( |
| 658 | - $aliasMembership . '.single_id', |
|
| 658 | + $aliasMembership.'.single_id', |
|
| 659 | 659 | $this->createNamedParameter($federatedUser->getSingleId()) |
| 660 | 660 | ) |
| 661 | 661 | ); |
@@ -675,22 +675,22 @@ discard block |
||
| 675 | 675 | $andX = []; |
| 676 | 676 | |
| 677 | 677 | if ($member->getUserId() !== '') { |
| 678 | - $andX[] = $expr->eq($aliasMember . '.user_id', $this->createNamedParameter($member->getUserId())); |
|
| 678 | + $andX[] = $expr->eq($aliasMember.'.user_id', $this->createNamedParameter($member->getUserId())); |
|
| 679 | 679 | } |
| 680 | 680 | |
| 681 | 681 | if ($member->getSingleId() !== '') { |
| 682 | - $andX[] = $expr->eq($aliasMember . '.single_id', $this->createNamedParameter($member->getSingleId())); |
|
| 682 | + $andX[] = $expr->eq($aliasMember.'.single_id', $this->createNamedParameter($member->getSingleId())); |
|
| 683 | 683 | } |
| 684 | 684 | |
| 685 | 685 | if ($member->getUserType() > 0) { |
| 686 | - $andX[] = $expr->eq($aliasMember . '.user_type', $this->createNamedParameter($member->getUserType())); |
|
| 686 | + $andX[] = $expr->eq($aliasMember.'.user_type', $this->createNamedParameter($member->getUserType())); |
|
| 687 | 687 | } |
| 688 | 688 | |
| 689 | 689 | $this->limitToInstance($this->getInstance($member)); |
| 690 | 690 | |
| 691 | 691 | if ($member->getLevel() > 0) { |
| 692 | 692 | $andX[] = $expr->gte( |
| 693 | - $aliasMember . '.level', |
|
| 693 | + $aliasMember.'.level', |
|
| 694 | 694 | $this->createNamedParameter($member->getLevel(), IQueryBuilder::PARAM_INT) |
| 695 | 695 | ); |
| 696 | 696 | } |
@@ -730,7 +730,7 @@ discard block |
||
| 730 | 730 | $helperAlias, |
| 731 | 731 | CoreRequestBuilder::TABLE_CIRCLE, |
| 732 | 732 | $aliasCircle, |
| 733 | - $expr->eq($aliasCircle . '.unique_id', $helperAlias . '.' . $field) |
|
| 733 | + $expr->eq($aliasCircle.'.unique_id', $helperAlias.'.'.$field) |
|
| 734 | 734 | ); |
| 735 | 735 | |
| 736 | 736 | if (!is_null($initiator)) { |
@@ -761,7 +761,7 @@ discard block |
||
| 761 | 761 | $this->generateCircleSelectAlias($aliasInvitedBy) |
| 762 | 762 | ->leftJoin( |
| 763 | 763 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasInvitedBy, |
| 764 | - $expr->eq($aliasMember . '.invited_by', $aliasInvitedBy . '.unique_id') |
|
| 764 | + $expr->eq($aliasMember.'.invited_by', $aliasInvitedBy.'.unique_id') |
|
| 765 | 765 | ); |
| 766 | 766 | |
| 767 | 767 | $this->leftJoinOwner($aliasInvitedBy); |
@@ -792,7 +792,7 @@ discard block |
||
| 792 | 792 | $this->generateCircleSelectAlias($aliasBasedOn) |
| 793 | 793 | ->leftJoin( |
| 794 | 794 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasBasedOn, |
| 795 | - $expr->eq($aliasBasedOn . '.unique_id', $aliasMember . '.single_id') |
|
| 795 | + $expr->eq($aliasBasedOn.'.unique_id', $aliasMember.'.single_id') |
|
| 796 | 796 | ); |
| 797 | 797 | |
| 798 | 798 | if (!is_null($initiator)) { |
@@ -825,9 +825,9 @@ discard block |
||
| 825 | 825 | ->leftJoin( |
| 826 | 826 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
| 827 | 827 | $expr->andX( |
| 828 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $field), |
|
| 828 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$field), |
|
| 829 | 829 | $expr->eq( |
| 830 | - $aliasMember . '.level', |
|
| 830 | + $aliasMember.'.level', |
|
| 831 | 831 | $this->createNamedParameter(Member::LEVEL_OWNER, self::PARAM_INT) |
| 832 | 832 | ) |
| 833 | 833 | ) |
@@ -859,7 +859,7 @@ discard block |
||
| 859 | 859 | |
| 860 | 860 | $expr = $this->expr(); |
| 861 | 861 | |
| 862 | - $on = $expr->andX($expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field)); |
|
| 862 | + $on = $expr->andX($expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field)); |
|
| 863 | 863 | |
| 864 | 864 | // limit on membership level if requested |
| 865 | 865 | $minLevel = $probe?->getMinimumLevel() ?? 0; |
@@ -900,8 +900,8 @@ discard block |
||
| 900 | 900 | ->leftJoin( |
| 901 | 901 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
| 902 | 902 | $expr->andX( |
| 903 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $fieldCircleId), |
|
| 904 | - $expr->eq($aliasMember . '.single_id', $alias . '.' . $fieldSingleId), |
|
| 903 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$fieldCircleId), |
|
| 904 | + $expr->eq($aliasMember.'.single_id', $alias.'.'.$fieldSingleId), |
|
| 905 | 905 | $this->exprGt('level', Member::LEVEL_MEMBER, true, $aliasMember) |
| 906 | 906 | ) |
| 907 | 907 | ); |
@@ -933,7 +933,7 @@ discard block |
||
| 933 | 933 | |
| 934 | 934 | $this->leftJoin( |
| 935 | 935 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
| 936 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
| 936 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
| 937 | 937 | ); |
| 938 | 938 | |
| 939 | 939 | // if (!$this->getBool('getData', $options, false)) { |
@@ -947,8 +947,8 @@ discard block |
||
| 947 | 947 | ->leftJoin( |
| 948 | 948 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
| 949 | 949 | $expr->andX( |
| 950 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id'), |
|
| 951 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id') |
|
| 950 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id'), |
|
| 951 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id') |
|
| 952 | 952 | ) |
| 953 | 953 | ); |
| 954 | 954 | |
@@ -965,12 +965,12 @@ discard block |
||
| 965 | 965 | $aliasUpstreamMembership = $this->generateAlias($alias, self::UPSTREAM_MEMBERSHIPS, $options); |
| 966 | 966 | $this->leftJoin( |
| 967 | 967 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasUpstreamMembership, |
| 968 | - $expr->eq($aliasUpstreamMembership . '.single_id', $this->createNamedParameter($singleId)) |
|
| 968 | + $expr->eq($aliasUpstreamMembership.'.single_id', $this->createNamedParameter($singleId)) |
|
| 969 | 969 | ); |
| 970 | 970 | |
| 971 | 971 | $orX = $expr->orX( |
| 972 | - $expr->eq($aliasUpstreamMembership . '.circle_id', $alias . '.' . $field), |
|
| 973 | - $expr->eq($alias . '.' . $field, $this->createNamedParameter($singleId)) |
|
| 972 | + $expr->eq($aliasUpstreamMembership.'.circle_id', $alias.'.'.$field), |
|
| 973 | + $expr->eq($alias.'.'.$field, $this->createNamedParameter($singleId)) |
|
| 974 | 974 | ); |
| 975 | 975 | |
| 976 | 976 | $this->andWhere($orX); |
@@ -991,11 +991,11 @@ discard block |
||
| 991 | 991 | |
| 992 | 992 | $expr = $this->expr(); |
| 993 | 993 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); |
| 994 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); |
|
| 994 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); |
|
| 995 | 995 | if ($level > 1) { |
| 996 | 996 | $this->andWhere( |
| 997 | 997 | $expr->gte( |
| 998 | - $aliasMembership . '.level', |
|
| 998 | + $aliasMembership.'.level', |
|
| 999 | 999 | $this->createNamedParameter($level, IQueryBuilder::PARAM_INT) |
| 1000 | 1000 | ) |
| 1001 | 1001 | ); |
@@ -1023,8 +1023,8 @@ discard block |
||
| 1023 | 1023 | $this->leftJoin( |
| 1024 | 1024 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
| 1025 | 1025 | $expr->andX( |
| 1026 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field), |
|
| 1027 | - $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') |
|
| 1026 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field), |
|
| 1027 | + $expr->eq($aliasMembership.'.single_id', $alias.'.single_id') |
|
| 1028 | 1028 | ) |
| 1029 | 1029 | ); |
| 1030 | 1030 | |
@@ -1037,8 +1037,8 @@ discard block |
||
| 1037 | 1037 | ->leftJoin( |
| 1038 | 1038 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, |
| 1039 | 1039 | $expr->andX( |
| 1040 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), |
|
| 1041 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') |
|
| 1040 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), |
|
| 1041 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') |
|
| 1042 | 1042 | ) |
| 1043 | 1043 | ); |
| 1044 | 1044 | } |
@@ -1078,7 +1078,7 @@ discard block |
||
| 1078 | 1078 | |
| 1079 | 1079 | $this->leftJoin( |
| 1080 | 1080 | $alias, CoreRequestBuilder::TABLE_TOKEN, $aliasShareToken, |
| 1081 | - $expr->eq($aliasShareToken . '.share_id', $alias . '.' . $field) |
|
| 1081 | + $expr->eq($aliasShareToken.'.share_id', $alias.'.'.$field) |
|
| 1082 | 1082 | ); |
| 1083 | 1083 | } |
| 1084 | 1084 | |
@@ -1120,14 +1120,14 @@ discard block |
||
| 1120 | 1120 | try { |
| 1121 | 1121 | $aliasConfig = $this->generateAlias($alias, self::CONFIG, $options); |
| 1122 | 1122 | $this->selectAlias( |
| 1123 | - $aliasConfig . '.config', |
|
| 1124 | - (($alias !== $this->getDefaultSelectAlias()) ? $alias . '_' : '') . 'circle_config' |
|
| 1123 | + $aliasConfig.'.config', |
|
| 1124 | + (($alias !== $this->getDefaultSelectAlias()) ? $alias.'_' : '').'circle_config' |
|
| 1125 | 1125 | ); |
| 1126 | 1126 | $this->leftJoin( |
| 1127 | 1127 | $alias, |
| 1128 | 1128 | CoreRequestBuilder::TABLE_CIRCLE, |
| 1129 | 1129 | $aliasConfig, |
| 1130 | - $expr->eq($alias . '.circle_id', $aliasConfig . '.unique_id') |
|
| 1130 | + $expr->eq($alias.'.circle_id', $aliasConfig.'.unique_id') |
|
| 1131 | 1131 | ); |
| 1132 | 1132 | } catch (RequestBuilderException $e) { |
| 1133 | 1133 | } |
@@ -1165,7 +1165,7 @@ discard block |
||
| 1165 | 1165 | $aliasMembership, |
| 1166 | 1166 | $expr->andX( |
| 1167 | 1167 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasMembership), |
| 1168 | - $expr->eq($aliasMembership . '.circle_id', $helperAlias . '.' . $field) |
|
| 1168 | + $expr->eq($aliasMembership.'.circle_id', $helperAlias.'.'.$field) |
|
| 1169 | 1169 | ) |
| 1170 | 1170 | ); |
| 1171 | 1171 | |
@@ -1183,10 +1183,10 @@ discard block |
||
| 1183 | 1183 | try { |
| 1184 | 1184 | $aliasMembershipCircle = $this->generateAlias($aliasMembership, self::CONFIG, $options); |
| 1185 | 1185 | $orXMembershipCircle = $expr->orX(...array_map( |
| 1186 | - function (string $alias) use ($aliasMembershipCircle) { |
|
| 1186 | + function(string $alias) use ($aliasMembershipCircle) { |
|
| 1187 | 1187 | return $this->expr()->eq( |
| 1188 | - $alias . '.circle_id', |
|
| 1189 | - $aliasMembershipCircle . '.unique_id' |
|
| 1188 | + $alias.'.circle_id', |
|
| 1189 | + $aliasMembershipCircle.'.unique_id' |
|
| 1190 | 1190 | ); |
| 1191 | 1191 | }, |
| 1192 | 1192 | $listMembershipCircleAlias |
@@ -1217,7 +1217,7 @@ discard block |
||
| 1217 | 1217 | $aliasDirectInitiator, |
| 1218 | 1218 | $expr->andX( |
| 1219 | 1219 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasDirectInitiator), |
| 1220 | - $expr->eq($aliasDirectInitiator . '.circle_id', $helperAlias . '.' . $field) |
|
| 1220 | + $expr->eq($aliasDirectInitiator.'.circle_id', $helperAlias.'.'.$field) |
|
| 1221 | 1221 | ) |
| 1222 | 1222 | ); |
| 1223 | 1223 | } catch (RequestBuilderException $e) { |
@@ -1231,8 +1231,8 @@ discard block |
||
| 1231 | 1231 | $this->leftJoin( |
| 1232 | 1232 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
| 1233 | 1233 | $expr->andX( |
| 1234 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), |
|
| 1235 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') |
|
| 1234 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), |
|
| 1235 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') |
|
| 1236 | 1236 | ) |
| 1237 | 1237 | ); |
| 1238 | 1238 | |
@@ -1240,8 +1240,8 @@ discard block |
||
| 1240 | 1240 | $this->leftJoin( |
| 1241 | 1241 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
| 1242 | 1242 | $expr->andX( |
| 1243 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), |
|
| 1244 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') |
|
| 1243 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), |
|
| 1244 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') |
|
| 1245 | 1245 | ) |
| 1246 | 1246 | ); |
| 1247 | 1247 | |
@@ -1286,8 +1286,8 @@ discard block |
||
| 1286 | 1286 | ->leftJoin( |
| 1287 | 1287 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
| 1288 | 1288 | $expr->andX( |
| 1289 | - $expr->eq($aliasInitiator . '.circle_id', $alias . '.unique_id'), |
|
| 1290 | - $expr->eq($aliasInitiator . '.' . $field, $helperAlias . '.inheritance_first'), |
|
| 1289 | + $expr->eq($aliasInitiator.'.circle_id', $alias.'.unique_id'), |
|
| 1290 | + $expr->eq($aliasInitiator.'.'.$field, $helperAlias.'.inheritance_first'), |
|
| 1291 | 1291 | ) |
| 1292 | 1292 | ); |
| 1293 | 1293 | // |
@@ -1323,15 +1323,15 @@ discard block |
||
| 1323 | 1323 | if (!$this->getBool('filterPersonalCircles', $options, false)) { |
| 1324 | 1324 | $orX[] = $expr->andX( |
| 1325 | 1325 | $this->exprLimitBitwise('config', Circle::CFG_PERSONAL, $aliasMembershipCircle), |
| 1326 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
| 1326 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
| 1327 | 1327 | ); |
| 1328 | 1328 | } |
| 1329 | 1329 | |
| 1330 | 1330 | $minimumLevel = $this->getInt('minimumLevel', $options); |
| 1331 | 1331 | $orXLevelCheck = $expr->orX(...array_map( |
| 1332 | - function (string $alias) use ($minimumLevel) { |
|
| 1332 | + function(string $alias) use ($minimumLevel) { |
|
| 1333 | 1333 | return $this->expr()->gte( |
| 1334 | - $alias . '.level', |
|
| 1334 | + $alias.'.level', |
|
| 1335 | 1335 | $this->createNamedParameter($minimumLevel, self::PARAM_INT) |
| 1336 | 1336 | ); |
| 1337 | 1337 | }, |
@@ -1411,13 +1411,13 @@ discard block |
||
| 1411 | 1411 | private function limitRemoteVisibility_Sensitive_Members(string $alias): ICompositeExpression { |
| 1412 | 1412 | $expr = $this->expr(); |
| 1413 | 1413 | return $expr->andX( |
| 1414 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)), |
|
| 1414 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)), |
|
| 1415 | 1415 | $expr->orX( |
| 1416 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance'), |
|
| 1416 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance'), |
|
| 1417 | 1417 | // TODO: do we need this ? (display members from the local instance) |
| 1418 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance'), |
|
| 1418 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance'), |
|
| 1419 | 1419 | $expr->eq( |
| 1420 | - $this->getDefaultSelectAlias() . '.level', |
|
| 1420 | + $this->getDefaultSelectAlias().'.level', |
|
| 1421 | 1421 | $this->createNamedParameter(Member::LEVEL_OWNER) |
| 1422 | 1422 | ), |
| 1423 | 1423 | ), |
@@ -1452,11 +1452,11 @@ discard block |
||
| 1452 | 1452 | ) |
| 1453 | 1453 | ->leftJoin( |
| 1454 | 1454 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, |
| 1455 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') |
|
| 1455 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') |
|
| 1456 | 1456 | ) |
| 1457 | 1457 | ->leftJoin( |
| 1458 | 1458 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, |
| 1459 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') |
|
| 1459 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') |
|
| 1460 | 1460 | ); |
| 1461 | 1461 | } |
| 1462 | 1462 | |
@@ -1478,8 +1478,8 @@ discard block |
||
| 1478 | 1478 | $this->leftJoin( |
| 1479 | 1479 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, |
| 1480 | 1480 | $expr->andX( |
| 1481 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), |
|
| 1482 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') |
|
| 1481 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), |
|
| 1482 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') |
|
| 1483 | 1483 | ) |
| 1484 | 1484 | ); |
| 1485 | 1485 | |
@@ -1537,13 +1537,13 @@ discard block |
||
| 1537 | 1537 | $this->leftJoin( |
| 1538 | 1538 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, |
| 1539 | 1539 | $expr->andX( |
| 1540 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), |
|
| 1541 | - $expr->eq($aliasMountpoint . '.single_id', $this->createNamedParameter($federatedUser->getSingleId())) |
|
| 1540 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), |
|
| 1541 | + $expr->eq($aliasMountpoint.'.single_id', $this->createNamedParameter($federatedUser->getSingleId())) |
|
| 1542 | 1542 | ) |
| 1543 | 1543 | ); |
| 1544 | 1544 | |
| 1545 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); |
|
| 1546 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); |
|
| 1545 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); |
|
| 1546 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); |
|
| 1547 | 1547 | } |
| 1548 | 1548 | |
| 1549 | 1549 | |
@@ -1651,10 +1651,10 @@ discard block |
||
| 1651 | 1651 | */ |
| 1652 | 1652 | public function generateAlias(string $base, string $extension, ?array &$options = []): string { |
| 1653 | 1653 | $search = str_replace('_', '.', $base); |
| 1654 | - $path = $search . '.' . $extension; |
|
| 1654 | + $path = $search.'.'.$extension; |
|
| 1655 | 1655 | if (!$this->validKey($path, $this->getSqlPath()) |
| 1656 | 1656 | && !in_array($extension, $this->getArray($search, $this->getSqlPath()))) { |
| 1657 | - throw new RequestBuilderException($extension . ' not found in ' . $search); |
|
| 1657 | + throw new RequestBuilderException($extension.' not found in '.$search); |
|
| 1658 | 1658 | } |
| 1659 | 1659 | |
| 1660 | 1660 | if (!is_array($options)) { |
@@ -1663,15 +1663,15 @@ discard block |
||
| 1663 | 1663 | |
| 1664 | 1664 | $optionPath = ''; |
| 1665 | 1665 | foreach (explode('.', $path) as $p) { |
| 1666 | - $optionPath = trim($optionPath . '.' . $p, '.'); |
|
| 1666 | + $optionPath = trim($optionPath.'.'.$p, '.'); |
|
| 1667 | 1667 | $options = array_merge( |
| 1668 | 1668 | $options, |
| 1669 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->getSqlPath()), |
|
| 1670 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) |
|
| 1669 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->getSqlPath()), |
|
| 1670 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) |
|
| 1671 | 1671 | ); |
| 1672 | 1672 | } |
| 1673 | 1673 | |
| 1674 | - return $base . '_' . $extension; |
|
| 1674 | + return $base.'_'.$extension; |
|
| 1675 | 1675 | } |
| 1676 | 1676 | |
| 1677 | 1677 | |
@@ -1691,7 +1691,7 @@ discard block |
||
| 1691 | 1691 | } else { |
| 1692 | 1692 | $k = $arr; |
| 1693 | 1693 | } |
| 1694 | - $path[$k] = $prefix . '_' . $k . '_'; |
|
| 1694 | + $path[$k] = $prefix.'_'.$k.'_'; |
|
| 1695 | 1695 | } |
| 1696 | 1696 | |
| 1697 | 1697 | return $path; |