@@ -35,7 +35,6 @@ |
||
| 35 | 35 | |
| 36 | 36 | |
| 37 | 37 | /** * @deprecated |
| 38 | - |
|
| 39 | 38 | * Class GSSharesRequestBuilder |
| 40 | 39 | * |
| 41 | 40 | * @package OCA\Circles\Db |
@@ -216,8 +216,8 @@ discard block |
||
| 216 | 216 | $qb->filterDirectMembership(CoreQueryBuilder::MEMBER, $filter); |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - $qb->orderBy($qb->getDefaultSelectAlias() . '.level', 'desc'); |
|
| 220 | - $qb->addOrderBy($qb->getDefaultSelectAlias() . '.cached_name', 'asc'); |
|
| 219 | + $qb->orderBy($qb->getDefaultSelectAlias().'.level', 'desc'); |
|
| 220 | + $qb->addOrderBy($qb->getDefaultSelectAlias().'.cached_name', 'asc'); |
|
| 221 | 221 | |
| 222 | 222 | return $this->getItemsFromRequest($qb); |
| 223 | 223 | } |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $qb->limitToMembersByInheritance(CoreQueryBuilder::MEMBER, $singleId); |
| 242 | 242 | |
| 243 | 243 | $aliasMembership = $qb->generateAlias(CoreQueryBuilder::MEMBER, CoreQueryBuilder::MEMBERSHIPS); |
| 244 | - $qb->orderBy($aliasMembership . '.inheritance_depth', 'asc'); |
|
| 244 | + $qb->orderBy($aliasMembership.'.inheritance_depth', 'asc'); |
|
| 245 | 245 | // $qb->groupBy(CoreQueryBuilder::MEMBER . '.single_id'); |
| 246 | 246 | |
| 247 | 247 | return $this->getItemsFromRequest($qb); |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | $qb = $this->getMemberSelectSql(); |
| 279 | 279 | $qb->limitToCircleId($circleId); |
| 280 | 280 | |
| 281 | - $qb->andwhere($qb->expr()->nonEmptyString(CoreQueryBuilder::MEMBER . '.instance')); |
|
| 281 | + $qb->andwhere($qb->expr()->nonEmptyString(CoreQueryBuilder::MEMBER.'.instance')); |
|
| 282 | 282 | // $qb->groupBy(CoreQueryBuilder::MEMBER . '.instance'); |
| 283 | 283 | |
| 284 | 284 | return array_map( |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | */ |
| 335 | 335 | public function searchFederatedUsers(string $needle): array { |
| 336 | 336 | $qb = $this->getMemberSelectSql(); |
| 337 | - $qb->searchInDBField('user_id', '%' . $needle . '%'); |
|
| 337 | + $qb->searchInDBField('user_id', '%'.$needle.'%'); |
|
| 338 | 338 | // $qb->groupBy('single_id'); |
| 339 | 339 | |
| 340 | 340 | return $this->getItemsFromRequest($qb, true); |
@@ -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 |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | throw new Exception('Please specify a --type for the test'); |
| 173 | 173 | } |
| 174 | 174 | if ($test !== '' && !in_array($type, self::$checks)) { |
| 175 | - throw new Exception('Unknown type: ' . implode(', ', self::$checks)); |
|
| 175 | + throw new Exception('Unknown type: '.implode(', ', self::$checks)); |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | // $this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test); |
@@ -274,14 +274,14 @@ discard block |
||
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | $output->writeln(''); |
| 277 | - $output->writeln('* testing current address: ' . $test); |
|
| 277 | + $output->writeln('* testing current address: '.$test); |
|
| 278 | 278 | |
| 279 | 279 | try { |
| 280 | 280 | $this->setupLoopback($input, $output, $test); |
| 281 | 281 | $output->writeln('* <info>Loopback</info> address looks good'); |
| 282 | 282 | $output->writeln('saving'); |
| 283 | 283 | } catch (Exception $e) { |
| 284 | - $output->writeln('<error>' . $e->getMessage() . '</error>'); |
|
| 284 | + $output->writeln('<error>'.$e->getMessage().'</error>'); |
|
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | $output->writeln('- You do not have a valid <info>loopback</info> address setup right now.'); |
@@ -305,8 +305,8 @@ discard block |
||
| 305 | 305 | continue; |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | - $loopback = $scheme . '://' . $cloudId; |
|
| 309 | - $output->write('* testing address: ' . $loopback . ' '); |
|
| 308 | + $loopback = $scheme.'://'.$cloudId; |
|
| 309 | + $output->write('* testing address: '.$loopback.' '); |
|
| 310 | 310 | |
| 311 | 311 | if ($this->testLoopback($input, $output, $loopback)) { |
| 312 | 312 | $output->writeln('<info>ok</info>'); |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_SCHEME, $scheme); |
| 315 | 315 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId); |
| 316 | 316 | $output->writeln( |
| 317 | - '- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>' |
|
| 317 | + '- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>' |
|
| 318 | 318 | ); |
| 319 | 319 | |
| 320 | 320 | return; |
@@ -493,7 +493,7 @@ discard block |
||
| 493 | 493 | continue; |
| 494 | 494 | } |
| 495 | 495 | |
| 496 | - $frontal = $scheme . '://' . $cloudId; |
|
| 496 | + $frontal = $scheme.'://'.$cloudId; |
|
| 497 | 497 | break; |
| 498 | 498 | } |
| 499 | 499 | |
@@ -507,13 +507,13 @@ discard block |
||
| 507 | 507 | 'You will need to run this <info>curl</info> command from a remote terminal and paste its result: ' |
| 508 | 508 | ); |
| 509 | 509 | $output->writeln( |
| 510 | - ' curl ' . $frontal . '/.well-known/webfinger?resource=http://nextcloud.com/' |
|
| 510 | + ' curl '.$frontal.'/.well-known/webfinger?resource=http://nextcloud.com/' |
|
| 511 | 511 | ); |
| 512 | 512 | |
| 513 | 513 | $question = new Question('result: ', ''); |
| 514 | 514 | $pasteWebfinger = $helper->ask($input, $output, $question); |
| 515 | 515 | |
| 516 | - echo '__ ' . $pasteWebfinger; |
|
| 516 | + echo '__ '.$pasteWebfinger; |
|
| 517 | 517 | |
| 518 | 518 | $output->writeln('TESTING !!'); |
| 519 | 519 | $output->writeln('TESTING !!'); |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | $this->configService->configureLoopbackRequest($request, $route, $args); |
| 638 | 638 | $request->setFollowLocation(false); |
| 639 | 639 | |
| 640 | - $output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
| 640 | + $output->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
| 641 | 641 | $this->doRequest($request); |
| 642 | 642 | |
| 643 | 643 | $color = 'error'; |
@@ -646,7 +646,7 @@ discard block |
||
| 646 | 646 | $color = 'info'; |
| 647 | 647 | } |
| 648 | 648 | |
| 649 | - $output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>'); |
|
| 649 | + $output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>'); |
|
| 650 | 650 | |
| 651 | 651 | if ($result->getStatusCode() === 200) { |
| 652 | 652 | return true; |
@@ -668,7 +668,7 @@ discard block |
||
| 668 | 668 | |
| 669 | 669 | $output->writeln(''); |
| 670 | 670 | $output->writeln( |
| 671 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
| 671 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
| 672 | 672 | ); |
| 673 | 673 | |
| 674 | 674 | $helper = $this->getHelper('question'); |
@@ -685,8 +685,8 @@ discard block |
||
| 685 | 685 | |
| 686 | 686 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
| 687 | 687 | $output->writeln( |
| 688 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
| 689 | - . $address . '\'</info> stored in database' |
|
| 688 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
| 689 | + . $address.'\'</info> stored in database' |
|
| 690 | 690 | ); |
| 691 | 691 | } |
| 692 | 692 | |
@@ -707,7 +707,7 @@ discard block |
||
| 707 | 707 | } |
| 708 | 708 | |
| 709 | 709 | if (!is_null($cloudIdPort)) { |
| 710 | - $cloudId = $cloudId . ':' . $cloudIdPort; |
|
| 710 | + $cloudId = $cloudId.':'.$cloudIdPort; |
|
| 711 | 711 | } |
| 712 | 712 | |
| 713 | 713 | return [$scheme, $cloudId]; |
@@ -32,7 +32,6 @@ |
||
| 32 | 32 | namespace OCA\Circles\Handlers; |
| 33 | 33 | |
| 34 | 34 | |
| 35 | -use daita\MySmallPhpTools\Exceptions\SignatoryException; |
|
| 36 | 35 | use daita\MySmallPhpTools\Exceptions\SignatureException; |
| 37 | 36 | use daita\MySmallPhpTools\Traits\TArrayTools; |
| 38 | 37 | use OC\URLGenerator; |
@@ -572,7 +572,7 @@ |
||
| 572 | 572 | } |
| 573 | 573 | |
| 574 | 574 | /** |
| 575 | - * @return array |
|
| 575 | + * @return string |
|
| 576 | 576 | */ |
| 577 | 577 | public function getValidLocalInstances(): array { |
| 578 | 578 | return array_filter( |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | return $value; |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | - if (($value = $this->config->getSystemValue('circles.' . $key, '')) !== '') { |
|
| 137 | + if (($value = $this->config->getSystemValue('circles.'.$key, '')) !== '') { |
|
| 138 | 138 | return $value; |
| 139 | 139 | } |
| 140 | 140 | |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | if (array_key_exists('port', $loopback)) { |
| 387 | - $loopbackCloudId = $loopback['host'] . ':' . $loopback['port']; |
|
| 387 | + $loopbackCloudId = $loopback['host'].':'.$loopback['port']; |
|
| 388 | 388 | } else { |
| 389 | 389 | $loopbackCloudId = $loopback['host']; |
| 390 | 390 | } |
@@ -413,12 +413,12 @@ discard block |
||
| 413 | 413 | $scheme = $this->getAppValue(self::LOOPBACK_CLOUD_SCHEME); |
| 414 | 414 | } |
| 415 | 415 | |
| 416 | - $base = $scheme . '://' . $instance; |
|
| 416 | + $base = $scheme.'://'.$instance; |
|
| 417 | 417 | if ($route === '') { |
| 418 | 418 | return $base; |
| 419 | 419 | } |
| 420 | 420 | |
| 421 | - return $base . $this->urlGenerator->linkToRoute($route, $args); |
|
| 421 | + return $base.$this->urlGenerator->linkToRoute($route, $args); |
|
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | |
@@ -475,9 +475,9 @@ discard block |
||
| 475 | 475 | array $args = [] |
| 476 | 476 | ): string { |
| 477 | 477 | if ($internal && $this->getInternalInstance() !== '') { |
| 478 | - $base = $this->getAppValue(self::INTERNAL_CLOUD_SCHEME) . '://' . $this->getInternalInstance(); |
|
| 478 | + $base = $this->getAppValue(self::INTERNAL_CLOUD_SCHEME).'://'.$this->getInternalInstance(); |
|
| 479 | 479 | } else if ($this->getFrontalInstance() !== '') { |
| 480 | - $base = $this->getAppValue(self::FRONTAL_CLOUD_SCHEME) . '://' . $this->getFrontalInstance(); |
|
| 480 | + $base = $this->getAppValue(self::FRONTAL_CLOUD_SCHEME).'://'.$this->getFrontalInstance(); |
|
| 481 | 481 | } else { |
| 482 | 482 | throw new RemoteInstanceException('not enabled'); |
| 483 | 483 | } |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | return $base; |
| 487 | 487 | } |
| 488 | 488 | |
| 489 | - return $base . $this->urlGenerator->linkToRoute($route, $args); |
|
| 489 | + return $base.$this->urlGenerator->linkToRoute($route, $args); |
|
| 490 | 490 | } |
| 491 | 491 | |
| 492 | 492 | /** |
@@ -634,7 +634,7 @@ discard block |
||
| 634 | 634 | $ncBase = substr($ncBase, 0, -strlen($forcedPath)); |
| 635 | 635 | } |
| 636 | 636 | |
| 637 | - return rtrim($ncBase, '/') . $link; |
|
| 637 | + return rtrim($ncBase, '/').$link; |
|
| 638 | 638 | } |
| 639 | 639 | |
| 640 | 640 | } |