@@ -40,10 +40,10 @@ |
||
40 | 40 | |
41 | 41 | |
42 | 42 | /** |
43 | - * @param $userId |
|
43 | + * @param string $userId |
|
44 | 44 | * @param $circleUniqueIds |
45 | - * @param $limit |
|
46 | - * @param $offset |
|
45 | + * @param integer $limit |
|
46 | + * @param integer $offset |
|
47 | 47 | * |
48 | 48 | * @return array |
49 | 49 | * @throws GSStatusException |
@@ -35,7 +35,6 @@ |
||
35 | 35 | |
36 | 36 | |
37 | 37 | /** * @deprecated |
38 | - |
|
39 | 38 | * Class GSSharesRequestBuilder |
40 | 39 | * |
41 | 40 | * @package OCA\Circles\Db |
@@ -77,7 +77,7 @@ |
||
77 | 77 | $qb = $this->getQueryBuilder(); |
78 | 78 | $qb->generateSelect(self::TABLE_CIRCLE, self::$tables[self::TABLE_CIRCLE], $alias, true) |
79 | 79 | ->generateGroupBy(self::$tables[self::TABLE_CIRCLE], $alias) |
80 | - ->orderBy($alias . '.creation', 'asc'); |
|
80 | + ->orderBy($alias.'.creation', 'asc'); |
|
81 | 81 | |
82 | 82 | return $qb; |
83 | 83 | } |
@@ -182,10 +182,10 @@ discard block |
||
182 | 182 | $qb->leftJoin( |
183 | 183 | CoreQueryBuilder::REMOTE, self::TABLE_MEMBER, $aliasMember, |
184 | 184 | $expr->andX( |
185 | - $expr->eq($aliasMember . '.circle_id', $qb->createNamedParameter($circle->getSingleId())), |
|
186 | - $expr->eq($aliasMember . '.instance', CoreQueryBuilder::REMOTE . '.instance'), |
|
185 | + $expr->eq($aliasMember.'.circle_id', $qb->createNamedParameter($circle->getSingleId())), |
|
186 | + $expr->eq($aliasMember.'.instance', CoreQueryBuilder::REMOTE.'.instance'), |
|
187 | 187 | $expr->gte( |
188 | - $aliasMember . '.level', |
|
188 | + $aliasMember.'.level', |
|
189 | 189 | $qb->createNamedParameter(Member::LEVEL_MEMBER, IQueryBuilder::PARAM_INT) |
190 | 190 | ) |
191 | 191 | ) |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | |
194 | 194 | $external = $expr->andX(); |
195 | 195 | $external->add($qb->exprLimitToDBField('type', RemoteInstance::TYPE_EXTERNAL, true, false)); |
196 | - $external->add($expr->isNotNull($aliasMember . '.instance')); |
|
196 | + $external->add($expr->isNotNull($aliasMember.'.instance')); |
|
197 | 197 | $orX->add($external); |
198 | 198 | } |
199 | 199 |
@@ -89,7 +89,7 @@ |
||
89 | 89 | CoreQueryBuilder::MEMBER |
90 | 90 | ) |
91 | 91 | ->generateGroupBy(self::$tables[self::TABLE_MEMBER], CoreQueryBuilder::MEMBER) |
92 | - ->orderBy(CoreQueryBuilder::MEMBER . '.joined'); |
|
92 | + ->orderBy(CoreQueryBuilder::MEMBER.'.joined'); |
|
93 | 93 | |
94 | 94 | if ($getBasedOn) { |
95 | 95 | $qb->leftJoinBasedOn(CoreQueryBuilder::MEMBER, $initiator); |
@@ -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 |