@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | if ($shallow) { |
| 383 | 383 | $qb->limitInt('parent', $node->getId(), $aliasFileCache); |
| 384 | 384 | } else { |
| 385 | - $qb->like('path', $node->getInternalPath() . '/%', $aliasFileCache); |
|
| 385 | + $qb->like('path', $node->getInternalPath().'/%', $aliasFileCache); |
|
| 386 | 386 | } |
| 387 | 387 | $qb->limitNull('parent', false); |
| 388 | 388 | |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | } |
| 443 | 443 | |
| 444 | 444 | $ids = array_map( |
| 445 | - function (ShareWrapper $share): string { |
|
| 445 | + function(ShareWrapper $share): string { |
|
| 446 | 446 | return $share->getId(); |
| 447 | 447 | }, |
| 448 | 448 | $this->getItemsFromRequest($qb) |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | $expr = $qb->expr(); |
| 458 | 458 | $qb->leftJoin( |
| 459 | 459 | CoreQueryBuilder::SHARE, CoreRequestBuilder::TABLE_SHARE, 'p', |
| 460 | - $expr->andX($expr->eq('p.id', CoreQueryBuilder::SHARE . '.parent')) |
|
| 460 | + $expr->andX($expr->eq('p.id', CoreQueryBuilder::SHARE.'.parent')) |
|
| 461 | 461 | ); |
| 462 | 462 | |
| 463 | 463 | $qb->filterNull('parent'); |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | */ |
| 216 | 216 | public function limitToCreation(int $delay = 0): self { |
| 217 | 217 | $date = new DateTime('now'); |
| 218 | - $date->sub(new DateInterval('PT' . $delay . 'M')); |
|
| 218 | + $date->sub(new DateInterval('PT'.$delay.'M')); |
|
| 219 | 219 | |
| 220 | 220 | $this->limitToDBFieldDateTime('creation', $date, true); |
| 221 | 221 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | $expr = $this->expr(); |
| 233 | 233 | $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() |
| 234 | 234 | . '.' : ''; |
| 235 | - $field = $pf . $field; |
|
| 235 | + $field = $pf.$field; |
|
| 236 | 236 | |
| 237 | 237 | $orX = $expr->orX(); |
| 238 | 238 | $orX->add( |
@@ -262,8 +262,8 @@ discard block |
||
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | $expr = $this->expr(); |
| 265 | - $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() . '.' : ''; |
|
| 266 | - $field = $pf . $field; |
|
| 265 | + $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias().'.' : ''; |
|
| 266 | + $field = $pf.$field; |
|
| 267 | 267 | |
| 268 | 268 | $orX = $expr->orX(); |
| 269 | 269 | $orX->add( |
@@ -281,8 +281,8 @@ discard block |
||
| 281 | 281 | public function searchInDBField(string $field, string $value): void { |
| 282 | 282 | $expr = $this->expr(); |
| 283 | 283 | |
| 284 | - $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() . '.' : ''; |
|
| 285 | - $field = $pf . $field; |
|
| 284 | + $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias().'.' : ''; |
|
| 285 | + $field = $pf.$field; |
|
| 286 | 286 | |
| 287 | 287 | $this->andWhere($expr->iLike($field, $this->createNamedParameter($value))); |
| 288 | 288 | } |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | */ |
| 405 | 405 | public function exprLike(string $field, string $value, string $alias = '', bool $cs = true): string { |
| 406 | 406 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 407 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 407 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 408 | 408 | } |
| 409 | 409 | |
| 410 | 410 | $expr = $this->expr(); |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | |
| 418 | 418 | public function exprLimit(string $field, string $value, string $alias = '', bool $cs = true): string { |
| 419 | 419 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 420 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 420 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 421 | 421 | } |
| 422 | 422 | |
| 423 | 423 | $expr = $this->expr(); |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | |
| 436 | 436 | public function exprLimitInt(string $field, int $value, string $alias = ''): string { |
| 437 | 437 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 438 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 438 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 439 | 439 | } |
| 440 | 440 | |
| 441 | 441 | $expr = $this->expr(); |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | */ |
| 454 | 454 | public function exprLimitBool(string $field, bool $value, string $alias = ''): string { |
| 455 | 455 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 456 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 456 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 457 | 457 | } |
| 458 | 458 | |
| 459 | 459 | $expr = $this->expr(); |
@@ -474,7 +474,7 @@ discard block |
||
| 474 | 474 | string $alias = '' |
| 475 | 475 | ): ICompositeExpression { |
| 476 | 476 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 477 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 477 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 478 | 478 | } |
| 479 | 479 | |
| 480 | 480 | $expr = $this->expr(); |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | string $alias = '' |
| 501 | 501 | ): ICompositeExpression { |
| 502 | 502 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 503 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 503 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 504 | 504 | } |
| 505 | 505 | |
| 506 | 506 | $expr = $this->expr(); |
@@ -529,7 +529,7 @@ discard block |
||
| 529 | 529 | bool $cs = true |
| 530 | 530 | ): ICompositeExpression { |
| 531 | 531 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 532 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 532 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 533 | 533 | } |
| 534 | 534 | |
| 535 | 535 | $andX = $this->expr()->andX(); |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | */ |
| 555 | 555 | public function exprLimitInArray(string $field, array $values, string $alias = ''): string { |
| 556 | 556 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 557 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 557 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 558 | 558 | } |
| 559 | 559 | |
| 560 | 560 | $expr = $this->expr(); |
@@ -572,7 +572,7 @@ discard block |
||
| 572 | 572 | */ |
| 573 | 573 | public function exprLimitBitwise(string $field, int $flag, string $alias = ''): string { |
| 574 | 574 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 575 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 575 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 576 | 576 | } |
| 577 | 577 | |
| 578 | 578 | $expr = $this->expr(); |
@@ -594,7 +594,7 @@ discard block |
||
| 594 | 594 | */ |
| 595 | 595 | public function exprLt(string $field, int $value, bool $lte = false, string $alias = ''): string { |
| 596 | 596 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 597 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 597 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 598 | 598 | } |
| 599 | 599 | |
| 600 | 600 | $expr = $this->expr(); |
@@ -616,7 +616,7 @@ discard block |
||
| 616 | 616 | */ |
| 617 | 617 | public function exprGt(string $field, int $value, bool $gte = false, string $alias = ''): string { |
| 618 | 618 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 619 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 619 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 620 | 620 | } |
| 621 | 621 | |
| 622 | 622 | $expr = $this->expr(); |
@@ -725,7 +725,7 @@ discard block |
||
| 725 | 725 | */ |
| 726 | 726 | public function exprUnlike(string $field, string $value, string $alias = '', bool $cs = true): string { |
| 727 | 727 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 728 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 728 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 729 | 729 | } |
| 730 | 730 | |
| 731 | 731 | $expr = $this->expr(); |
@@ -749,7 +749,7 @@ discard block |
||
| 749 | 749 | */ |
| 750 | 750 | public function exprFilter(string $field, string $value, string $alias = '', bool $cs = true): string { |
| 751 | 751 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 752 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 752 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 753 | 753 | } |
| 754 | 754 | |
| 755 | 755 | $expr = $this->expr(); |
@@ -775,7 +775,7 @@ discard block |
||
| 775 | 775 | */ |
| 776 | 776 | public function exprFilterInt(string $field, int $value, string $alias = ''): string { |
| 777 | 777 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 778 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 778 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 779 | 779 | } |
| 780 | 780 | |
| 781 | 781 | $expr = $this->expr(); |
@@ -793,7 +793,7 @@ discard block |
||
| 793 | 793 | */ |
| 794 | 794 | public function exprFilterBool(string $field, bool $value, string $alias = ''): string { |
| 795 | 795 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 796 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 796 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 797 | 797 | } |
| 798 | 798 | |
| 799 | 799 | $expr = $this->expr(); |
@@ -814,7 +814,7 @@ discard block |
||
| 814 | 814 | string $alias = '' |
| 815 | 815 | ): ICompositeExpression { |
| 816 | 816 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 817 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 817 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 818 | 818 | } |
| 819 | 819 | |
| 820 | 820 | $expr = $this->expr(); |
@@ -840,7 +840,7 @@ discard block |
||
| 840 | 840 | string $alias = '' |
| 841 | 841 | ): ICompositeExpression { |
| 842 | 842 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 843 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 843 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 844 | 844 | } |
| 845 | 845 | |
| 846 | 846 | $expr = $this->expr(); |
@@ -869,7 +869,7 @@ discard block |
||
| 869 | 869 | bool $cs = true |
| 870 | 870 | ): ICompositeExpression { |
| 871 | 871 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 872 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 872 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 873 | 873 | } |
| 874 | 874 | |
| 875 | 875 | $orX = $this->expr()->orX(); |
@@ -894,7 +894,7 @@ discard block |
||
| 894 | 894 | */ |
| 895 | 895 | public function exprFilterInArray(string $field, array $values, string $alias = ''): string { |
| 896 | 896 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 897 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 897 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 898 | 898 | } |
| 899 | 899 | |
| 900 | 900 | $expr = $this->expr(); |
@@ -912,7 +912,7 @@ discard block |
||
| 912 | 912 | */ |
| 913 | 913 | public function exprFilterBitwise(string $field, int $flag, string $alias = ''): string { |
| 914 | 914 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 915 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 915 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 916 | 916 | } |
| 917 | 917 | |
| 918 | 918 | $expr = $this->expr(); |
@@ -1073,12 +1073,12 @@ discard block |
||
| 1073 | 1073 | string $alias = '' |
| 1074 | 1074 | ): self { |
| 1075 | 1075 | $selectFields = array_map( |
| 1076 | - function (string $item) use ($alias) { |
|
| 1076 | + function(string $item) use ($alias) { |
|
| 1077 | 1077 | if ($alias === '') { |
| 1078 | 1078 | return $item; |
| 1079 | 1079 | } |
| 1080 | 1080 | |
| 1081 | - return $alias . '.' . $item; |
|
| 1081 | + return $alias.'.'.$item; |
|
| 1082 | 1082 | }, $fields |
| 1083 | 1083 | ); |
| 1084 | 1084 | |
@@ -1104,13 +1104,13 @@ discard block |
||
| 1104 | 1104 | string $prefix, |
| 1105 | 1105 | array $default = [] |
| 1106 | 1106 | ): self { |
| 1107 | - $prefix = trim($prefix) . '_'; |
|
| 1107 | + $prefix = trim($prefix).'_'; |
|
| 1108 | 1108 | foreach ($default as $k => $v) { |
| 1109 | - $this->addDefaultValue($prefix . $k, (string)$v); |
|
| 1109 | + $this->addDefaultValue($prefix.$k, (string)$v); |
|
| 1110 | 1110 | } |
| 1111 | 1111 | |
| 1112 | 1112 | foreach ($fields as $field) { |
| 1113 | - $this->selectAlias($alias . '.' . $field, $prefix . $field); |
|
| 1113 | + $this->selectAlias($alias.'.'.$field, $prefix.$field); |
|
| 1114 | 1114 | } |
| 1115 | 1115 | |
| 1116 | 1116 | return $this; |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | |
| 581 | 581 | $i = 1; |
| 582 | 582 | while (true) { |
| 583 | - $testDisplayName = $baseDisplayName . (($i > 1) ? ' (' . $i . ')' : ''); |
|
| 583 | + $testDisplayName = $baseDisplayName.(($i > 1) ? ' ('.$i.')' : ''); |
|
| 584 | 584 | $test = new Circle(); |
| 585 | 585 | $test->setDisplayName($testDisplayName); |
| 586 | 586 | |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | |
| 614 | 614 | $i = 1; |
| 615 | 615 | while (true) { |
| 616 | - $testSanitizedName = $baseSanitizedName . (($i > 1) ? ' (' . $i . ')' : ''); |
|
| 616 | + $testSanitizedName = $baseSanitizedName.(($i > 1) ? ' ('.$i.')' : ''); |
|
| 617 | 617 | |
| 618 | 618 | $test = new Circle(); |
| 619 | 619 | $test->setSanitizedName($testSanitizedName); |
@@ -755,7 +755,7 @@ discard block |
||
| 755 | 755 | |
| 756 | 756 | |
| 757 | 757 | private function generateGetCirclesCacheKey(FederatedUser $federatedUser, string $probeSum): string { |
| 758 | - return $federatedUser->getSingleId() . '#' . $probeSum; |
|
| 758 | + return $federatedUser->getSingleId().'#'.$probeSum; |
|
| 759 | 759 | } |
| 760 | 760 | |
| 761 | 761 | |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | |
| 447 | 447 | return array_filter( |
| 448 | 448 | array_map( |
| 449 | - function (ShareWrapper $wrapper) { |
|
| 449 | + function(ShareWrapper $wrapper) { |
|
| 450 | 450 | return $wrapper->getShare($this->rootFolder, $this->userManager, $this->urlGenerator); |
| 451 | 451 | }, $wrappedShares |
| 452 | 452 | ) |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | |
| 499 | 499 | return array_filter( |
| 500 | 500 | array_map( |
| 501 | - function (ShareWrapper $wrapper) { |
|
| 501 | + function(ShareWrapper $wrapper) { |
|
| 502 | 502 | return $wrapper->getShare($this->rootFolder, $this->userManager, $this->urlGenerator); |
| 503 | 503 | }, $wrappedShares |
| 504 | 504 | ) |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | |
| 548 | 548 | return array_filter( |
| 549 | 549 | array_map( |
| 550 | - function (ShareWrapper $wrapper) { |
|
| 550 | + function(ShareWrapper $wrapper) { |
|
| 551 | 551 | return $wrapper->getShare( |
| 552 | 552 | $this->rootFolder, $this->userManager, $this->urlGenerator, true |
| 553 | 553 | ); |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | |
| 579 | 579 | $share = $wrappedShare->getShare($this->rootFolder, $this->userManager, $this->urlGenerator); |
| 580 | 580 | if ($share->getPassword() !== '') { |
| 581 | - $this->logger->notice('share is protected by a password, hash: ' . $share->getPassword()); |
|
| 581 | + $this->logger->notice('share is protected by a password, hash: '.$share->getPassword()); |
|
| 582 | 582 | } |
| 583 | 583 | |
| 584 | 584 | return $share; |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | throw new Exception('Please specify a --type for the test'); |
| 178 | 178 | } |
| 179 | 179 | if ($test !== '' && !in_array($type, self::$checks)) { |
| 180 | - throw new Exception('Unknown type: ' . implode(', ', self::$checks)); |
|
| 180 | + throw new Exception('Unknown type: '.implode(', ', self::$checks)); |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | // $this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test); |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | $output->writeln(''); |
| 238 | - $output->writeln('* testing current address: ' . $test); |
|
| 238 | + $output->writeln('* testing current address: '.$test); |
|
| 239 | 239 | |
| 240 | 240 | try { |
| 241 | 241 | $this->setupLoopback($input, $output, $test); |
@@ -271,8 +271,8 @@ discard block |
||
| 271 | 271 | continue; |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | - $loopback = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
| 275 | - $output->writeln('* testing address: ' . $loopback . ' '); |
|
| 274 | + $loopback = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
| 275 | + $output->writeln('* testing address: '.$loopback.' '); |
|
| 276 | 276 | |
| 277 | 277 | try { |
| 278 | 278 | $this->setupLoopback($input, $output, $loopback); |
@@ -345,8 +345,8 @@ discard block |
||
| 345 | 345 | $test = new FederatedEvent(LoopbackTest::class); |
| 346 | 346 | $this->federatedEventService->newEvent($test); |
| 347 | 347 | $output->writeln( |
| 348 | - '<info>' . $test->getWrapperToken() . '</info> ' . |
|
| 349 | - '(took ' . (round(microtime(true) * 1000) - $timer) . 'ms)' |
|
| 348 | + '<info>'.$test->getWrapperToken().'</info> '. |
|
| 349 | + '(took '.(round(microtime(true) * 1000) - $timer).'ms)' |
|
| 350 | 350 | ); |
| 351 | 351 | |
| 352 | 352 | $output->writeln('- Waiting for async process to finish (5s)'); |
@@ -365,18 +365,18 @@ discard block |
||
| 365 | 365 | |
| 366 | 366 | $checkVerify = $wrapper->getEvent()->getData()->gInt('verify'); |
| 367 | 367 | if ($checkVerify === LoopbackTest::VERIFY) { |
| 368 | - $output->write('<info>verify=' . $checkVerify . '</info> '); |
|
| 368 | + $output->write('<info>verify='.$checkVerify.'</info> '); |
|
| 369 | 369 | } else { |
| 370 | - $output->writeln('<error>verify=' . $checkVerify . '</error>'); |
|
| 370 | + $output->writeln('<error>verify='.$checkVerify.'</error>'); |
|
| 371 | 371 | |
| 372 | 372 | return false; |
| 373 | 373 | } |
| 374 | 374 | |
| 375 | 375 | $checkManage = $wrapper->getResult()->gInt('manage'); |
| 376 | 376 | if ($checkManage === LoopbackTest::MANAGE) { |
| 377 | - $output->write('<info>manage=' . $checkManage . '</info> '); |
|
| 377 | + $output->write('<info>manage='.$checkManage.'</info> '); |
|
| 378 | 378 | } else { |
| 379 | - $output->writeln('<error>manage=' . $checkManage . '</error>'); |
|
| 379 | + $output->writeln('<error>manage='.$checkManage.'</error>'); |
|
| 380 | 380 | |
| 381 | 381 | return false; |
| 382 | 382 | } |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId); |
| 416 | 416 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_PATH, $path); |
| 417 | 417 | $output->writeln( |
| 418 | - '- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>' |
|
| 418 | + '- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>' |
|
| 419 | 419 | ); |
| 420 | 420 | } |
| 421 | 421 | |
@@ -467,8 +467,8 @@ discard block |
||
| 467 | 467 | continue; |
| 468 | 468 | } |
| 469 | 469 | |
| 470 | - $internal = rtrim($scheme . '://' . $cloudId, '/'); |
|
| 471 | - $fullInternal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
| 470 | + $internal = rtrim($scheme.'://'.$cloudId, '/'); |
|
| 471 | + $fullInternal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
| 472 | 472 | |
| 473 | 473 | $question = new ConfirmationQuestion( |
| 474 | 474 | '<comment>Do you want to check the validity of this internal address?</comment> (Y/n) ', true, |
@@ -487,9 +487,9 @@ discard block |
||
| 487 | 487 | 'You will need to run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
| 488 | 488 | ); |
| 489 | 489 | $output->writeln( |
| 490 | - ' curl -L "' . $internal |
|
| 490 | + ' curl -L "'.$internal |
|
| 491 | 491 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
| 492 | - . $testToken . '"' |
|
| 492 | + . $testToken.'"' |
|
| 493 | 493 | ); |
| 494 | 494 | |
| 495 | 495 | $output->writeln('paste the result here: '); |
@@ -523,7 +523,7 @@ discard block |
||
| 523 | 523 | |
| 524 | 524 | if ($pastedHref !== $href) { |
| 525 | 525 | $output->writeln( |
| 526 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
| 526 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
| 527 | 527 | . $href |
| 528 | 528 | ); |
| 529 | 529 | continue; |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | 'Next step, please run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
| 536 | 536 | ); |
| 537 | 537 | $output->writeln( |
| 538 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
| 538 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
| 539 | 539 | ); |
| 540 | 540 | |
| 541 | 541 | $output->writeln('paste the result here: '); |
@@ -552,9 +552,9 @@ discard block |
||
| 552 | 552 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
| 553 | 553 | $output->writeln( |
| 554 | 554 | '<error>The returned data (' |
| 555 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
| 555 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
| 556 | 556 | . ') are not the one expected: </error>' |
| 557 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
| 557 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
| 558 | 558 | ); |
| 559 | 559 | continue; |
| 560 | 560 | } |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | |
| 582 | 582 | $output->writeln(''); |
| 583 | 583 | $question = new ConfirmationQuestion( |
| 584 | - '- Do you want to save <info>' . $internal |
|
| 584 | + '- Do you want to save <info>'.$internal |
|
| 585 | 585 | . '</info> as your <info>internal</info> address ? (y/N) ', |
| 586 | 586 | false, '/^(y|Y)/i' |
| 587 | 587 | ); |
@@ -597,7 +597,7 @@ discard block |
||
| 597 | 597 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_ID, $cloudId); |
| 598 | 598 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_PATH, $path); |
| 599 | 599 | |
| 600 | - $output->writeln('- Address <info>' . $internal . '</info> is now used as <info>internal</info>'); |
|
| 600 | + $output->writeln('- Address <info>'.$internal.'</info> is now used as <info>internal</info>'); |
|
| 601 | 601 | } |
| 602 | 602 | |
| 603 | 603 | |
@@ -649,8 +649,8 @@ discard block |
||
| 649 | 649 | continue; |
| 650 | 650 | } |
| 651 | 651 | |
| 652 | - $frontal = rtrim($scheme . '://' . $cloudId, '/'); |
|
| 653 | - $fullFrontal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
| 652 | + $frontal = rtrim($scheme.'://'.$cloudId, '/'); |
|
| 653 | + $fullFrontal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
| 654 | 654 | |
| 655 | 655 | $question = new ConfirmationQuestion( |
| 656 | 656 | '<comment>Do you want to check the validity of this frontal address?</comment> (y/N) ', false, |
@@ -669,9 +669,9 @@ discard block |
||
| 669 | 669 | 'You will need to run this <info>curl</info> command from a remote terminal and paste its result: ' |
| 670 | 670 | ); |
| 671 | 671 | $output->writeln( |
| 672 | - ' curl -L "' . $frontal |
|
| 672 | + ' curl -L "'.$frontal |
|
| 673 | 673 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
| 674 | - . $testToken . '"' |
|
| 674 | + . $testToken.'"' |
|
| 675 | 675 | ); |
| 676 | 676 | |
| 677 | 677 | |
@@ -706,7 +706,7 @@ discard block |
||
| 706 | 706 | |
| 707 | 707 | if ($pastedHref !== $href) { |
| 708 | 708 | $output->writeln( |
| 709 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
| 709 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
| 710 | 710 | . $href |
| 711 | 711 | ); |
| 712 | 712 | continue; |
@@ -718,7 +718,7 @@ discard block |
||
| 718 | 718 | 'Next step, please run this <info>curl</info> command from a remote terminal and paste its result: ' |
| 719 | 719 | ); |
| 720 | 720 | $output->writeln( |
| 721 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
| 721 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
| 722 | 722 | ); |
| 723 | 723 | |
| 724 | 724 | $output->writeln('paste the result here: '); |
@@ -736,9 +736,9 @@ discard block |
||
| 736 | 736 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
| 737 | 737 | $output->writeln( |
| 738 | 738 | '<error>The returned data (' |
| 739 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
| 739 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
| 740 | 740 | . ') are not the one expected: </error>' |
| 741 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
| 741 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
| 742 | 742 | ); |
| 743 | 743 | continue; |
| 744 | 744 | } |
@@ -765,7 +765,7 @@ discard block |
||
| 765 | 765 | |
| 766 | 766 | $output->writeln(''); |
| 767 | 767 | $question = new ConfirmationQuestion( |
| 768 | - '- Do you want to save <info>' . $frontal |
|
| 768 | + '- Do you want to save <info>'.$frontal |
|
| 769 | 769 | . '</info> as your <info>frontal</info> address ? (y/N) ', |
| 770 | 770 | false, '/^(y|Y)/i' |
| 771 | 771 | ); |
@@ -781,7 +781,7 @@ discard block |
||
| 781 | 781 | $this->configService->setAppValue(ConfigService::FRONTAL_CLOUD_ID, $cloudId); |
| 782 | 782 | $this->configService->setAppValue(ConfigService::FRONTAL_CLOUD_PATH, $path); |
| 783 | 783 | |
| 784 | - $output->writeln('- Address <info>' . $frontal . '</info> is now used as <info>frontal</info>'); |
|
| 784 | + $output->writeln('- Address <info>'.$frontal.'</info> is now used as <info>frontal</info>'); |
|
| 785 | 785 | } |
| 786 | 786 | |
| 787 | 787 | |
@@ -807,7 +807,7 @@ discard block |
||
| 807 | 807 | $request->setDataSerialize(new SimpleDataStore(['empty' => 1])); |
| 808 | 808 | } |
| 809 | 809 | |
| 810 | - $output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
| 810 | + $output->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
| 811 | 811 | |
| 812 | 812 | try { |
| 813 | 813 | $this->doRequest($request); |
@@ -818,7 +818,7 @@ discard block |
||
| 818 | 818 | $color = 'info'; |
| 819 | 819 | } |
| 820 | 820 | |
| 821 | - $output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>'); |
|
| 821 | + $output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>'); |
|
| 822 | 822 | if ($result->getStatusCode() === 200) { |
| 823 | 823 | return true; |
| 824 | 824 | } |
@@ -842,7 +842,7 @@ discard block |
||
| 842 | 842 | |
| 843 | 843 | $output->writeln(''); |
| 844 | 844 | $output->writeln( |
| 845 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
| 845 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
| 846 | 846 | ); |
| 847 | 847 | |
| 848 | 848 | $helper = $this->getHelper('question'); |
@@ -859,8 +859,8 @@ discard block |
||
| 859 | 859 | |
| 860 | 860 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
| 861 | 861 | $output->writeln( |
| 862 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
| 863 | - . $address . '\'</info> stored in database' |
|
| 862 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
| 863 | + . $address.'\'</info> stored in database' |
|
| 864 | 864 | ); |
| 865 | 865 | } |
| 866 | 866 | |
@@ -888,7 +888,7 @@ discard block |
||
| 888 | 888 | $path = rtrim($path, '/'); |
| 889 | 889 | |
| 890 | 890 | if (!is_null($cloudIdPort)) { |
| 891 | - $cloudId = $cloudId . ':' . $cloudIdPort; |
|
| 891 | + $cloudId = $cloudId.':'.$cloudIdPort; |
|
| 892 | 892 | } |
| 893 | 893 | |
| 894 | 894 | return [$scheme, $cloudId, $path]; |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $singleIds = array_merge( |
| 99 | 99 | [$circle->getSingleId()], |
| 100 | 100 | array_map( |
| 101 | - function (Membership $membership) { |
|
| 101 | + function(Membership $membership) { |
|
| 102 | 102 | return $membership->getCircleId(); |
| 103 | 103 | }, $circle->getMemberships() |
| 104 | 104 | ) |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | try { |
| 153 | 153 | $this->shareWrapperService->deleteUserSharesToCircle($singleId, $member->getUserId()); |
| 154 | 154 | } catch (\Exception $e) { |
| 155 | - $this->logger->notice('issue while deleting user shares: ' . $e->getMessage()); |
|
| 155 | + $this->logger->notice('issue while deleting user shares: '.$e->getMessage()); |
|
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | 158 | } |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | $qb->exprLimitInt('status', EventWrapper::STATUS_FAILED), |
| 106 | 106 | $expr->andX( |
| 107 | 107 | $qb->exprLimitInt('status', EventWrapper::STATUS_INIT), |
| 108 | - $qb->exprGt('creation', time() - 86400), // only freshly created; less than 3 hours |
|
| 108 | + $qb->exprGt('creation', time() - 86400), // only freshly created; less than 3 hours |
|
| 109 | 109 | $qb->exprLt('creation', time() - 900) // but not too fresh, at least 15 minutes |
| 110 | 110 | ) |
| 111 | 111 | ) |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | return $value; |
| 245 | 245 | } |
| 246 | 246 | |
| 247 | - if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') { |
|
| 247 | + if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') { |
|
| 248 | 248 | return $value; |
| 249 | 249 | } |
| 250 | 250 | |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | */ |
| 499 | 499 | public function getTrustedDomains(): array { |
| 500 | 500 | return array_map( |
| 501 | - function (string $address) { |
|
| 501 | + function(string $address) { |
|
| 502 | 502 | return strtolower($address); |
| 503 | 503 | }, $this->config->getSystemValue('trusted_domains', []) |
| 504 | 504 | ); |
@@ -534,7 +534,7 @@ discard block |
||
| 534 | 534 | } |
| 535 | 535 | |
| 536 | 536 | if (array_key_exists('port', $loopback)) { |
| 537 | - $loopbackCloudId = $loopback['host'] . ':' . $loopback['port']; |
|
| 537 | + $loopbackCloudId = $loopback['host'].':'.$loopback['port']; |
|
| 538 | 538 | } else { |
| 539 | 539 | $loopbackCloudId = $loopback['host']; |
| 540 | 540 | } |
@@ -573,13 +573,13 @@ discard block |
||
| 573 | 573 | $path = $this->getAppValue(self::LOOPBACK_CLOUD_PATH); |
| 574 | 574 | } |
| 575 | 575 | |
| 576 | - $base = $scheme . '://' . $instance . $path; |
|
| 576 | + $base = $scheme.'://'.$instance.$path; |
|
| 577 | 577 | |
| 578 | 578 | if ($route === '') { |
| 579 | 579 | return $base; |
| 580 | 580 | } |
| 581 | 581 | |
| 582 | - return rtrim($base, '/') . $this->linkToRoute($route, $args); |
|
| 582 | + return rtrim($base, '/').$this->linkToRoute($route, $args); |
|
| 583 | 583 | } |
| 584 | 584 | |
| 585 | 585 | |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | ): string { |
| 685 | 685 | $name = ($displayName) ? $federatedUser->getDisplayName() : $federatedUser->getUserId(); |
| 686 | 686 | if ($federatedUser->getUserType() === Member::TYPE_MAIL) { |
| 687 | - return $name . ' ' . $this->displayInstance( |
|
| 687 | + return $name.' '.$this->displayInstance( |
|
| 688 | 688 | $federatedUser->getInstance(), |
| 689 | 689 | self::DISPLAY_PARENTHESIS |
| 690 | 690 | ); |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | return $name; |
| 695 | 695 | } |
| 696 | 696 | |
| 697 | - return $name . $this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT); |
|
| 697 | + return $name.$this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT); |
|
| 698 | 698 | } |
| 699 | 699 | |
| 700 | 700 | /** |
@@ -710,9 +710,9 @@ discard block |
||
| 710 | 710 | |
| 711 | 711 | switch ($type) { |
| 712 | 712 | case self::DISPLAY_AT: |
| 713 | - return '@' . $instance; |
|
| 713 | + return '@'.$instance; |
|
| 714 | 714 | case self::DISPLAY_PARENTHESIS: |
| 715 | - return '(' . $instance . ')'; |
|
| 715 | + return '('.$instance.')'; |
|
| 716 | 716 | } |
| 717 | 717 | |
| 718 | 718 | return $instance; |
@@ -764,7 +764,7 @@ discard block |
||
| 764 | 764 | // when running from the occ command, /index.php is not removed by itself |
| 765 | 765 | if (str_starts_with($path, '/index.php/') |
| 766 | 766 | && $this->config->getSystemValueString('htaccess.RewriteBase', '') !== '') { |
| 767 | - $path = $this->config->getSystemValueString('htaccess.RewriteBase', '/') . substr($path, 11); |
|
| 767 | + $path = $this->config->getSystemValueString('htaccess.RewriteBase', '/').substr($path, 11); |
|
| 768 | 768 | } |
| 769 | 769 | |
| 770 | 770 | $knownPath = parse_url($this->config->getSystemValue('overwrite.cli.url'), PHP_URL_PATH); |
@@ -173,19 +173,19 @@ discard block |
||
| 173 | 173 | |
| 174 | 174 | $webfinger = $this->getWebfinger($host, Application::APP_SUBJECT); |
| 175 | 175 | if ($this->input->getOption('all')) { |
| 176 | - $this->output->writeln('- Webfinger on <info>' . $host . '</info>'); |
|
| 176 | + $this->output->writeln('- Webfinger on <info>'.$host.'</info>'); |
|
| 177 | 177 | $this->output->writeln(json_encode($webfinger, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 178 | 178 | $this->output->writeln(''); |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | if ($this->input->getOption('all')) { |
| 182 | 182 | $circleLink = $this->extractLink(Application::APP_REL, $webfinger); |
| 183 | - $this->output->writeln('- Information about Circles app on <info>' . $host . '</info>'); |
|
| 183 | + $this->output->writeln('- Information about Circles app on <info>'.$host.'</info>'); |
|
| 184 | 184 | $this->output->writeln(json_encode($circleLink, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 185 | 185 | $this->output->writeln(''); |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | - $this->output->writeln('- Available services on <info>' . $host . '</info>'); |
|
| 188 | + $this->output->writeln('- Available services on <info>'.$host.'</info>'); |
|
| 189 | 189 | foreach ($webfinger->getLinks() as $link) { |
| 190 | 190 | $app = $link->getProperty('name'); |
| 191 | 191 | $ver = $link->getProperty('version'); |
@@ -193,14 +193,14 @@ discard block |
||
| 193 | 193 | $app .= ' '; |
| 194 | 194 | } |
| 195 | 195 | if ($ver !== '') { |
| 196 | - $ver = 'v' . $ver; |
|
| 196 | + $ver = 'v'.$ver; |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | - $this->output->writeln(' * ' . $link->getRel() . ' ' . $app . $ver); |
|
| 199 | + $this->output->writeln(' * '.$link->getRel().' '.$app.$ver); |
|
| 200 | 200 | } |
| 201 | 201 | $this->output->writeln(''); |
| 202 | 202 | |
| 203 | - $this->output->writeln('- Resources related to Circles on <info>' . $host . '</info>'); |
|
| 203 | + $this->output->writeln('- Resources related to Circles on <info>'.$host.'</info>'); |
|
| 204 | 204 | $resource = $this->getResourceData($host, Application::APP_SUBJECT, Application::APP_REL); |
| 205 | 205 | $this->output->writeln(json_encode($resource, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 206 | 206 | $this->output->writeln(''); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | |
| 209 | 209 | $tempUid = $resource->g('uid'); |
| 210 | 210 | $this->output->writeln( |
| 211 | - '- Confirming UID=' . $tempUid . ' from parsed Signatory at <info>' . $host . '</info>' |
|
| 211 | + '- Confirming UID='.$tempUid.' from parsed Signatory at <info>'.$host.'</info>' |
|
| 212 | 212 | ); |
| 213 | 213 | |
| 214 | 214 | try { |
@@ -217,15 +217,15 @@ discard block |
||
| 217 | 217 | $this->output->writeln(' * No SignatureException: <info>Identity authed</info>'); |
| 218 | 218 | } catch (SignatureException $e) { |
| 219 | 219 | $this->output->writeln( |
| 220 | - '<error>' . $host . ' cannot auth its identity: ' . $e->getMessage() . '</error>' |
|
| 220 | + '<error>'.$host.' cannot auth its identity: '.$e->getMessage().'</error>' |
|
| 221 | 221 | ); |
| 222 | 222 | |
| 223 | 223 | return; |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | - $this->output->writeln(' * Found <info>' . $remoteSignatory->getUid() . '</info>'); |
|
| 226 | + $this->output->writeln(' * Found <info>'.$remoteSignatory->getUid().'</info>'); |
|
| 227 | 227 | if ($remoteSignatory->getUid(true) !== $tempUid) { |
| 228 | - $this->output->writeln('<error>looks like ' . $host . ' is faking its identity'); |
|
| 228 | + $this->output->writeln('<error>looks like '.$host.' is faking its identity'); |
|
| 229 | 229 | |
| 230 | 230 | return; |
| 231 | 231 | } |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | $this->output->writeln(''); |
| 234 | 234 | |
| 235 | 235 | $testUrl = $resource->g('test'); |
| 236 | - $this->output->writeln('- Testing signed payload on <info>' . $testUrl . '</info>'); |
|
| 236 | + $this->output->writeln('- Testing signed payload on <info>'.$testUrl.'</info>'); |
|
| 237 | 237 | |
| 238 | 238 | try { |
| 239 | 239 | $localSignatory = $this->remoteStreamService->getAppSignatory(); |
@@ -255,18 +255,18 @@ discard block |
||
| 255 | 255 | $this->output->writeln(''); |
| 256 | 256 | |
| 257 | 257 | $this->output->writeln(' * Clear Signature: '); |
| 258 | - $this->output->writeln('<comment>' . $signedRequest->getClearSignature() . '</comment>'); |
|
| 258 | + $this->output->writeln('<comment>'.$signedRequest->getClearSignature().'</comment>'); |
|
| 259 | 259 | $this->output->writeln(''); |
| 260 | 260 | |
| 261 | 261 | $this->output->writeln(' * Signed Signature (base64 encoded): '); |
| 262 | 262 | $this->output->writeln( |
| 263 | - '<comment>' . base64_encode($signedRequest->getSignedSignature()) . '</comment>' |
|
| 263 | + '<comment>'.base64_encode($signedRequest->getSignedSignature()).'</comment>' |
|
| 264 | 264 | ); |
| 265 | 265 | $this->output->writeln(''); |
| 266 | 266 | |
| 267 | 267 | $result = $signedRequest->getOutgoingRequest()->getResult(); |
| 268 | 268 | $code = $result->getStatusCode(); |
| 269 | - $this->output->writeln(' * Result: ' . (($code === 200) ? '<info>' . $code . '</info>' : $code)); |
|
| 269 | + $this->output->writeln(' * Result: '.(($code === 200) ? '<info>'.$code.'</info>' : $code)); |
|
| 270 | 270 | $this->output->writeln( |
| 271 | 271 | json_encode(json_decode($result->getContent(), true), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) |
| 272 | 272 | ); |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | $stored = new RemoteInstance(); |
| 289 | 289 | $this->remoteStreamService->confirmValidRemote($remoteSignatory, $stored); |
| 290 | 290 | $this->output->writeln( |
| 291 | - '<info>The remote instance ' . $host |
|
| 291 | + '<info>The remote instance '.$host |
|
| 292 | 292 | . ' is already known with this current identity</info>' |
| 293 | 293 | ); |
| 294 | 294 | |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | |
| 299 | 299 | if ($remoteSignatory->getType() !== $stored->getType()) { |
| 300 | 300 | $this->output->writeln( |
| 301 | - '- updating type from ' . $stored->getType() . ' to ' |
|
| 301 | + '- updating type from '.$stored->getType().' to ' |
|
| 302 | 302 | . $remoteSignatory->getType() |
| 303 | 303 | ); |
| 304 | 304 | $this->remoteStreamService->update( |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | |
| 309 | 309 | if ($remoteSignatory->getInstance() !== $stored->getInstance()) { |
| 310 | 310 | $this->output->writeln( |
| 311 | - '- updating host from ' . $stored->getInstance() . ' to ' |
|
| 311 | + '- updating host from '.$stored->getInstance().' to ' |
|
| 312 | 312 | . $remoteSignatory->getInstance() |
| 313 | 313 | ); |
| 314 | 314 | $this->remoteStreamService->update( |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | } |
| 318 | 318 | if ($remoteSignatory->getId() !== $stored->getId()) { |
| 319 | 319 | $this->output->writeln( |
| 320 | - '- updating href/Id from ' . $stored->getId() . ' to ' |
|
| 320 | + '- updating href/Id from '.$stored->getId().' to ' |
|
| 321 | 321 | . $remoteSignatory->getId() |
| 322 | 322 | ); |
| 323 | 323 | $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) ', |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | $helper = $this->getHelper('question'); |
| 373 | 373 | |
| 374 | 374 | $this->output->writeln( |
| 375 | - 'The remote instance <info>' . $remoteSignatory->getInstance() |
|
| 375 | + 'The remote instance <info>'.$remoteSignatory->getInstance() |
|
| 376 | 376 | . '</info> is known but <error>its identity has changed.</error>' |
| 377 | 377 | ); |
| 378 | 378 | $this->output->writeln( |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | private function verifyGSInstances(): void { |
| 435 | 435 | $instances = $this->globalScaleService->getGlobalScaleInstances(); |
| 436 | 436 | $known = array_map( |
| 437 | - function (RemoteInstance $instance): string { |
|
| 437 | + function(RemoteInstance $instance): string { |
|
| 438 | 438 | return $instance->getInstance(); |
| 439 | 439 | }, $this->remoteRequest->getFromType(RemoteInstance::TYPE_GLOBALSCALE) |
| 440 | 440 | ); |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | * @param string $instance |
| 451 | 451 | */ |
| 452 | 452 | private function syncGSInstance(string $instance): void { |
| 453 | - $this->output->write('Adding <comment>' . $instance . '</comment>: '); |
|
| 453 | + $this->output->write('Adding <comment>'.$instance.'</comment>: '); |
|
| 454 | 454 | if ($this->configService->isLocalInstance($instance)) { |
| 455 | 455 | $this->output->writeln('<comment>instance is local</comment>'); |
| 456 | 456 | return; |
@@ -465,8 +465,8 @@ discard block |
||
| 465 | 465 | ); |
| 466 | 466 | $this->output->writeln('<info>ok</info>'); |
| 467 | 467 | } catch (Exception $e) { |
| 468 | - $msg = ($e->getMessage() === '') ? '' : ' (' . $e->getMessage() . ')'; |
|
| 469 | - $this->output->writeln('<error>' . get_class($e) . $msg . '</error>'); |
|
| 468 | + $msg = ($e->getMessage() === '') ? '' : ' ('.$e->getMessage().')'; |
|
| 469 | + $this->output->writeln('<error>'.get_class($e).$msg.'</error>'); |
|
| 470 | 470 | } |
| 471 | 471 | } |
| 472 | 472 | |
@@ -484,12 +484,12 @@ discard block |
||
| 484 | 484 | try { |
| 485 | 485 | $current = $this->remoteStreamService->retrieveRemoteInstance($instance->getInstance()); |
| 486 | 486 | if ($current->getUid(true) === $instance->getUid(true)) { |
| 487 | - $currentUid = '<info>' . $current->getUid(true) . '</info>'; |
|
| 487 | + $currentUid = '<info>'.$current->getUid(true).'</info>'; |
|
| 488 | 488 | } else { |
| 489 | - $currentUid = '<error>' . $current->getUid(true) . '</error>'; |
|
| 489 | + $currentUid = '<error>'.$current->getUid(true).'</error>'; |
|
| 490 | 490 | } |
| 491 | 491 | } catch (Exception $e) { |
| 492 | - $currentUid = '<error>' . $e->getMessage() . '</error>'; |
|
| 492 | + $currentUid = '<error>'.$e->getMessage().'</error>'; |
|
| 493 | 493 | } |
| 494 | 494 | |
| 495 | 495 | $table->appendRow( |
@@ -516,7 +516,7 @@ discard block |
||
| 516 | 516 | } |
| 517 | 517 | } |
| 518 | 518 | |
| 519 | - throw new Exception('Unknown type: ' . implode(', ', RemoteInstance::$LIST_TYPE)); |
|
| 519 | + throw new Exception('Unknown type: '.implode(', ', RemoteInstance::$LIST_TYPE)); |
|
| 520 | 520 | } |
| 521 | 521 | |
| 522 | 522 | /** |
@@ -529,6 +529,6 @@ discard block |
||
| 529 | 529 | } |
| 530 | 530 | } |
| 531 | 531 | |
| 532 | - throw new Exception('Unknown interface: ' . implode(', ', InterfaceService::$LIST_IFACE)); |
|
| 532 | + throw new Exception('Unknown interface: '.implode(', ', InterfaceService::$LIST_IFACE)); |
|
| 533 | 533 | } |
| 534 | 534 | } |