@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | * @return string[] |
219 | 219 | */ |
220 | 220 | public function fillCommandList(string $source, string $field): array { |
221 | - echo $source . ' ' . $field . "\n"; |
|
221 | + echo $source.' '.$field."\n"; |
|
222 | 222 | |
223 | 223 | return ['abcd', 'abdde', 'erfg']; |
224 | 224 | } |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | * @return string |
395 | 395 | */ |
396 | 396 | private function obfuscateId(string $id): string { |
397 | - return substr($id, 0, 5) . '.' . md5(substr($id, 5)); |
|
397 | + return substr($id, 0, 5).'.'.md5(substr($id, 5)); |
|
398 | 398 | } |
399 | 399 | |
400 | 400 | |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | */ |
404 | 404 | public function onNewPrompt(NC22InteractiveShellSession $session): void { |
405 | 405 | $prompt = |
406 | - 'Circles Report [<info>' . $this->report->getSource() . '</info>]:<comment>%PATH%</comment>'; |
|
406 | + 'Circles Report [<info>'.$this->report->getSource().'</info>]:<comment>%PATH%</comment>'; |
|
407 | 407 | |
408 | 408 | $commands = []; |
409 | 409 | if ($session->getData()->g('currentStatus') === 'write') { |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | * CirclesCheck constructor. |
111 | 111 | * |
112 | 112 | * @param Capabilities $capabilities |
113 | - * @param FederatedEvent $federatedEventService |
|
113 | + * @param FederatedEventService $federatedEventService |
|
114 | 114 | * @param RemoteService $remoteService |
115 | 115 | * @param RemoteStreamService $remoteStreamService |
116 | 116 | * @param RemoteUpstreamService $remoteUpstreamService |
@@ -619,7 +619,6 @@ discard block |
||
619 | 619 | |
620 | 620 | |
621 | 621 | /** |
622 | - * @param OutputInterface $o |
|
623 | 622 | * @param string $type |
624 | 623 | * @param string $route |
625 | 624 | * @param array $args |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | throw new Exception('Please specify a --type for the test'); |
174 | 174 | } |
175 | 175 | if ($test !== '' && !in_array($type, self::$checks)) { |
176 | - throw new Exception('Unknown type: ' . implode(', ', self::$checks)); |
|
176 | + throw new Exception('Unknown type: '.implode(', ', self::$checks)); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | // $this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test); |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | } |
279 | 279 | |
280 | 280 | $output->writeln(''); |
281 | - $output->writeln('* testing current address: ' . $test); |
|
281 | + $output->writeln('* testing current address: '.$test); |
|
282 | 282 | |
283 | 283 | try { |
284 | 284 | $this->setupLoopback($input, $output, $test); |
@@ -314,8 +314,8 @@ discard block |
||
314 | 314 | continue; |
315 | 315 | } |
316 | 316 | |
317 | - $loopback = $scheme . '://' . $cloudId; |
|
318 | - $output->write('* testing address: ' . $loopback . ' '); |
|
317 | + $loopback = $scheme.'://'.$cloudId; |
|
318 | + $output->write('* testing address: '.$loopback.' '); |
|
319 | 319 | |
320 | 320 | if ($this->testLoopback($input, $output, $loopback)) { |
321 | 321 | $output->writeln('* <info>Loopback</info> address looks good'); |
@@ -385,9 +385,9 @@ discard block |
||
385 | 385 | $test = new FederatedEvent(LoopbackTest::class); |
386 | 386 | $this->federatedEventService->newEvent($test); |
387 | 387 | |
388 | - $output->writeln('<info>' . $test->getWrapperToken() . '</info>'); |
|
388 | + $output->writeln('<info>'.$test->getWrapperToken().'</info>'); |
|
389 | 389 | |
390 | - $output->writeln('- Waiting for async process to finish (' . $this->delay . 's)'); |
|
390 | + $output->writeln('- Waiting for async process to finish ('.$this->delay.'s)'); |
|
391 | 391 | sleep($this->delay); |
392 | 392 | |
393 | 393 | $output->write('- Checking status on FederatedEvent '); |
@@ -401,18 +401,18 @@ discard block |
||
401 | 401 | |
402 | 402 | $checkVerify = $wrapper->getEvent()->getData()->gInt('verify'); |
403 | 403 | if ($checkVerify === LoopbackTest::VERIFY) { |
404 | - $output->write('<info>verify=' . $checkVerify . '</info> '); |
|
404 | + $output->write('<info>verify='.$checkVerify.'</info> '); |
|
405 | 405 | } else { |
406 | - $output->writeln('<error>verify=' . $checkVerify . '</error>'); |
|
406 | + $output->writeln('<error>verify='.$checkVerify.'</error>'); |
|
407 | 407 | |
408 | 408 | return false; |
409 | 409 | } |
410 | 410 | |
411 | 411 | $checkManage = $wrapper->getResult()->gInt('manage'); |
412 | 412 | if ($checkManage === LoopbackTest::MANAGE) { |
413 | - $output->write('<info>manage=' . $checkManage . '</info> '); |
|
413 | + $output->write('<info>manage='.$checkManage.'</info> '); |
|
414 | 414 | } else { |
415 | - $output->writeln('<error>manage=' . $checkManage . '</error>'); |
|
415 | + $output->writeln('<error>manage='.$checkManage.'</error>'); |
|
416 | 416 | |
417 | 417 | return false; |
418 | 418 | } |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | [$scheme, $cloudId] = $this->parseAddress($loopback); |
435 | 435 | |
436 | 436 | $question = new ConfirmationQuestion( |
437 | - '- Do you want to save <info>'. $loopback . '</info> as your <info>loopback</info> address ? (y/N) ', false, '/^(y|Y)/i' |
|
437 | + '- Do you want to save <info>'.$loopback.'</info> as your <info>loopback</info> address ? (y/N) ', false, '/^(y|Y)/i' |
|
438 | 438 | ); |
439 | 439 | |
440 | 440 | $helper = $this->getHelper('question'); |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_SCHEME, $scheme); |
448 | 448 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId); |
449 | 449 | $output->writeln( |
450 | - '- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>' |
|
450 | + '- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>' |
|
451 | 451 | ); |
452 | 452 | |
453 | 453 | } |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | continue; |
519 | 519 | } |
520 | 520 | |
521 | - $frontal = $scheme . '://' . $cloudId; |
|
521 | + $frontal = $scheme.'://'.$cloudId; |
|
522 | 522 | break; |
523 | 523 | } |
524 | 524 | |
@@ -532,13 +532,13 @@ discard block |
||
532 | 532 | 'You will need to run this <info>curl</info> command from a remote terminal and paste its result: ' |
533 | 533 | ); |
534 | 534 | $output->writeln( |
535 | - ' curl ' . $frontal . '/.well-known/webfinger?resource=http://nextcloud.com/' |
|
535 | + ' curl '.$frontal.'/.well-known/webfinger?resource=http://nextcloud.com/' |
|
536 | 536 | ); |
537 | 537 | |
538 | 538 | $question = new Question('result: ', ''); |
539 | 539 | $pasteWebfinger = $helper->ask($input, $output, $question); |
540 | 540 | |
541 | - echo '__ ' . $pasteWebfinger; |
|
541 | + echo '__ '.$pasteWebfinger; |
|
542 | 542 | |
543 | 543 | $output->writeln('TESTING !!'); |
544 | 544 | $output->writeln('TESTING !!'); |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | $this->configService->configureLoopbackRequest($request, $route, $args); |
662 | 662 | $request->setFollowLocation(false); |
663 | 663 | |
664 | - $output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
664 | + $output->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
665 | 665 | |
666 | 666 | try { |
667 | 667 | $this->doRequest($request); |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | $color = 'info'; |
673 | 673 | } |
674 | 674 | |
675 | - $output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>'); |
|
675 | + $output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>'); |
|
676 | 676 | if ($result->getStatusCode() === 200) { |
677 | 677 | return true; |
678 | 678 | } |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | |
697 | 697 | $output->writeln(''); |
698 | 698 | $output->writeln( |
699 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
699 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
700 | 700 | ); |
701 | 701 | |
702 | 702 | $helper = $this->getHelper('question'); |
@@ -713,8 +713,8 @@ discard block |
||
713 | 713 | |
714 | 714 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
715 | 715 | $output->writeln( |
716 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
717 | - . $address . '\'</info> stored in database' |
|
716 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
717 | + . $address.'\'</info> stored in database' |
|
718 | 718 | ); |
719 | 719 | } |
720 | 720 | |
@@ -735,7 +735,7 @@ discard block |
||
735 | 735 | } |
736 | 736 | |
737 | 737 | if (!is_null($cloudIdPort)) { |
738 | - $cloudId = $cloudId . ':' . $cloudIdPort; |
|
738 | + $cloudId = $cloudId.':'.$cloudIdPort; |
|
739 | 739 | } |
740 | 740 | |
741 | 741 | return [$scheme, $cloudId]; |
@@ -61,7 +61,6 @@ |
||
61 | 61 | use OCP\AppFramework\Http; |
62 | 62 | use OCP\IURLGenerator; |
63 | 63 | use ReflectionClass; |
64 | -use ReflectionException; |
|
65 | 64 | |
66 | 65 | |
67 | 66 | /** |
@@ -315,7 +315,7 @@ |
||
315 | 315 | public function getCachedRemoteInstance(string $instance): RemoteInstance { |
316 | 316 | $remoteInstance = $this->remoteRequest->getFromInstance($instance); |
317 | 317 | if ($remoteInstance->getType() === RemoteInstance::TYPE_UNKNOWN) { |
318 | - throw new UnknownRemoteException($instance . ' is set as \'unknown\' in database'); |
|
318 | + throw new UnknownRemoteException($instance.' is set as \'unknown\' in database'); |
|
319 | 319 | } |
320 | 320 | |
321 | 321 | return $remoteInstance; |
@@ -230,13 +230,13 @@ |
||
230 | 230 | throw new UnknownInterfaceException('misconfigured scheme'); |
231 | 231 | } |
232 | 232 | |
233 | - $base = $scheme . '://' . $this->getCloudInstance(); |
|
233 | + $base = $scheme.'://'.$this->getCloudInstance(); |
|
234 | 234 | |
235 | 235 | if ($route === '') { |
236 | 236 | return $base; |
237 | 237 | } |
238 | 238 | |
239 | - return $base . $this->urlGenerator->linkToRoute($route, $args); |
|
239 | + return $base.$this->urlGenerator->linkToRoute($route, $args); |
|
240 | 240 | } |
241 | 241 | |
242 | 242 |
@@ -176,19 +176,19 @@ discard block |
||
176 | 176 | |
177 | 177 | $webfinger = $this->getWebfinger($host, Application::APP_SUBJECT); |
178 | 178 | if ($this->input->getOption('all')) { |
179 | - $this->output->writeln('- Webfinger on <info>' . $host . '</info>'); |
|
179 | + $this->output->writeln('- Webfinger on <info>'.$host.'</info>'); |
|
180 | 180 | $this->output->writeln(json_encode($webfinger, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
181 | 181 | $this->output->writeln(''); |
182 | 182 | } |
183 | 183 | |
184 | 184 | if ($this->input->getOption('all')) { |
185 | 185 | $circleLink = $this->extractLink(Application::APP_REL, $webfinger); |
186 | - $this->output->writeln('- Information about Circles app on <info>' . $host . '</info>'); |
|
186 | + $this->output->writeln('- Information about Circles app on <info>'.$host.'</info>'); |
|
187 | 187 | $this->output->writeln(json_encode($circleLink, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
188 | 188 | $this->output->writeln(''); |
189 | 189 | } |
190 | 190 | |
191 | - $this->output->writeln('- Available services on <info>' . $host . '</info>'); |
|
191 | + $this->output->writeln('- Available services on <info>'.$host.'</info>'); |
|
192 | 192 | foreach ($webfinger->getLinks() as $link) { |
193 | 193 | $app = $link->getProperty('name'); |
194 | 194 | $ver = $link->getProperty('version'); |
@@ -196,14 +196,14 @@ discard block |
||
196 | 196 | $app .= ' '; |
197 | 197 | } |
198 | 198 | if ($ver !== '') { |
199 | - $ver = 'v' . $ver; |
|
199 | + $ver = 'v'.$ver; |
|
200 | 200 | } |
201 | 201 | |
202 | - $this->output->writeln(' * ' . $link->getRel() . ' ' . $app . $ver); |
|
202 | + $this->output->writeln(' * '.$link->getRel().' '.$app.$ver); |
|
203 | 203 | } |
204 | 204 | $this->output->writeln(''); |
205 | 205 | |
206 | - $this->output->writeln('- Resources related to Circles on <info>' . $host . '</info>'); |
|
206 | + $this->output->writeln('- Resources related to Circles on <info>'.$host.'</info>'); |
|
207 | 207 | $resource = $this->getResourceData($host, Application::APP_SUBJECT, Application::APP_REL); |
208 | 208 | $this->output->writeln(json_encode($resource, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
209 | 209 | $this->output->writeln(''); |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | |
212 | 212 | $tempUid = $resource->g('uid'); |
213 | 213 | $this->output->writeln( |
214 | - '- Confirming UID=' . $tempUid . ' from parsed Signatory at <info>' . $host . '</info>' |
|
214 | + '- Confirming UID='.$tempUid.' from parsed Signatory at <info>'.$host.'</info>' |
|
215 | 215 | ); |
216 | 216 | |
217 | 217 | try { |
@@ -219,15 +219,15 @@ discard block |
||
219 | 219 | $this->output->writeln(' * No SignatureException: <info>Identity authed</info>'); |
220 | 220 | } catch (SignatureException $e) { |
221 | 221 | $this->output->writeln( |
222 | - '<error>' . $host . ' cannot auth its identity: ' . $e->getMessage() . '</error>' |
|
222 | + '<error>'.$host.' cannot auth its identity: '.$e->getMessage().'</error>' |
|
223 | 223 | ); |
224 | 224 | |
225 | 225 | return; |
226 | 226 | } |
227 | 227 | |
228 | - $this->output->writeln(' * Found <info>' . $remoteSignatory->getUid() . '</info>'); |
|
228 | + $this->output->writeln(' * Found <info>'.$remoteSignatory->getUid().'</info>'); |
|
229 | 229 | if ($remoteSignatory->getUid(true) !== $tempUid) { |
230 | - $this->output->writeln('<error>looks like ' . $host . ' is faking its identity'); |
|
230 | + $this->output->writeln('<error>looks like '.$host.' is faking its identity'); |
|
231 | 231 | |
232 | 232 | return; |
233 | 233 | } |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | $this->output->writeln(''); |
236 | 236 | |
237 | 237 | $testUrl = $resource->g('test'); |
238 | - $this->output->writeln('- Testing signed payload on <info>' . $testUrl . '</info>'); |
|
238 | + $this->output->writeln('- Testing signed payload on <info>'.$testUrl.'</info>'); |
|
239 | 239 | |
240 | 240 | try { |
241 | 241 | $localSignatory = $this->remoteStreamService->getAppSignatory(); |
@@ -257,18 +257,18 @@ discard block |
||
257 | 257 | $this->output->writeln(''); |
258 | 258 | |
259 | 259 | $this->output->writeln(' * Clear Signature: '); |
260 | - $this->output->writeln('<comment>' . $signedRequest->getClearSignature() . '</comment>'); |
|
260 | + $this->output->writeln('<comment>'.$signedRequest->getClearSignature().'</comment>'); |
|
261 | 261 | $this->output->writeln(''); |
262 | 262 | |
263 | 263 | $this->output->writeln(' * Signed Signature (base64 encoded): '); |
264 | 264 | $this->output->writeln( |
265 | - '<comment>' . base64_encode($signedRequest->getSignedSignature()) . '</comment>' |
|
265 | + '<comment>'.base64_encode($signedRequest->getSignedSignature()).'</comment>' |
|
266 | 266 | ); |
267 | 267 | $this->output->writeln(''); |
268 | 268 | |
269 | 269 | $result = $signedRequest->getOutgoingRequest()->getResult(); |
270 | 270 | $code = $result->getStatusCode(); |
271 | - $this->output->writeln(' * Result: ' . (($code === 200) ? '<info>' . $code . '</info>' : $code)); |
|
271 | + $this->output->writeln(' * Result: '.(($code === 200) ? '<info>'.$code.'</info>' : $code)); |
|
272 | 272 | $this->output->writeln( |
273 | 273 | json_encode(json_decode($result->getContent(), true), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) |
274 | 274 | ); |
@@ -290,13 +290,13 @@ discard block |
||
290 | 290 | $stored = new RemoteInstance(); |
291 | 291 | $this->remoteStreamService->confirmValidRemote($remoteSignatory, $stored); |
292 | 292 | $this->output->writeln( |
293 | - '<info>The remote instance ' . $host |
|
293 | + '<info>The remote instance '.$host |
|
294 | 294 | . ' is already known with this current identity</info>' |
295 | 295 | ); |
296 | 296 | |
297 | 297 | if ($remoteSignatory->getType() !== $stored->getType()) { |
298 | 298 | $this->output->writeln( |
299 | - '- updating type from ' . $stored->getType() . ' to ' |
|
299 | + '- updating type from '.$stored->getType().' to ' |
|
300 | 300 | . $remoteSignatory->getType() |
301 | 301 | ); |
302 | 302 | $this->remoteStreamService->update( |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | |
307 | 307 | if ($remoteSignatory->getInstance() !== $stored->getInstance()) { |
308 | 308 | $this->output->writeln( |
309 | - '- updating host from ' . $stored->getInstance() . ' to ' |
|
309 | + '- updating host from '.$stored->getInstance().' to ' |
|
310 | 310 | . $remoteSignatory->getInstance() |
311 | 311 | ); |
312 | 312 | $this->remoteStreamService->update( |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | } |
316 | 316 | if ($remoteSignatory->getId() !== $stored->getId()) { |
317 | 317 | $this->output->writeln( |
318 | - '- updating href/Id from ' . $stored->getId() . ' to ' |
|
318 | + '- updating href/Id from '.$stored->getId().' to ' |
|
319 | 319 | . $remoteSignatory->getId() |
320 | 320 | ); |
321 | 321 | $this->remoteStreamService->update($remoteSignatory, RemoteStreamService::UPDATE_HREF); |
@@ -341,10 +341,10 @@ discard block |
||
341 | 341 | $helper = $this->getHelper('question'); |
342 | 342 | |
343 | 343 | $this->output->writeln( |
344 | - 'The remote instance <info>' . $remoteSignatory->getInstance() . '</info> looks good.' |
|
344 | + 'The remote instance <info>'.$remoteSignatory->getInstance().'</info> looks good.' |
|
345 | 345 | ); |
346 | 346 | $question = new ConfirmationQuestion( |
347 | - 'Would you like to identify this remote instance as \'<comment>' . $remoteSignatory->getType() |
|
347 | + 'Would you like to identify this remote instance as \'<comment>'.$remoteSignatory->getType() |
|
348 | 348 | . '</comment>\' using interface \'<comment>' |
349 | 349 | . InterfaceService::$LIST_IFACE[$remoteSignatory->getInterface()] |
350 | 350 | . '</comment>\' ? (y/N) ', |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | $helper = $this->getHelper('question'); |
370 | 370 | |
371 | 371 | $this->output->writeln( |
372 | - 'The remote instance <info>' . $remoteSignatory->getInstance() |
|
372 | + 'The remote instance <info>'.$remoteSignatory->getInstance() |
|
373 | 373 | . '</info> is known but <error>its identity has changed.</error>' |
374 | 374 | ); |
375 | 375 | $this->output->writeln( |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | return; |
448 | 448 | } |
449 | 449 | |
450 | - $this->output->write('Adding <comment>' . $instance . '</comment>: '); |
|
450 | + $this->output->write('Adding <comment>'.$instance.'</comment>: '); |
|
451 | 451 | try { |
452 | 452 | $this->remoteStreamService->addRemoteInstance( |
453 | 453 | $instance, |
@@ -457,8 +457,8 @@ discard block |
||
457 | 457 | ); |
458 | 458 | $this->output->writeln('<info>ok</info>'); |
459 | 459 | } catch (Exception $e) { |
460 | - $msg = ($e->getMessage() === '') ? '' : ' (' . $e->getMessage() . ')'; |
|
461 | - $this->output->writeln('<error>' . get_class($e) . $msg . '</error>'); |
|
460 | + $msg = ($e->getMessage() === '') ? '' : ' ('.$e->getMessage().')'; |
|
461 | + $this->output->writeln('<error>'.get_class($e).$msg.'</error>'); |
|
462 | 462 | } |
463 | 463 | } |
464 | 464 | |
@@ -476,12 +476,12 @@ discard block |
||
476 | 476 | try { |
477 | 477 | $current = $this->remoteStreamService->retrieveRemoteInstance($instance->getInstance()); |
478 | 478 | if ($current->getUid(true) === $instance->getUid(true)) { |
479 | - $currentUid = '<info>' . $current->getUid(true) . '</info>'; |
|
479 | + $currentUid = '<info>'.$current->getUid(true).'</info>'; |
|
480 | 480 | } else { |
481 | - $currentUid = '<error>' . $current->getUid(true) . '</error>'; |
|
481 | + $currentUid = '<error>'.$current->getUid(true).'</error>'; |
|
482 | 482 | } |
483 | 483 | } catch (Exception $e) { |
484 | - $currentUid = '<error>' . $e->getMessage() . '</error>'; |
|
484 | + $currentUid = '<error>'.$e->getMessage().'</error>'; |
|
485 | 485 | } |
486 | 486 | |
487 | 487 | $table->appendRow( |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | } |
508 | 508 | } |
509 | 509 | |
510 | - throw new Exception('Unknown type: ' . implode(', ', RemoteInstance::$LIST_TYPE)); |
|
510 | + throw new Exception('Unknown type: '.implode(', ', RemoteInstance::$LIST_TYPE)); |
|
511 | 511 | } |
512 | 512 | |
513 | 513 | /** |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | } |
521 | 521 | } |
522 | 522 | |
523 | - throw new Exception('Unknown interface: ' . implode(', ', InterfaceService::$LIST_IFACE)); |
|
523 | + throw new Exception('Unknown interface: '.implode(', ', InterfaceService::$LIST_IFACE)); |
|
524 | 524 | } |
525 | 525 | |
526 | 526 | } |
@@ -78,7 +78,7 @@ |
||
78 | 78 | $tables = $schema->getTables(); |
79 | 79 | foreach ($tables as $table) { |
80 | 80 | $tableName = $table->getName(); |
81 | - if (substr($tableName, 0, 8 + strlen($prefix)) === $prefix . 'circles_') { |
|
81 | + if (substr($tableName, 0, 8 + strlen($prefix)) === $prefix.'circles_') { |
|
82 | 82 | $tableName = substr($tableName, strlen($prefix)); |
83 | 83 | $schema->dropTable($tableName); |
84 | 84 | } |
@@ -104,16 +104,16 @@ |
||
104 | 104 | } catch (Exception $e) { |
105 | 105 | $this->e($e); |
106 | 106 | |
107 | - return $membership->getSingleId() . ' is not ' . $inheritance . ' of ' |
|
108 | - . $membership->getCircleId() . ' anymore'; |
|
107 | + return $membership->getSingleId().' is not '.$inheritance.' of ' |
|
108 | + . $membership->getCircleId().' anymore'; |
|
109 | 109 | } |
110 | 110 | |
111 | - return $federatedUser->getUserId() . ' (' . Member::$TYPE[$federatedUser->getUserType()] |
|
112 | - . ') is not ' . $inheritance . ' of ' . $membership->getCircleId() . ' anymore'; |
|
111 | + return $federatedUser->getUserId().' ('.Member::$TYPE[$federatedUser->getUserType()] |
|
112 | + . ') is not '.$inheritance.' of '.$membership->getCircleId().' anymore'; |
|
113 | 113 | }, $event->getMemberships() |
114 | 114 | ); |
115 | 115 | |
116 | - $this->log(3, $prefix . implode('. ', $memberships)); |
|
116 | + $this->log(3, $prefix.implode('. ', $memberships)); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | } |
@@ -104,16 +104,16 @@ |
||
104 | 104 | } catch (Exception $e) { |
105 | 105 | $this->e($e); |
106 | 106 | |
107 | - return $membership->getSingleId() . ' is now ' . $inheritance . ' of ' |
|
107 | + return $membership->getSingleId().' is now '.$inheritance.' of ' |
|
108 | 108 | . $membership->getCircleId(); |
109 | 109 | } |
110 | 110 | |
111 | - return $federatedUser->getUserId() . ' (' . Member::$TYPE[$federatedUser->getUserType()] |
|
112 | - . ') is now ' . $inheritance . ' of ' . $membership->getCircleId(); |
|
111 | + return $federatedUser->getUserId().' ('.Member::$TYPE[$federatedUser->getUserType()] |
|
112 | + . ') is now '.$inheritance.' of '.$membership->getCircleId(); |
|
113 | 113 | }, $event->getMemberships() |
114 | 114 | ); |
115 | 115 | |
116 | - $this->log(3, $prefix . implode('. ', $memberships)); |
|
116 | + $this->log(3, $prefix.implode('. ', $memberships)); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | } |
@@ -644,7 +644,7 @@ |
||
644 | 644 | * @param string $alias |
645 | 645 | * @param IFederatedUser|null $initiator |
646 | 646 | * @param string $field |
647 | - * @param string $helpedAlias |
|
647 | + * @param string $helperAlias |
|
648 | 648 | * |
649 | 649 | * @throws RequestBuilderException |
650 | 650 | */ |
@@ -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); |
@@ -934,11 +934,11 @@ discard block |
||
934 | 934 | |
935 | 935 | $expr = $this->expr(); |
936 | 936 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); |
937 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); |
|
937 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); |
|
938 | 938 | if ($level > 1) { |
939 | 939 | $this->andWhere( |
940 | 940 | $expr->gte( |
941 | - $aliasMembership . '.level', |
|
941 | + $aliasMembership.'.level', |
|
942 | 942 | $this->createNamedParameter($level, IQueryBuilder::PARAM_INT) |
943 | 943 | ) |
944 | 944 | ); |
@@ -966,8 +966,8 @@ discard block |
||
966 | 966 | $this->leftJoin( |
967 | 967 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
968 | 968 | $expr->andX( |
969 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field), |
|
970 | - $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') |
|
969 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field), |
|
970 | + $expr->eq($aliasMembership.'.single_id', $alias.'.single_id') |
|
971 | 971 | ) |
972 | 972 | ); |
973 | 973 | |
@@ -980,8 +980,8 @@ discard block |
||
980 | 980 | ->leftJoin( |
981 | 981 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, |
982 | 982 | $expr->andX( |
983 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), |
|
984 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') |
|
983 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), |
|
984 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') |
|
985 | 985 | ) |
986 | 986 | ); |
987 | 987 | } |
@@ -1047,7 +1047,7 @@ discard block |
||
1047 | 1047 | $aliasMembership, |
1048 | 1048 | $expr->andX( |
1049 | 1049 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasMembership), |
1050 | - $expr->eq($aliasMembership . '.circle_id', $helperAlias . '.' . $field) |
|
1050 | + $expr->eq($aliasMembership.'.circle_id', $helperAlias.'.'.$field) |
|
1051 | 1051 | ) |
1052 | 1052 | ); |
1053 | 1053 | |
@@ -1060,8 +1060,8 @@ discard block |
||
1060 | 1060 | $this->leftJoin( |
1061 | 1061 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
1062 | 1062 | $expr->andX( |
1063 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), |
|
1064 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') |
|
1063 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), |
|
1064 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') |
|
1065 | 1065 | ) |
1066 | 1066 | ); |
1067 | 1067 | |
@@ -1069,8 +1069,8 @@ discard block |
||
1069 | 1069 | $this->leftJoin( |
1070 | 1070 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
1071 | 1071 | $expr->andX( |
1072 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), |
|
1073 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') |
|
1072 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), |
|
1073 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') |
|
1074 | 1074 | ) |
1075 | 1075 | ); |
1076 | 1076 | |
@@ -1090,7 +1090,7 @@ discard block |
||
1090 | 1090 | $aliasInheritedByMembership = $this->generateAlias($aliasInheritedBy, self::MEMBERSHIPS); |
1091 | 1091 | $this->generateMembershipSelectAlias($aliasMembership, $aliasInheritedByMembership); |
1092 | 1092 | } catch (RequestBuilderException $e) { |
1093 | - \OC::$server->getLogger()->log(3, '-- ' . $e->getMessage()); |
|
1093 | + \OC::$server->getLogger()->log(3, '-- '.$e->getMessage()); |
|
1094 | 1094 | } |
1095 | 1095 | } |
1096 | 1096 | |
@@ -1114,7 +1114,7 @@ discard block |
||
1114 | 1114 | $orX = $expr->orX(); |
1115 | 1115 | $orX->add( |
1116 | 1116 | $expr->andX( |
1117 | - $expr->gte($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
1117 | + $expr->gte($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
1118 | 1118 | ) |
1119 | 1119 | ); |
1120 | 1120 | |
@@ -1122,7 +1122,7 @@ discard block |
||
1122 | 1122 | $orX->add( |
1123 | 1123 | $expr->andX( |
1124 | 1124 | $this->exprLimitBitwise('config', Circle::CFG_PERSONAL, $alias), |
1125 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1125 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1126 | 1126 | ) |
1127 | 1127 | ); |
1128 | 1128 | } |
@@ -1131,7 +1131,7 @@ discard block |
||
1131 | 1131 | } |
1132 | 1132 | if ($this->getBool('canBeVisitor', $options, false)) { |
1133 | 1133 | // TODO: should find a better way, also filter on remote initiator on non-federated ? |
1134 | - $orX->add($expr->gte($alias . '.config', $this->createNamedParameter(0))); |
|
1134 | + $orX->add($expr->gte($alias.'.config', $this->createNamedParameter(0))); |
|
1135 | 1135 | } |
1136 | 1136 | if ($this->getBool('canBeVisitorOnOpen', $options, false)) { |
1137 | 1137 | $andOpen = $expr->andX(); |
@@ -1199,21 +1199,21 @@ discard block |
||
1199 | 1199 | $expr = $this->expr(); |
1200 | 1200 | $andPassive = $expr->andX(); |
1201 | 1201 | $andPassive->add( |
1202 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1202 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1203 | 1203 | ); |
1204 | 1204 | |
1205 | 1205 | $orMemberOrLevel = $expr->orX(); |
1206 | 1206 | $orMemberOrLevel->add( |
1207 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance') |
|
1207 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance') |
|
1208 | 1208 | ); |
1209 | 1209 | // TODO: do we need this ? (display members from the local instance) |
1210 | 1210 | $orMemberOrLevel->add( |
1211 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance') |
|
1211 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance') |
|
1212 | 1212 | ); |
1213 | 1213 | |
1214 | 1214 | $orMemberOrLevel->add( |
1215 | 1215 | $expr->eq( |
1216 | - $this->getDefaultSelectAlias() . '.level', |
|
1216 | + $this->getDefaultSelectAlias().'.level', |
|
1217 | 1217 | $this->createNamedParameter(Member::LEVEL_OWNER) |
1218 | 1218 | ) |
1219 | 1219 | ); |
@@ -1250,11 +1250,11 @@ discard block |
||
1250 | 1250 | ) |
1251 | 1251 | ->leftJoin( |
1252 | 1252 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, |
1253 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') |
|
1253 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') |
|
1254 | 1254 | ) |
1255 | 1255 | ->leftJoin( |
1256 | 1256 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, |
1257 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') |
|
1257 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') |
|
1258 | 1258 | ); |
1259 | 1259 | } |
1260 | 1260 | |
@@ -1276,8 +1276,8 @@ discard block |
||
1276 | 1276 | $this->leftJoin( |
1277 | 1277 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, |
1278 | 1278 | $expr->andX( |
1279 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), |
|
1280 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') |
|
1279 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), |
|
1280 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') |
|
1281 | 1281 | ) |
1282 | 1282 | ); |
1283 | 1283 | |
@@ -1327,13 +1327,13 @@ discard block |
||
1327 | 1327 | $this->leftJoin( |
1328 | 1328 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, |
1329 | 1329 | $expr->andX( |
1330 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), |
|
1331 | - $expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id') |
|
1330 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), |
|
1331 | + $expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id') |
|
1332 | 1332 | ) |
1333 | 1333 | ); |
1334 | 1334 | |
1335 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); |
|
1336 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); |
|
1335 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); |
|
1336 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); |
|
1337 | 1337 | } |
1338 | 1338 | |
1339 | 1339 | |
@@ -1437,10 +1437,10 @@ discard block |
||
1437 | 1437 | */ |
1438 | 1438 | public function generateAlias(string $base, string $extension, ?array &$options = []): string { |
1439 | 1439 | $search = str_replace('_', '.', $base); |
1440 | - $path = $search . '.' . $extension; |
|
1440 | + $path = $search.'.'.$extension; |
|
1441 | 1441 | if (!$this->validKey($path, self::$SQL_PATH) |
1442 | 1442 | && !in_array($extension, $this->getArray($search, self::$SQL_PATH))) { |
1443 | - throw new RequestBuilderException($extension . ' not found in ' . $search); |
|
1443 | + throw new RequestBuilderException($extension.' not found in '.$search); |
|
1444 | 1444 | } |
1445 | 1445 | |
1446 | 1446 | if (!is_array($options)) { |
@@ -1449,15 +1449,15 @@ discard block |
||
1449 | 1449 | |
1450 | 1450 | $optionPath = ''; |
1451 | 1451 | foreach (explode('.', $path) as $p) { |
1452 | - $optionPath = trim($optionPath . '.' . $p, '.'); |
|
1452 | + $optionPath = trim($optionPath.'.'.$p, '.'); |
|
1453 | 1453 | $options = array_merge( |
1454 | 1454 | $options, |
1455 | - $this->getArray($optionPath . '.' . self::OPTIONS, self::$SQL_PATH), |
|
1456 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) |
|
1455 | + $this->getArray($optionPath.'.'.self::OPTIONS, self::$SQL_PATH), |
|
1456 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) |
|
1457 | 1457 | ); |
1458 | 1458 | } |
1459 | 1459 | |
1460 | - return $base . '_' . $extension; |
|
1460 | + return $base.'_'.$extension; |
|
1461 | 1461 | } |
1462 | 1462 | |
1463 | 1463 | |
@@ -1477,7 +1477,7 @@ discard block |
||
1477 | 1477 | } else { |
1478 | 1478 | $k = $arr; |
1479 | 1479 | } |
1480 | - $path[$k] = $prefix . '_' . $k . '_'; |
|
1480 | + $path[$k] = $prefix.'_'.$k.'_'; |
|
1481 | 1481 | } |
1482 | 1482 | |
1483 | 1483 | return $path; |