@@ -158,7 +158,7 @@ |
||
| 158 | 158 | } catch (FederatedItemException $e) { |
| 159 | 159 | if ($input->getOption('status-code')) { |
| 160 | 160 | throw new FederatedItemException( |
| 161 | - ' [' . get_class($e) . ', ' . ((string)$e->getStatus()) . ']' . "\n" . $e->getMessage() |
|
| 161 | + ' ['.get_class($e).', '.((string)$e->getStatus()).']'."\n".$e->getMessage() |
|
| 162 | 162 | ); |
| 163 | 163 | } |
| 164 | 164 | |
@@ -158,7 +158,7 @@ |
||
| 158 | 158 | } catch (FederatedItemException $e) { |
| 159 | 159 | if ($input->getOption('status-code')) { |
| 160 | 160 | throw new FederatedItemException( |
| 161 | - ' [' . get_class($e) . ', ' . ((string)$e->getStatus()) . ']' . "\n" . $e->getMessage() |
|
| 161 | + ' ['.get_class($e).', '.((string)$e->getStatus()).']'."\n".$e->getMessage() |
|
| 162 | 162 | ); |
| 163 | 163 | } |
| 164 | 164 | |
@@ -344,8 +344,8 @@ discard block |
||
| 344 | 344 | $expr = $qb->expr(); |
| 345 | 345 | |
| 346 | 346 | if ($pf === '') { |
| 347 | - $p = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
| 348 | - $qb->andWhere($expr->gte($p . 'level', $qb->createNamedParameter($level))); |
|
| 347 | + $p = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
| 348 | + $qb->andWhere($expr->gte($p.'level', $qb->createNamedParameter($level))); |
|
| 349 | 349 | |
| 350 | 350 | return; |
| 351 | 351 | } |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | if ($p === 'g' && !$this->leftJoinedNCGroupAndUser) { |
| 375 | 375 | continue; |
| 376 | 376 | } |
| 377 | - $orX[] = $expr->gte($p . '.level', $qb->createNamedParameter($level)); |
|
| 377 | + $orX[] = $expr->gte($p.'.level', $qb->createNamedParameter($level)); |
|
| 378 | 378 | } |
| 379 | 379 | |
| 380 | 380 | return $expr->orX(...$orX); |
@@ -389,12 +389,12 @@ discard block |
||
| 389 | 389 | protected function limitToMembersAndAlmost(IQueryBuilder $qb) { |
| 390 | 390 | $expr = $qb->expr(); |
| 391 | 391 | |
| 392 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
| 392 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
| 393 | 393 | |
| 394 | 394 | $qb->andWhere($expr->orX( |
| 395 | - $expr->eq($pf . 'status', $qb->createNamedParameter(DeprecatedMember::STATUS_MEMBER)), |
|
| 396 | - $expr->eq($pf . 'status', $qb->createNamedParameter(DeprecatedMember::STATUS_INVITED)), |
|
| 397 | - $expr->eq($pf . 'status', $qb->createNamedParameter(DeprecatedMember::STATUS_REQUEST)), |
|
| 395 | + $expr->eq($pf.'status', $qb->createNamedParameter(DeprecatedMember::STATUS_MEMBER)), |
|
| 396 | + $expr->eq($pf.'status', $qb->createNamedParameter(DeprecatedMember::STATUS_INVITED)), |
|
| 397 | + $expr->eq($pf.'status', $qb->createNamedParameter(DeprecatedMember::STATUS_REQUEST)), |
|
| 398 | 398 | )); |
| 399 | 399 | } |
| 400 | 400 | |
@@ -406,8 +406,8 @@ discard block |
||
| 406 | 406 | */ |
| 407 | 407 | public function limitToDBField(IQueryBuilder $qb, $field, $value) { |
| 408 | 408 | $expr = $qb->expr(); |
| 409 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
| 410 | - $qb->andWhere($expr->eq($pf . $field, $qb->createNamedParameter($value))); |
|
| 409 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
| 410 | + $qb->andWhere($expr->eq($pf.$field, $qb->createNamedParameter($value))); |
|
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | |
@@ -418,8 +418,8 @@ discard block |
||
| 418 | 418 | */ |
| 419 | 419 | private function limitToDBFieldOrGreater(IQueryBuilder $qb, $field, $value) { |
| 420 | 420 | $expr = $qb->expr(); |
| 421 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
| 422 | - $qb->andWhere($expr->gte($pf . $field, $qb->createNamedParameter($value))); |
|
| 421 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
| 422 | + $qb->andWhere($expr->gte($pf.$field, $qb->createNamedParameter($value))); |
|
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | |
@@ -434,9 +434,9 @@ discard block |
||
| 434 | 434 | protected function limitToNCGroupUser(IQueryBuilder $qb, $userId = '') { |
| 435 | 435 | $expr = $qb->expr(); |
| 436 | 436 | |
| 437 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
| 437 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
| 438 | 438 | |
| 439 | - $and = $expr->andX($expr->eq($pf . 'user_id', 'ncgu.gid')); |
|
| 439 | + $and = $expr->andX($expr->eq($pf.'user_id', 'ncgu.gid')); |
|
| 440 | 440 | if ($userId !== '') { |
| 441 | 441 | $and->add($expr->eq('ncgu.uid', $qb->createNamedParameter($userId))); |
| 442 | 442 | } else { |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | } |
| 460 | 460 | |
| 461 | 461 | $expr = $qb->expr(); |
| 462 | - $pf = $this->default_select_alias . '.'; |
|
| 462 | + $pf = $this->default_select_alias.'.'; |
|
| 463 | 463 | |
| 464 | 464 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
| 465 | 465 | $qb->selectAlias('lc.type', 'circle_type') |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | ->selectAlias('lc.settings', 'circle_settings') |
| 469 | 469 | ->leftJoin( |
| 470 | 470 | $this->default_select_alias, DeprecatedRequestBuilder::TABLE_CIRCLES, 'lc', |
| 471 | - $expr->eq($pf . 'circle_id', 'lc.unique_id') |
|
| 471 | + $expr->eq($pf.'circle_id', 'lc.unique_id') |
|
| 472 | 472 | ); |
| 473 | 473 | } |
| 474 | 474 | |
@@ -173,10 +173,10 @@ discard block |
||
| 173 | 173 | $qb->leftJoin( |
| 174 | 174 | CoreQueryBuilder::REMOTE, self::TABLE_MEMBER, $aliasMember, |
| 175 | 175 | $expr->andX( |
| 176 | - $expr->eq($aliasMember . '.circle_id', $qb->createNamedParameter($circle->getSingleId())), |
|
| 177 | - $expr->eq($aliasMember . '.instance', CoreQueryBuilder::REMOTE . '.instance'), |
|
| 176 | + $expr->eq($aliasMember.'.circle_id', $qb->createNamedParameter($circle->getSingleId())), |
|
| 177 | + $expr->eq($aliasMember.'.instance', CoreQueryBuilder::REMOTE.'.instance'), |
|
| 178 | 178 | $expr->gte( |
| 179 | - $aliasMember . '.level', |
|
| 179 | + $aliasMember.'.level', |
|
| 180 | 180 | $qb->createNamedParameter(Member::LEVEL_MEMBER, IQueryBuilder::PARAM_INT) |
| 181 | 181 | ) |
| 182 | 182 | ) |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | |
| 185 | 185 | $orX[] = $expr->andX( |
| 186 | 186 | $qb->exprLimit('type', RemoteInstance::TYPE_EXTERNAL, '', false), |
| 187 | - $expr->isNotNull($aliasMember . '.instance'), |
|
| 187 | + $expr->isNotNull($aliasMember.'.instance'), |
|
| 188 | 188 | ); |
| 189 | 189 | } |
| 190 | 190 | |
@@ -97,11 +97,11 @@ |
||
| 97 | 97 | |
| 98 | 98 | private function leftJoinMountPoint(IQueryBuilder $qb, string $userId) { |
| 99 | 99 | $expr = $qb->expr(); |
| 100 | - $pf = '' . $this->default_select_alias . '.'; |
|
| 100 | + $pf = ''.$this->default_select_alias.'.'; |
|
| 101 | 101 | |
| 102 | 102 | $on = $expr->andX( |
| 103 | 103 | $expr->eq('mp.user_id', $qb->createNamedParameter($userId)), |
| 104 | - $expr->eq('mp.share_id', $pf . 'id'), |
|
| 104 | + $expr->eq('mp.share_id', $pf.'id'), |
|
| 105 | 105 | ); |
| 106 | 106 | |
| 107 | 107 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | $groupId = $event->getGroup()->getGID(); |
| 42 | 42 | |
| 43 | 43 | $circle = new Circle(); |
| 44 | - $circle->setName('group:' . $groupId) |
|
| 44 | + $circle->setName('group:'.$groupId) |
|
| 45 | 45 | ->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN) |
| 46 | 46 | ->setSource(Member::TYPE_GROUP); |
| 47 | 47 | |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | */ |
| 196 | 196 | public function limitToCreation(int $delay = 0): self { |
| 197 | 197 | $date = new DateTime('now'); |
| 198 | - $date->sub(new DateInterval('PT' . ((string)$delay) . 'M')); |
|
| 198 | + $date->sub(new DateInterval('PT'.((string)$delay).'M')); |
|
| 199 | 199 | |
| 200 | 200 | $this->limitToDBFieldDateTime('creation', $date, true); |
| 201 | 201 | |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | $expr = $this->expr(); |
| 213 | 213 | $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() |
| 214 | 214 | . '.' : ''; |
| 215 | - $field = $pf . $field; |
|
| 215 | + $field = $pf.$field; |
|
| 216 | 216 | |
| 217 | 217 | $orX = [$expr->lte($field, $this->createNamedParameter($date, IQueryBuilder::PARAM_DATE))]; |
| 218 | 218 | |
@@ -239,8 +239,8 @@ discard block |
||
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | $expr = $this->expr(); |
| 242 | - $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() . '.' : ''; |
|
| 243 | - $field = $pf . $field; |
|
| 242 | + $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias().'.' : ''; |
|
| 243 | + $field = $pf.$field; |
|
| 244 | 244 | |
| 245 | 245 | $this->andWhere($expr->gte($field, $this->createNamedParameter($dTime, IQueryBuilder::PARAM_DATE))); |
| 246 | 246 | } |
@@ -253,8 +253,8 @@ discard block |
||
| 253 | 253 | public function searchInDBField(string $field, string $value): void { |
| 254 | 254 | $expr = $this->expr(); |
| 255 | 255 | |
| 256 | - $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() . '.' : ''; |
|
| 257 | - $field = $pf . $field; |
|
| 256 | + $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias().'.' : ''; |
|
| 257 | + $field = $pf.$field; |
|
| 258 | 258 | |
| 259 | 259 | $this->andWhere($expr->iLike($field, $this->createNamedParameter($value))); |
| 260 | 260 | } |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | */ |
| 378 | 378 | public function exprLike(string $field, string $value, string $alias = '', bool $cs = true): string { |
| 379 | 379 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 380 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 380 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 381 | 381 | } |
| 382 | 382 | |
| 383 | 383 | $expr = $this->expr(); |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | |
| 391 | 391 | public function exprLimit(string $field, string $value, string $alias = '', bool $cs = true): string { |
| 392 | 392 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 393 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 393 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | $expr = $this->expr(); |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | |
| 409 | 409 | public function exprLimitInt(string $field, int $value, string $alias = ''): string { |
| 410 | 410 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 411 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 411 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 412 | 412 | } |
| 413 | 413 | |
| 414 | 414 | $expr = $this->expr(); |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | */ |
| 427 | 427 | public function exprLimitBool(string $field, bool $value, string $alias = ''): string { |
| 428 | 428 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 429 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 429 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 430 | 430 | } |
| 431 | 431 | |
| 432 | 432 | $expr = $this->expr(); |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | string $alias = '', |
| 448 | 448 | ): ICompositeExpression { |
| 449 | 449 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 450 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 450 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 451 | 451 | } |
| 452 | 452 | |
| 453 | 453 | $expr = $this->expr(); |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | string $alias = '', |
| 473 | 473 | ): ICompositeExpression { |
| 474 | 474 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 475 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 475 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 476 | 476 | } |
| 477 | 477 | |
| 478 | 478 | $expr = $this->expr(); |
@@ -526,7 +526,7 @@ discard block |
||
| 526 | 526 | int $type = IQueryBuilder::PARAM_STR_ARRAY, |
| 527 | 527 | ): string { |
| 528 | 528 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 529 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 529 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 530 | 530 | } |
| 531 | 531 | |
| 532 | 532 | $expr = $this->expr(); |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | */ |
| 544 | 544 | public function exprLimitBitwise(string $field, int $flag, string $alias = ''): string { |
| 545 | 545 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 546 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 546 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 547 | 547 | } |
| 548 | 548 | |
| 549 | 549 | $expr = $this->expr(); |
@@ -565,7 +565,7 @@ discard block |
||
| 565 | 565 | */ |
| 566 | 566 | public function exprLt(string $field, int $value, bool $lte = false, string $alias = ''): string { |
| 567 | 567 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 568 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 568 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 569 | 569 | } |
| 570 | 570 | |
| 571 | 571 | $expr = $this->expr(); |
@@ -587,7 +587,7 @@ discard block |
||
| 587 | 587 | */ |
| 588 | 588 | public function exprGt(string $field, int $value, bool $gte = false, string $alias = ''): string { |
| 589 | 589 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 590 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 590 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 591 | 591 | } |
| 592 | 592 | |
| 593 | 593 | $expr = $this->expr(); |
@@ -696,7 +696,7 @@ discard block |
||
| 696 | 696 | */ |
| 697 | 697 | public function exprUnlike(string $field, string $value, string $alias = '', bool $cs = true): string { |
| 698 | 698 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 699 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 699 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 700 | 700 | } |
| 701 | 701 | |
| 702 | 702 | $expr = $this->expr(); |
@@ -720,7 +720,7 @@ discard block |
||
| 720 | 720 | */ |
| 721 | 721 | public function exprFilter(string $field, string $value, string $alias = '', bool $cs = true): string { |
| 722 | 722 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 723 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 723 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 724 | 724 | } |
| 725 | 725 | |
| 726 | 726 | $expr = $this->expr(); |
@@ -746,7 +746,7 @@ discard block |
||
| 746 | 746 | */ |
| 747 | 747 | public function exprFilterInt(string $field, int $value, string $alias = ''): string { |
| 748 | 748 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 749 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 749 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 750 | 750 | } |
| 751 | 751 | |
| 752 | 752 | $expr = $this->expr(); |
@@ -764,7 +764,7 @@ discard block |
||
| 764 | 764 | */ |
| 765 | 765 | public function exprFilterBool(string $field, bool $value, string $alias = ''): string { |
| 766 | 766 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 767 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 767 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 768 | 768 | } |
| 769 | 769 | |
| 770 | 770 | $expr = $this->expr(); |
@@ -785,7 +785,7 @@ discard block |
||
| 785 | 785 | string $alias = '', |
| 786 | 786 | ): ICompositeExpression { |
| 787 | 787 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 788 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 788 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 789 | 789 | } |
| 790 | 790 | |
| 791 | 791 | $expr = $this->expr(); |
@@ -810,7 +810,7 @@ discard block |
||
| 810 | 810 | string $alias = '', |
| 811 | 811 | ): ICompositeExpression { |
| 812 | 812 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 813 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 813 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 814 | 814 | } |
| 815 | 815 | |
| 816 | 816 | $expr = $this->expr(); |
@@ -838,7 +838,7 @@ discard block |
||
| 838 | 838 | bool $cs = true, |
| 839 | 839 | ): ICompositeExpression { |
| 840 | 840 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 841 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 841 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 842 | 842 | } |
| 843 | 843 | |
| 844 | 844 | $orX = []; |
@@ -863,7 +863,7 @@ discard block |
||
| 863 | 863 | */ |
| 864 | 864 | public function exprFilterInArray(string $field, array $values, string $alias = ''): string { |
| 865 | 865 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 866 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 866 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 867 | 867 | } |
| 868 | 868 | |
| 869 | 869 | $expr = $this->expr(); |
@@ -881,7 +881,7 @@ discard block |
||
| 881 | 881 | */ |
| 882 | 882 | public function exprFilterBitwise(string $field, int $flag, string $alias = ''): string { |
| 883 | 883 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
| 884 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
| 884 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
| 885 | 885 | } |
| 886 | 886 | |
| 887 | 887 | $expr = $this->expr(); |
@@ -1042,12 +1042,12 @@ discard block |
||
| 1042 | 1042 | string $alias = '', |
| 1043 | 1043 | ): self { |
| 1044 | 1044 | $selectFields = array_map( |
| 1045 | - function (string $item) use ($alias) { |
|
| 1045 | + function(string $item) use ($alias) { |
|
| 1046 | 1046 | if ($alias === '') { |
| 1047 | 1047 | return $item; |
| 1048 | 1048 | } |
| 1049 | 1049 | |
| 1050 | - return $alias . '.' . $item; |
|
| 1050 | + return $alias.'.'.$item; |
|
| 1051 | 1051 | }, $fields |
| 1052 | 1052 | ); |
| 1053 | 1053 | |
@@ -1073,13 +1073,13 @@ discard block |
||
| 1073 | 1073 | string $prefix, |
| 1074 | 1074 | array $default = [], |
| 1075 | 1075 | ): self { |
| 1076 | - $prefix = trim($prefix) . '_'; |
|
| 1076 | + $prefix = trim($prefix).'_'; |
|
| 1077 | 1077 | foreach ($default as $k => $v) { |
| 1078 | - $this->addDefaultValue($prefix . $k, (string)$v); |
|
| 1078 | + $this->addDefaultValue($prefix.$k, (string)$v); |
|
| 1079 | 1079 | } |
| 1080 | 1080 | |
| 1081 | 1081 | foreach ($fields as $field) { |
| 1082 | - $this->selectAlias($alias . '.' . $field, $prefix . $field); |
|
| 1082 | + $this->selectAlias($alias.'.'.$field, $prefix.$field); |
|
| 1083 | 1083 | } |
| 1084 | 1084 | |
| 1085 | 1085 | return $this; |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | * @throws SingleCircleNotFoundException |
| 227 | 227 | */ |
| 228 | 228 | public function syncNextcloudUser(string $userId): FederatedUser { |
| 229 | - $this->outputService->output('Syncing Nextcloud Account \'' . $userId . '\'', true); |
|
| 229 | + $this->outputService->output('Syncing Nextcloud Account \''.$userId.'\'', true); |
|
| 230 | 230 | |
| 231 | 231 | return $this->federatedUserService->getLocalFederatedUser($userId, false, true); |
| 232 | 232 | } |
@@ -270,12 +270,12 @@ discard block |
||
| 270 | 270 | * @throws RequestBuilderException |
| 271 | 271 | */ |
| 272 | 272 | public function syncNextcloudGroup(string $groupId): Circle { |
| 273 | - $this->outputService->output('Syncing Nextcloud Group \'' . $groupId . '\'', true); |
|
| 273 | + $this->outputService->output('Syncing Nextcloud Group \''.$groupId.'\'', true); |
|
| 274 | 274 | |
| 275 | 275 | $circle = $this->federatedUserService->getGroupCircle($groupId); |
| 276 | 276 | $this->circleService->updateDisplayName($circle->getSingleId(), $this->groupManager->getDisplayName($groupId)); |
| 277 | 277 | |
| 278 | - $members = array_map(function (Member $member): string { |
|
| 278 | + $members = array_map(function(Member $member): string { |
|
| 279 | 279 | return $member->getSingleId(); |
| 280 | 280 | }, $this->memberRequest->getMembers($circle->getSingleId())); |
| 281 | 281 | |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | */ |
| 354 | 354 | public function groupDeleted(string $groupId): void { |
| 355 | 355 | $circle = new Circle(); |
| 356 | - $circle->setName('group:' . $groupId) |
|
| 356 | + $circle->setName('group:'.$groupId) |
|
| 357 | 357 | ->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN) |
| 358 | 358 | ->setSource(Member::TYPE_GROUP); |
| 359 | 359 | |
@@ -78,15 +78,15 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $name = $rowCG['display_name']; |
| 80 | 80 | while (strlen($name) < 3) { |
| 81 | - $name = '_' . $name; |
|
| 81 | + $name = '_'.$name; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - $this->output->writeln('+ New Team <info>' . $name . '</info>, owned by <info>' . $ownerId . '</info>'); |
|
| 84 | + $this->output->writeln('+ New Team <info>'.$name.'</info>, owned by <info>'.$ownerId.'</info>'); |
|
| 85 | 85 | |
| 86 | 86 | // based on owner's userid, we create federateduser and a new circle |
| 87 | 87 | $owner = $this->cachedFed($ownerId); |
| 88 | 88 | if ($owner === null) { |
| 89 | - $this->output->writeln('<error>unknown user</error> ' . $ownerId); |
|
| 89 | + $this->output->writeln('<error>unknown user</error> '.$ownerId); |
|
| 90 | 90 | continue; |
| 91 | 91 | } |
| 92 | 92 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | try { |
| 96 | 96 | $circle = $this->circlesManager->createCircle($name); |
| 97 | 97 | } catch (\Exception $e) { |
| 98 | - $this->output->writeln('<error>' . get_class($e) . ' ' . $e->getMessage() . '</error> with data ' . json_encode($rowCG)); |
|
| 98 | + $this->output->writeln('<error>'.get_class($e).' '.$e->getMessage().'</error> with data '.json_encode($rowCG)); |
|
| 99 | 99 | $this->logger->log(2, 'error while creating circle', ['exception' => $e]); |
| 100 | 100 | $this->circlesManager->stopSession(); |
| 101 | 101 | continue; |
@@ -124,17 +124,17 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | $fedUser = $this->cachedFed($userId); |
| 126 | 126 | if ($fedUser === null) { |
| 127 | - $this->output->writeln('<error>unknown user</error> ' . $userId); |
|
| 127 | + $this->output->writeln('<error>unknown user</error> '.$userId); |
|
| 128 | 128 | continue; |
| 129 | 129 | } |
| 130 | - $this->output->writeln(' - new member <info>' . $userId . '</info>'); |
|
| 130 | + $this->output->writeln(' - new member <info>'.$userId.'</info>'); |
|
| 131 | 131 | |
| 132 | 132 | $member = $this->circlesManager->addMember($circle->getSingleId(), $fedUser); |
| 133 | 133 | if ($rowM['role'] === '1') { |
| 134 | 134 | $this->circlesManager->levelMember($member->getId(), Member::LEVEL_ADMIN); |
| 135 | 135 | } |
| 136 | 136 | } catch (\Exception $e) { |
| 137 | - $this->output->writeln('<error>' . get_class($e) . ' ' . $e->getMessage() . '</error>'); |
|
| 137 | + $this->output->writeln('<error>'.get_class($e).' '.$e->getMessage().'</error>'); |
|
| 138 | 138 | $this->logger->log(2, 'error while migrating custom group member', ['exception' => $e]); |
| 139 | 139 | } |
| 140 | 140 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | ->where($update->expr()->in('id', $update->createNamedParameter($shareIds, IQueryBuilder::PARAM_INT_ARRAY))); |
| 171 | 171 | |
| 172 | 172 | $count = $update->executeStatement(); |
| 173 | - $this->output->writeln('> ' . ((string)$count) . ' shares updated'); |
|
| 173 | + $this->output->writeln('> '.((string)$count).' shares updated'); |
|
| 174 | 174 | |
| 175 | 175 | $this->fixShareChildren($shareIds, $memberIds); |
| 176 | 176 | } |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | try { |
| 187 | 187 | $this->fedList[$userId] = $this->circlesManager->getLocalFederatedUser($userId); |
| 188 | 188 | } catch (\Exception $e) { |
| 189 | - $this->logger->warning('unknown local user ' . $userId, ['exception' => $e]); |
|
| 189 | + $this->logger->warning('unknown local user '.$userId, ['exception' => $e]); |
|
| 190 | 190 | $this->fedList[$userId] = null; |
| 191 | 191 | } |
| 192 | 192 | } |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | $count += $update->executeStatement(); |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | - $this->output->writeln('> ' . ((string)$count) . ' children shares updated'); |
|
| 223 | + $this->output->writeln('> '.((string)$count).' children shares updated'); |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | |