@@ -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]; |
@@ -179,11 +179,11 @@ discard block |
||
179 | 179 | $this->federatedUserService->commandLineInitiator($initiator, $circleId, true); |
180 | 180 | $circle = $this->circleService->getCircle($circleId); |
181 | 181 | |
182 | - $output->writeln('<info>Name</info>: ' . $circle->getName()); |
|
182 | + $output->writeln('<info>Name</info>: '.$circle->getName()); |
|
183 | 183 | $owner = $circle->getOwner(); |
184 | - $output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance()); |
|
184 | + $output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance()); |
|
185 | 185 | $type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
186 | - $output->writeln('<info>Config</info>: ' . $type); |
|
186 | + $output->writeln('<info>Config</info>: '.$type); |
|
187 | 187 | $output->writeln(' '); |
188 | 188 | |
189 | 189 | $tree = new NC22TreeNode(null, new SimpleDataStore(['circle' => $circle])); |
@@ -247,8 +247,7 @@ discard block |
||
247 | 247 | ($this->input->getOption('display-name')) ? |
248 | 248 | $member->getBasedOn()->getDisplayName() : $member->getUserId(), |
249 | 249 | $this->configService->displayInstance($member->getInstance()), |
250 | - ($level > 0) ? Member::$DEF_LEVEL[$level] : |
|
251 | - '(' . strtolower($member->getStatus()) . ')' |
|
250 | + ($level > 0) ? Member::$DEF_LEVEL[$level] : '('.strtolower($member->getStatus()).')' |
|
252 | 251 | ] |
253 | 252 | ); |
254 | 253 | } |
@@ -389,17 +388,17 @@ discard block |
||
389 | 388 | $member = $data->gObj('member', Member::class); |
390 | 389 | |
391 | 390 | if ($lineNumber === 1) { |
392 | - $line .= '<info>' . $member->getSingleId() . '</info>'; |
|
391 | + $line .= '<info>'.$member->getSingleId().'</info>'; |
|
393 | 392 | if (!$this->configService->isLocalInstance($member->getInstance())) { |
394 | - $line .= '@' . $member->getInstance(); |
|
393 | + $line .= '@'.$member->getInstance(); |
|
395 | 394 | } |
396 | - $line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')'; |
|
395 | + $line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')'; |
|
397 | 396 | |
398 | 397 | $name = ($this->input->getOption('display-name')) ? |
399 | 398 | $member->getBasedOn()->getDisplayName() : $member->getUserId(); |
400 | - $line .= ' <info>Name</info>: ' . $name; |
|
399 | + $line .= ' <info>Name</info>: '.$name; |
|
401 | 400 | $source = ($member->hasBasedOn()) ? $member->getBasedOn()->getSource() : ''; |
402 | - $line .= ' <info>Source</info>: ' . Circle::$DEF_SOURCE[$source]; |
|
401 | + $line .= ' <info>Source</info>: '.Circle::$DEF_SOURCE[$source]; |
|
403 | 402 | } |
404 | 403 | |
405 | 404 | if ($lineNumber === 2) { |
@@ -411,16 +410,16 @@ discard block |
||
411 | 410 | return $line; |
412 | 411 | } |
413 | 412 | $owner = $circle->getOwner(); |
414 | - $line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance(); |
|
413 | + $line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance(); |
|
415 | 414 | $type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
416 | - $line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type; |
|
415 | + $line .= ($type === '') ? '' : ' <info>Config</info>: '.$type; |
|
417 | 416 | } |
418 | 417 | |
419 | 418 | } else { |
420 | 419 | if ($lineNumber === 1 && !is_null($circle)) { |
421 | - $line .= '<info>' . $circle->getSingleId() . '</info>'; |
|
420 | + $line .= '<info>'.$circle->getSingleId().'</info>'; |
|
422 | 421 | if (!$this->configService->isLocalInstance($circle->getInstance())) { |
423 | - $line .= '@' . $circle->getInstance(); |
|
422 | + $line .= '@'.$circle->getInstance(); |
|
424 | 423 | } |
425 | 424 | } |
426 | 425 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | * @param int $config |
249 | 249 | */ |
250 | 250 | public function limitToConfigFlag(int $config): void { |
251 | - $this->andWhere($this->expr()->bitwiseAnd($this->getDefaultSelectAlias() . '.config', $config)); |
|
251 | + $this->andWhere($this->expr()->bitwiseAnd($this->getDefaultSelectAlias().'.config', $config)); |
|
252 | 252 | } |
253 | 253 | |
254 | 254 | |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | } |
333 | 333 | |
334 | 334 | if ($circle->getDisplayName() !== '') { |
335 | - $this->searchInDBField('display_name', '%' . $circle->getDisplayName() . '%'); |
|
335 | + $this->searchInDBField('display_name', '%'.$circle->getDisplayName().'%'); |
|
336 | 336 | } |
337 | 337 | } |
338 | 338 | |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | $this->generateRemoteInstanceSelectAlias($aliasRemoteInstance) |
349 | 349 | ->leftJoin( |
350 | 350 | $alias, CoreRequestBuilder::TABLE_REMOTE, $aliasRemoteInstance, |
351 | - $expr->eq($alias . '.instance', $aliasRemoteInstance . '.instance') |
|
351 | + $expr->eq($alias.'.instance', $aliasRemoteInstance.'.instance') |
|
352 | 352 | ); |
353 | 353 | } catch (RequestBuilderException $e) { |
354 | 354 | } |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | $expr = $this->expr(); |
402 | 402 | $this->leftJoin( |
403 | 403 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_REMOTE, $aliasRemote, |
404 | - $expr->eq($aliasRemote . '.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
404 | + $expr->eq($aliasRemote.'.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
405 | 405 | ); |
406 | 406 | } |
407 | 407 | |
@@ -429,12 +429,12 @@ discard block |
||
429 | 429 | $this->leftJoin( |
430 | 430 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteMember, |
431 | 431 | $expr->andX( |
432 | - $expr->eq($aliasRemoteMember . '.circle_id', $aliasCircle . '.unique_id'), |
|
432 | + $expr->eq($aliasRemoteMember.'.circle_id', $aliasCircle.'.unique_id'), |
|
433 | 433 | $expr->eq( |
434 | - $aliasRemoteMember . '.instance', |
|
434 | + $aliasRemoteMember.'.instance', |
|
435 | 435 | $this->createNamedParameter($remoteInstance->getInstance()) |
436 | 436 | ), |
437 | - $expr->gte($aliasRemoteMember . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
437 | + $expr->gte($aliasRemoteMember.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
438 | 438 | ) |
439 | 439 | ); |
440 | 440 | } |
@@ -466,21 +466,21 @@ discard block |
||
466 | 466 | $this->leftJoin( |
467 | 467 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircle, |
468 | 468 | $expr->andX( |
469 | - $expr->eq($aliasRemoteCircle . '.single_id', $aliasCircle . '.unique_id'), |
|
470 | - $expr->emptyString($aliasRemoteCircle . '.instance'), |
|
471 | - $expr->gte($aliasRemoteCircle . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
469 | + $expr->eq($aliasRemoteCircle.'.single_id', $aliasCircle.'.unique_id'), |
|
470 | + $expr->emptyString($aliasRemoteCircle.'.instance'), |
|
471 | + $expr->gte($aliasRemoteCircle.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
472 | 472 | ) |
473 | 473 | ); |
474 | 474 | $this->leftJoin( |
475 | 475 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircleOwner, |
476 | 476 | $expr->andX( |
477 | - $expr->eq($aliasRemoteCircle . '.circle_id', $aliasRemoteCircleOwner . '.circle_id'), |
|
477 | + $expr->eq($aliasRemoteCircle.'.circle_id', $aliasRemoteCircleOwner.'.circle_id'), |
|
478 | 478 | $expr->eq( |
479 | - $aliasRemoteCircleOwner . '.instance', |
|
479 | + $aliasRemoteCircleOwner.'.instance', |
|
480 | 480 | $this->createNamedParameter($remoteInstance->getInstance()) |
481 | 481 | ), |
482 | 482 | $expr->eq( |
483 | - $aliasRemoteCircleOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
483 | + $aliasRemoteCircleOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
484 | 484 | ) |
485 | 485 | ) |
486 | 486 | ); |
@@ -513,16 +513,16 @@ discard block |
||
513 | 513 | $expr = $this->expr(); |
514 | 514 | $orX = $expr->orX(); |
515 | 515 | $orX->add( |
516 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
516 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
517 | 517 | ); |
518 | 518 | |
519 | 519 | $orExtOrPassive = $expr->orX(); |
520 | 520 | $orExtOrPassive->add( |
521 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
521 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
522 | 522 | ); |
523 | 523 | if (!$sensitive) { |
524 | 524 | $orExtOrPassive->add( |
525 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
525 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
526 | 526 | ); |
527 | 527 | } else { |
528 | 528 | if ($this->getDefaultSelectAlias() === CoreQueryBuilder::MEMBER) { |
@@ -531,8 +531,8 @@ discard block |
||
531 | 531 | } |
532 | 532 | |
533 | 533 | $orInstance = $expr->orX(); |
534 | - $orInstance->add($expr->isNotNull($aliasRemoteMember . '.instance')); |
|
535 | - $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner . '.instance')); |
|
534 | + $orInstance->add($expr->isNotNull($aliasRemoteMember.'.instance')); |
|
535 | + $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner.'.instance')); |
|
536 | 536 | |
537 | 537 | $andExternal = $expr->andX(); |
538 | 538 | $andExternal->add($orExtOrPassive); |
@@ -541,13 +541,13 @@ discard block |
||
541 | 541 | $orExtOrTrusted = $expr->orX(); |
542 | 542 | $orExtOrTrusted->add($andExternal); |
543 | 543 | $orExtOrTrusted->add( |
544 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
544 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
545 | 545 | ); |
546 | 546 | |
547 | 547 | $andTrusted = $expr->andX(); |
548 | 548 | $andTrusted->add($orExtOrTrusted); |
549 | - $andTrusted->add($expr->bitwiseAnd($aliasCircle . '.config', Circle::CFG_FEDERATED)); |
|
550 | - $andTrusted->add($expr->emptyString($aliasOwner . '.instance')); |
|
549 | + $andTrusted->add($expr->bitwiseAnd($aliasCircle.'.config', Circle::CFG_FEDERATED)); |
|
550 | + $andTrusted->add($expr->emptyString($aliasOwner.'.instance')); |
|
551 | 551 | $orX->add($andTrusted); |
552 | 552 | |
553 | 553 | $this->andWhere($orX); |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | } |
575 | 575 | $this->leftJoin( |
576 | 576 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
577 | - $expr->eq($aliasMember . '.circle_id', $alias . '.unique_id') |
|
577 | + $expr->eq($aliasMember.'.circle_id', $alias.'.unique_id') |
|
578 | 578 | ); |
579 | 579 | |
580 | 580 | $this->filterDirectMembership($aliasMember, $member); |
@@ -595,28 +595,28 @@ discard block |
||
595 | 595 | |
596 | 596 | if ($member->getUserId() !== '') { |
597 | 597 | $andX->add( |
598 | - $expr->eq($aliasMember . '.user_id', $this->createNamedParameter($member->getUserId())) |
|
598 | + $expr->eq($aliasMember.'.user_id', $this->createNamedParameter($member->getUserId())) |
|
599 | 599 | ); |
600 | 600 | } |
601 | 601 | |
602 | 602 | if ($member->getSingleId() !== '') { |
603 | 603 | $andX->add( |
604 | - $expr->eq($aliasMember . '.single_id', $this->createNamedParameter($member->getSingleId())) |
|
604 | + $expr->eq($aliasMember.'.single_id', $this->createNamedParameter($member->getSingleId())) |
|
605 | 605 | ); |
606 | 606 | } |
607 | 607 | |
608 | 608 | if ($member->getUserType() > 0) { |
609 | 609 | $andX->add( |
610 | - $expr->eq($aliasMember . '.user_type', $this->createNamedParameter($member->getUserType())) |
|
610 | + $expr->eq($aliasMember.'.user_type', $this->createNamedParameter($member->getUserType())) |
|
611 | 611 | ); |
612 | 612 | } |
613 | 613 | |
614 | 614 | $andX->add( |
615 | - $expr->eq($aliasMember . '.instance', $this->createNamedParameter($this->getInstance($member))) |
|
615 | + $expr->eq($aliasMember.'.instance', $this->createNamedParameter($this->getInstance($member))) |
|
616 | 616 | ); |
617 | 617 | |
618 | 618 | if ($member->getLevel() > 0) { |
619 | - $andX->add($expr->gte($aliasMember . '.level', $this->createNamedParameter($member->getLevel()))); |
|
619 | + $andX->add($expr->gte($aliasMember.'.level', $this->createNamedParameter($member->getLevel()))); |
|
620 | 620 | } |
621 | 621 | |
622 | 622 | $this->andWhere($andX); |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | |
650 | 650 | $this->leftJoin( |
651 | 651 | $alias, CoreRequestBuilder::TABLE_CIRCLE, $aliasCircle, |
652 | - $expr->eq($aliasCircle . '.unique_id', $alias . '.' . $field) |
|
652 | + $expr->eq($aliasCircle.'.unique_id', $alias.'.'.$field) |
|
653 | 653 | ); |
654 | 654 | |
655 | 655 | if (!is_null($initiator)) { |
@@ -691,7 +691,7 @@ discard block |
||
691 | 691 | $this->generateCircleSelectAlias($aliasBasedOn) |
692 | 692 | ->leftJoin( |
693 | 693 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasBasedOn, |
694 | - $expr->eq($aliasBasedOn . '.unique_id', $aliasMember . '.single_id') |
|
694 | + $expr->eq($aliasBasedOn.'.unique_id', $aliasMember.'.single_id') |
|
695 | 695 | ); |
696 | 696 | |
697 | 697 | if (!is_null($initiator)) { |
@@ -724,9 +724,9 @@ discard block |
||
724 | 724 | ->leftJoin( |
725 | 725 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
726 | 726 | $expr->andX( |
727 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $field), |
|
727 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$field), |
|
728 | 728 | $expr->eq( |
729 | - $aliasMember . '.level', |
|
729 | + $aliasMember.'.level', |
|
730 | 730 | $this->createNamedParameter(Member::LEVEL_OWNER, self::PARAM_INT) |
731 | 731 | ) |
732 | 732 | ) |
@@ -764,10 +764,10 @@ discard block |
||
764 | 764 | ->leftJoin( |
765 | 765 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
766 | 766 | $expr->andX( |
767 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $fieldCircleId), |
|
768 | - $expr->eq($aliasMember . '.single_id', $alias . '.' . $fieldSingleId), |
|
767 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$fieldCircleId), |
|
768 | + $expr->eq($aliasMember.'.single_id', $alias.'.'.$fieldSingleId), |
|
769 | 769 | $expr->gte( |
770 | - $aliasMember . '.level', |
|
770 | + $aliasMember.'.level', |
|
771 | 771 | $this->createNamedParameter(Member::LEVEL_MEMBER, self::PARAM_INT) |
772 | 772 | ) |
773 | 773 | ) |
@@ -797,7 +797,7 @@ discard block |
||
797 | 797 | |
798 | 798 | $this->leftJoin( |
799 | 799 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
800 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
800 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
801 | 801 | ); |
802 | 802 | |
803 | 803 | // if (!$this->getBool('getData', $options, false)) { |
@@ -811,8 +811,8 @@ discard block |
||
811 | 811 | ->leftJoin( |
812 | 812 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
813 | 813 | $expr->andX( |
814 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id'), |
|
815 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id') |
|
814 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id'), |
|
815 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id') |
|
816 | 816 | ) |
817 | 817 | ); |
818 | 818 | |
@@ -829,12 +829,12 @@ discard block |
||
829 | 829 | $aliasUpstreamMembership = $this->generateAlias($alias, self::UPSTREAM_MEMBERSHIPS, $options); |
830 | 830 | $this->leftJoin( |
831 | 831 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasUpstreamMembership, |
832 | - $expr->eq($aliasUpstreamMembership . '.single_id', $this->createNamedParameter($singleId)) |
|
832 | + $expr->eq($aliasUpstreamMembership.'.single_id', $this->createNamedParameter($singleId)) |
|
833 | 833 | ); |
834 | 834 | |
835 | 835 | $orX = $expr->orX( |
836 | - $expr->eq($aliasUpstreamMembership . '.circle_id', $alias . '.' . $field), |
|
837 | - $expr->eq($alias . '.' . $field, $this->createNamedParameter($singleId)) |
|
836 | + $expr->eq($aliasUpstreamMembership.'.circle_id', $alias.'.'.$field), |
|
837 | + $expr->eq($alias.'.'.$field, $this->createNamedParameter($singleId)) |
|
838 | 838 | ); |
839 | 839 | |
840 | 840 | $this->andWhere($orX); |
@@ -854,7 +854,7 @@ discard block |
||
854 | 854 | |
855 | 855 | $expr = $this->expr(); |
856 | 856 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); |
857 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); |
|
857 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); |
|
858 | 858 | } |
859 | 859 | |
860 | 860 | |
@@ -878,7 +878,7 @@ discard block |
||
878 | 878 | $this->leftJoin( |
879 | 879 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
880 | 880 | // $expr->andX( |
881 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field) |
|
881 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field) |
|
882 | 882 | // $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') |
883 | 883 | // ) |
884 | 884 | ); |
@@ -892,8 +892,8 @@ discard block |
||
892 | 892 | ->leftJoin( |
893 | 893 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, |
894 | 894 | $expr->andX( |
895 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), |
|
896 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') |
|
895 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), |
|
896 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') |
|
897 | 897 | ) |
898 | 898 | ); |
899 | 899 | } |
@@ -941,10 +941,10 @@ discard block |
||
941 | 941 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
942 | 942 | $expr->andX( |
943 | 943 | $expr->eq( |
944 | - $aliasMembership . '.single_id', |
|
944 | + $aliasMembership.'.single_id', |
|
945 | 945 | $this->createNamedParameter($initiator->getSingleId()) |
946 | 946 | ), |
947 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
947 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
948 | 948 | ) |
949 | 949 | ); |
950 | 950 | |
@@ -957,8 +957,8 @@ discard block |
||
957 | 957 | $this->leftJoin( |
958 | 958 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
959 | 959 | $expr->andX( |
960 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), |
|
961 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') |
|
960 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), |
|
961 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') |
|
962 | 962 | ) |
963 | 963 | ); |
964 | 964 | |
@@ -966,8 +966,8 @@ discard block |
||
966 | 966 | $this->leftJoin( |
967 | 967 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
968 | 968 | $expr->andX( |
969 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), |
|
970 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') |
|
969 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), |
|
970 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') |
|
971 | 971 | ) |
972 | 972 | ); |
973 | 973 | |
@@ -986,7 +986,7 @@ discard block |
||
986 | 986 | $aliasInheritedByMembership = $this->generateAlias($aliasInheritedBy, self::MEMBERSHIPS); |
987 | 987 | $this->generateMembershipSelectAlias($aliasMembership, $aliasInheritedByMembership); |
988 | 988 | } catch (RequestBuilderException $e) { |
989 | - \OC::$server->getLogger()->log(3, '-- ' . $e->getMessage()); |
|
989 | + \OC::$server->getLogger()->log(3, '-- '.$e->getMessage()); |
|
990 | 990 | } |
991 | 991 | } |
992 | 992 | |
@@ -1011,24 +1011,24 @@ discard block |
||
1011 | 1011 | $orX = $expr->orX(); |
1012 | 1012 | $orX->add( |
1013 | 1013 | $expr->andX( |
1014 | - $expr->gte($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
1014 | + $expr->gte($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
1015 | 1015 | ) |
1016 | 1016 | ); |
1017 | 1017 | |
1018 | 1018 | if ($getPersonalCircle) { |
1019 | 1019 | $orX->add( |
1020 | 1020 | $expr->andX( |
1021 | - $expr->bitwiseAnd($alias . '.config', Circle::CFG_PERSONAL), |
|
1022 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1021 | + $expr->bitwiseAnd($alias.'.config', Circle::CFG_PERSONAL), |
|
1022 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1023 | 1023 | ) |
1024 | 1024 | ); |
1025 | 1025 | } |
1026 | 1026 | if (!$mustBeMember) { |
1027 | - $orX->add($expr->bitwiseAnd($alias . '.config', Circle::CFG_VISIBLE)); |
|
1027 | + $orX->add($expr->bitwiseAnd($alias.'.config', Circle::CFG_VISIBLE)); |
|
1028 | 1028 | } |
1029 | 1029 | if ($canBeVisitor) { |
1030 | 1030 | // TODO: should find a better way, also filter on remote initiator on non-federated ? |
1031 | - $orX->add($expr->gte($alias . '.config', $this->createNamedParameter(0))); |
|
1031 | + $orX->add($expr->gte($alias.'.config', $this->createNamedParameter(0))); |
|
1032 | 1032 | } |
1033 | 1033 | $this->andWhere($orX); |
1034 | 1034 | |
@@ -1070,7 +1070,7 @@ discard block |
||
1070 | 1070 | $hide = $expr->andX(); |
1071 | 1071 | foreach (Circle::$DEF_CFG as $cfg => $v) { |
1072 | 1072 | if ($flag & $cfg) { |
1073 | - $hide->add($this->createFunction('NOT') . $expr->bitwiseAnd($aliasCircle . '.config', $cfg)); |
|
1073 | + $hide->add($this->createFunction('NOT').$expr->bitwiseAnd($aliasCircle.'.config', $cfg)); |
|
1074 | 1074 | } |
1075 | 1075 | } |
1076 | 1076 | |
@@ -1089,21 +1089,21 @@ discard block |
||
1089 | 1089 | $expr = $this->expr(); |
1090 | 1090 | $andPassive = $expr->andX(); |
1091 | 1091 | $andPassive->add( |
1092 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1092 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1093 | 1093 | ); |
1094 | 1094 | |
1095 | 1095 | $orMemberOrLevel = $expr->orX(); |
1096 | 1096 | $orMemberOrLevel->add( |
1097 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance') |
|
1097 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance') |
|
1098 | 1098 | ); |
1099 | 1099 | // TODO: do we need this ? (display members from the local instance) |
1100 | 1100 | $orMemberOrLevel->add( |
1101 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance') |
|
1101 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance') |
|
1102 | 1102 | ); |
1103 | 1103 | |
1104 | 1104 | $orMemberOrLevel->add( |
1105 | 1105 | $expr->eq( |
1106 | - $this->getDefaultSelectAlias() . '.level', |
|
1106 | + $this->getDefaultSelectAlias().'.level', |
|
1107 | 1107 | $this->createNamedParameter(Member::LEVEL_OWNER) |
1108 | 1108 | ) |
1109 | 1109 | ); |
@@ -1119,7 +1119,7 @@ discard block |
||
1119 | 1119 | * @param int $flag |
1120 | 1120 | */ |
1121 | 1121 | public function filterConfig(string $aliasCircle, int $flag): void { |
1122 | - $this->andWhere($this->expr()->bitwiseAnd($aliasCircle . '.config', $flag)); |
|
1122 | + $this->andWhere($this->expr()->bitwiseAnd($aliasCircle.'.config', $flag)); |
|
1123 | 1123 | } |
1124 | 1124 | |
1125 | 1125 | |
@@ -1145,11 +1145,11 @@ discard block |
||
1145 | 1145 | ->generateSelectAlias(CoreRequestBuilder::$outsideTables[self::STORAGES], $aliasStorages, $aliasStorages, []) |
1146 | 1146 | ->leftJoin( |
1147 | 1147 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, |
1148 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') |
|
1148 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') |
|
1149 | 1149 | ) |
1150 | 1150 | ->leftJoin( |
1151 | 1151 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, |
1152 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') |
|
1152 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') |
|
1153 | 1153 | ); |
1154 | 1154 | } |
1155 | 1155 | |
@@ -1171,13 +1171,13 @@ discard block |
||
1171 | 1171 | $this->leftJoin( |
1172 | 1172 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, |
1173 | 1173 | $expr->andX( |
1174 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), |
|
1175 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') |
|
1174 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), |
|
1175 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') |
|
1176 | 1176 | ) |
1177 | 1177 | ); |
1178 | 1178 | |
1179 | - $this->selectAlias($aliasShareChild . '.id', 'child_id'); |
|
1180 | - $this->selectAlias($aliasShareChild . '.file_target', 'child_file_target'); |
|
1179 | + $this->selectAlias($aliasShareChild.'.id', 'child_id'); |
|
1180 | + $this->selectAlias($aliasShareChild.'.file_target', 'child_file_target'); |
|
1181 | 1181 | // $this->selectAlias($aliasShareParent . '.permissions', 'parent_perms'); |
1182 | 1182 | } |
1183 | 1183 | |
@@ -1191,12 +1191,12 @@ discard block |
||
1191 | 1191 | $expr = $this->expr(); |
1192 | 1192 | |
1193 | 1193 | $orX = $expr->orX( |
1194 | - $expr->eq($alias . '.uid_initiator', $this->createNamedParameter($federatedUser->getUserId())) |
|
1194 | + $expr->eq($alias.'.uid_initiator', $this->createNamedParameter($federatedUser->getUserId())) |
|
1195 | 1195 | ); |
1196 | 1196 | |
1197 | 1197 | if ($reshares) { |
1198 | 1198 | $orX->add( |
1199 | - $expr->eq($alias . '.uid_owner', $this->createNamedParameter($federatedUser->getUserId())) |
|
1199 | + $expr->eq($alias.'.uid_owner', $this->createNamedParameter($federatedUser->getUserId())) |
|
1200 | 1200 | ); |
1201 | 1201 | } |
1202 | 1202 | |
@@ -1221,13 +1221,13 @@ discard block |
||
1221 | 1221 | $this->leftJoin( |
1222 | 1222 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, |
1223 | 1223 | $expr->andX( |
1224 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), |
|
1225 | - $expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id') |
|
1224 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), |
|
1225 | + $expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id') |
|
1226 | 1226 | ) |
1227 | 1227 | ); |
1228 | 1228 | |
1229 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); |
|
1230 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); |
|
1229 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); |
|
1230 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); |
|
1231 | 1231 | } |
1232 | 1232 | |
1233 | 1233 | |
@@ -1331,10 +1331,10 @@ discard block |
||
1331 | 1331 | */ |
1332 | 1332 | public function generateAlias(string $base, string $extension, ?array &$options = []): string { |
1333 | 1333 | $search = str_replace('_', '.', $base); |
1334 | - $path = $search . '.' . $extension; |
|
1334 | + $path = $search.'.'.$extension; |
|
1335 | 1335 | if (!$this->validKey($path, self::$SQL_PATH) |
1336 | 1336 | && !in_array($extension, $this->getArray($search, self::$SQL_PATH))) { |
1337 | - throw new RequestBuilderException($extension . ' not found in ' . $search); |
|
1337 | + throw new RequestBuilderException($extension.' not found in '.$search); |
|
1338 | 1338 | } |
1339 | 1339 | |
1340 | 1340 | if (!is_array($options)) { |
@@ -1343,15 +1343,15 @@ discard block |
||
1343 | 1343 | |
1344 | 1344 | $optionPath = ''; |
1345 | 1345 | foreach (explode('.', $path) as $p) { |
1346 | - $optionPath = trim($optionPath . '.' . $p, '.'); |
|
1346 | + $optionPath = trim($optionPath.'.'.$p, '.'); |
|
1347 | 1347 | $options = array_merge( |
1348 | 1348 | $options, |
1349 | - $this->getArray($optionPath . '.' . self::OPTIONS, self::$SQL_PATH), |
|
1350 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) |
|
1349 | + $this->getArray($optionPath.'.'.self::OPTIONS, self::$SQL_PATH), |
|
1350 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) |
|
1351 | 1351 | ); |
1352 | 1352 | } |
1353 | 1353 | |
1354 | - return $base . '_' . $extension; |
|
1354 | + return $base.'_'.$extension; |
|
1355 | 1355 | } |
1356 | 1356 | |
1357 | 1357 | |
@@ -1371,7 +1371,7 @@ discard block |
||
1371 | 1371 | } else { |
1372 | 1372 | $k = $arr; |
1373 | 1373 | } |
1374 | - $path[$k] = $prefix . '_' . $k . '_'; |
|
1374 | + $path[$k] = $prefix.'_'.$k.'_'; |
|
1375 | 1375 | } |
1376 | 1376 | |
1377 | 1377 | return $path; |
@@ -37,7 +37,6 @@ |
||
37 | 37 | use daita\MySmallPhpTools\Traits\TArrayTools; |
38 | 38 | use OC\URLGenerator; |
39 | 39 | use OCA\Circles\AppInfo\Application; |
40 | -use OCA\Circles\Exceptions\UnknownInterfaceException; |
|
41 | 40 | use OCA\Circles\Service\ConfigService; |
42 | 41 | use OCA\Circles\Service\InterfaceService; |
43 | 42 | use OCA\Circles\Service\RemoteStreamService; |
@@ -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 |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | return $value; |
162 | 162 | } |
163 | 163 | |
164 | - if (($value = $this->config->getSystemValue('circles.' . $key, '')) !== '') { |
|
164 | + if (($value = $this->config->getSystemValue('circles.'.$key, '')) !== '') { |
|
165 | 165 | return $value; |
166 | 166 | } |
167 | 167 | |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | } |
416 | 416 | |
417 | 417 | if (array_key_exists('port', $loopback)) { |
418 | - $loopbackCloudId = $loopback['host'] . ':' . $loopback['port']; |
|
418 | + $loopbackCloudId = $loopback['host'].':'.$loopback['port']; |
|
419 | 419 | } else { |
420 | 420 | $loopbackCloudId = $loopback['host']; |
421 | 421 | } |
@@ -444,12 +444,12 @@ discard block |
||
444 | 444 | $scheme = $this->getAppValue(self::LOOPBACK_CLOUD_SCHEME); |
445 | 445 | } |
446 | 446 | |
447 | - $base = $scheme . '://' . $instance; |
|
447 | + $base = $scheme.'://'.$instance; |
|
448 | 448 | if ($route === '') { |
449 | 449 | return $base; |
450 | 450 | } |
451 | 451 | |
452 | - return $base . $this->urlGenerator->linkToRoute($route, $args); |
|
452 | + return $base.$this->urlGenerator->linkToRoute($route, $args); |
|
453 | 453 | } |
454 | 454 | |
455 | 455 |
@@ -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 | } |
@@ -453,7 +453,7 @@ |
||
453 | 453 | |
454 | 454 | |
455 | 455 | /** |
456 | - * @NoAdminRequired |
|
456 | + * @NoAdminRequired |
|
457 | 457 | * |
458 | 458 | * @param string $circleId |
459 | 459 | * @param int $value |