@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | $l10n = \OCP\Server::get(IFactory::class)->get('circles'); |
| 408 | 408 | $display = $l10n->t('%s (Circle owned by %s)', [$display, $circle->getOwner()->getDisplayName()]); |
| 409 | 409 | } else { |
| 410 | - $display .= ' (' . Circle::$DEF_SOURCE[$circle->getSource()] . ')'; |
|
| 410 | + $display .= ' ('.Circle::$DEF_SOURCE[$circle->getSource()].')'; |
|
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | $share->setSharedWithDisplayName($display); |
@@ -504,20 +504,20 @@ discard block |
||
| 504 | 504 | |
| 505 | 505 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
| 506 | 506 | $shareTime = new DateTime(); |
| 507 | - $shareTime->setTimestamp($this->getInt($prefix . 'stime', $data)); |
|
| 508 | - |
|
| 509 | - $this->setId($this->get($prefix . 'id', $data)) |
|
| 510 | - ->setShareType($this->getInt($prefix . 'share_type', $data)) |
|
| 511 | - ->setPermissions($this->getInt($prefix . 'permissions', $data)) |
|
| 512 | - ->setItemType($this->get($prefix . 'item_type', $data)) |
|
| 513 | - ->setItemSource($this->getInt($prefix . 'item_source', $data)) |
|
| 514 | - ->setItemTarget($this->get($prefix . 'item_target', $data)) |
|
| 515 | - ->setFileSource($this->getInt($prefix . 'file_source', $data)) |
|
| 516 | - ->setFileTarget($this->get($prefix . 'file_target', $data)) |
|
| 517 | - ->setSharedWith($this->get($prefix . 'share_with', $data)) |
|
| 518 | - ->setSharedBy($this->get($prefix . 'uid_initiator', $data)) |
|
| 519 | - ->setShareOwner($this->get($prefix . 'uid_owner', $data)) |
|
| 520 | - ->setToken($this->get($prefix . 'token', $data)) |
|
| 507 | + $shareTime->setTimestamp($this->getInt($prefix.'stime', $data)); |
|
| 508 | + |
|
| 509 | + $this->setId($this->get($prefix.'id', $data)) |
|
| 510 | + ->setShareType($this->getInt($prefix.'share_type', $data)) |
|
| 511 | + ->setPermissions($this->getInt($prefix.'permissions', $data)) |
|
| 512 | + ->setItemType($this->get($prefix.'item_type', $data)) |
|
| 513 | + ->setItemSource($this->getInt($prefix.'item_source', $data)) |
|
| 514 | + ->setItemTarget($this->get($prefix.'item_target', $data)) |
|
| 515 | + ->setFileSource($this->getInt($prefix.'file_source', $data)) |
|
| 516 | + ->setFileTarget($this->get($prefix.'file_target', $data)) |
|
| 517 | + ->setSharedWith($this->get($prefix.'share_with', $data)) |
|
| 518 | + ->setSharedBy($this->get($prefix.'uid_initiator', $data)) |
|
| 519 | + ->setShareOwner($this->get($prefix.'uid_owner', $data)) |
|
| 520 | + ->setToken($this->get($prefix.'token', $data)) |
|
| 521 | 521 | ->setShareTime($shareTime); |
| 522 | 522 | |
| 523 | 523 | // if (($password = $this->get('personal_password', $data, '')) !== '') { |
@@ -526,9 +526,9 @@ discard block |
||
| 526 | 526 | // $share->setPassword($this->get('password', $data, '')); |
| 527 | 527 | // } |
| 528 | 528 | |
| 529 | - $this->setChildId($this->getInt($prefix . 'child_id', $data)) |
|
| 530 | - ->setChildFileTarget($this->get($prefix . 'child_file_target', $data)) |
|
| 531 | - ->setChildPermissions($this->getInt($prefix . 'child_permissions', $data)) |
|
| 529 | + $this->setChildId($this->getInt($prefix.'child_id', $data)) |
|
| 530 | + ->setChildFileTarget($this->get($prefix.'child_file_target', $data)) |
|
| 531 | + ->setChildPermissions($this->getInt($prefix.'child_permissions', $data)) |
|
| 532 | 532 | ->setProviderId(ShareByCircleProvider::IDENTIFIER) |
| 533 | 533 | ->setStatus(Ishare::STATUS_ACCEPTED); |
| 534 | 534 | |
@@ -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 | |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | */ |
| 479 | 479 | public function getTrustedDomains(): array { |
| 480 | 480 | return array_map( |
| 481 | - function (string $address) { |
|
| 481 | + function(string $address) { |
|
| 482 | 482 | return strtolower($address); |
| 483 | 483 | }, $this->config->getSystemValue('trusted_domains', []) |
| 484 | 484 | ); |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | } |
| 515 | 515 | |
| 516 | 516 | if (array_key_exists('port', $loopback)) { |
| 517 | - $loopbackCloudId = $loopback['host'] . ':' . $loopback['port']; |
|
| 517 | + $loopbackCloudId = $loopback['host'].':'.$loopback['port']; |
|
| 518 | 518 | } else { |
| 519 | 519 | $loopbackCloudId = $loopback['host']; |
| 520 | 520 | } |
@@ -553,13 +553,13 @@ discard block |
||
| 553 | 553 | $path = $this->getAppValue(self::LOOPBACK_CLOUD_PATH); |
| 554 | 554 | } |
| 555 | 555 | |
| 556 | - $base = $scheme . '://' . $instance . $path; |
|
| 556 | + $base = $scheme.'://'.$instance.$path; |
|
| 557 | 557 | |
| 558 | 558 | if ($route === '') { |
| 559 | 559 | return $base; |
| 560 | 560 | } |
| 561 | 561 | |
| 562 | - return rtrim($base, '/') . $this->linkToRoute($route, $args); |
|
| 562 | + return rtrim($base, '/').$this->linkToRoute($route, $args); |
|
| 563 | 563 | } |
| 564 | 564 | |
| 565 | 565 | |
@@ -664,7 +664,7 @@ discard block |
||
| 664 | 664 | ): string { |
| 665 | 665 | $name = ($displayName) ? $federatedUser->getDisplayName() : $federatedUser->getUserId(); |
| 666 | 666 | if ($federatedUser->getUserType() === Member::TYPE_MAIL) { |
| 667 | - return $name . ' ' . $this->displayInstance( |
|
| 667 | + return $name.' '.$this->displayInstance( |
|
| 668 | 668 | $federatedUser->getInstance(), |
| 669 | 669 | self::DISPLAY_PARENTHESIS |
| 670 | 670 | ); |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | return $name; |
| 675 | 675 | } |
| 676 | 676 | |
| 677 | - return $name . $this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT); |
|
| 677 | + return $name.$this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT); |
|
| 678 | 678 | } |
| 679 | 679 | |
| 680 | 680 | /** |
@@ -690,9 +690,9 @@ discard block |
||
| 690 | 690 | |
| 691 | 691 | switch ($type) { |
| 692 | 692 | case self::DISPLAY_AT: |
| 693 | - return '@' . $instance; |
|
| 693 | + return '@'.$instance; |
|
| 694 | 694 | case self::DISPLAY_PARENTHESIS: |
| 695 | - return '(' . $instance . ')'; |
|
| 695 | + return '('.$instance.')'; |
|
| 696 | 696 | } |
| 697 | 697 | |
| 698 | 698 | return $instance; |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | public function getInstance(): string { |
| 258 | 258 | $instance = $this->getHost(); |
| 259 | 259 | if ($this->getPort() > 0) { |
| 260 | - $instance .= ':' . $this->getPort(); |
|
| 260 | + $instance .= ':'.$this->getPort(); |
|
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | return $instance; |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | if ($protocol === null) { |
| 282 | 282 | if (strpos($url, '/') > -1) { |
| 283 | 283 | [$address, $baseUrl] = explode('/', $url, 2); |
| 284 | - $this->setBaseUrl('/' . $baseUrl); |
|
| 284 | + $this->setBaseUrl('/'.$baseUrl); |
|
| 285 | 285 | } else { |
| 286 | 286 | $address = $url; |
| 287 | 287 | } |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | continue; |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | - $url = str_replace(':' . $k, $this->data[$k], $url); |
|
| 394 | + $url = str_replace(':'.$k, $this->data[$k], $url); |
|
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | return $url; |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | continue; |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | - $url = str_replace(':' . $k, $this->params[$k], $url); |
|
| 411 | + $url = str_replace(':'.$k, $this->params[$k], $url); |
|
| 412 | 412 | } |
| 413 | 413 | |
| 414 | 414 | return $url; |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | * @return string |
| 420 | 420 | */ |
| 421 | 421 | public function getPath(): string { |
| 422 | - return $this->baseUrl . $this->url; |
|
| 422 | + return $this->baseUrl.$this->url; |
|
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | |
@@ -436,9 +436,9 @@ discard block |
||
| 436 | 436 | * @return string |
| 437 | 437 | */ |
| 438 | 438 | public function getCompleteUrl(): string { |
| 439 | - $port = ($this->getPort() > 0) ? ':' . $this->getPort() : ''; |
|
| 439 | + $port = ($this->getPort() > 0) ? ':'.$this->getPort() : ''; |
|
| 440 | 440 | |
| 441 | - return $this->getUsedProtocol() . '://' . $this->getHost() . $port . $this->getParametersUrl(); |
|
| 441 | + return $this->getUsedProtocol().'://'.$this->getHost().$port.$this->getParametersUrl(); |
|
| 442 | 442 | } |
| 443 | 443 | |
| 444 | 444 | |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | public function addHeader($key, $value): Request { |
| 454 | 454 | $header = $this->get($key, $this->headers); |
| 455 | 455 | if ($header !== '') { |
| 456 | - $header .= ', ' . $value; |
|
| 456 | + $header .= ', '.$value; |
|
| 457 | 457 | } else { |
| 458 | 458 | $header = $value; |
| 459 | 459 | } |
@@ -683,11 +683,11 @@ discard block |
||
| 683 | 683 | |
| 684 | 684 | switch ($this->getQueryStringType()) { |
| 685 | 685 | case self::QS_VAR_ARRAY: |
| 686 | - return '?' . http_build_query($this->getParams()); |
|
| 686 | + return '?'.http_build_query($this->getParams()); |
|
| 687 | 687 | |
| 688 | 688 | case self::QS_VAR_DUPLICATE: |
| 689 | 689 | default: |
| 690 | - return '?' . preg_replace( |
|
| 690 | + return '?'.preg_replace( |
|
| 691 | 691 | '/%5B(?:[0-9]|[1-9][0-9]+)%5D=/', '=', http_build_query($this->getParams()) |
| 692 | 692 | ); |
| 693 | 693 | } |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | RequestResultNotJsonException $e |
| 92 | 92 | ) { |
| 93 | 93 | $this->miscService->log( |
| 94 | - 'Issue while search users from lookup: ' . get_class($e) . ' ' . $e->getMessage() |
|
| 94 | + 'Issue while search users from lookup: '.get_class($e).' '.$e->getMessage() |
|
| 95 | 95 | ); |
| 96 | 96 | |
| 97 | 97 | return []; |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | $expr = $qb->expr(); |
| 248 | - $pf = '' . $this->default_select_alias . '.'; |
|
| 248 | + $pf = ''.$this->default_select_alias.'.'; |
|
| 249 | 249 | |
| 250 | 250 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
| 251 | 251 | $qb->selectAlias('u.user_id', 'viewer_userid') |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | ->leftJoin( |
| 260 | 260 | $this->default_select_alias, DeprecatedRequestBuilder::TABLE_MEMBERS, 'u', |
| 261 | 261 | $expr->andX( |
| 262 | - $expr->eq('u.circle_id', $pf . 'unique_id'), |
|
| 262 | + $expr->eq('u.circle_id', $pf.'unique_id'), |
|
| 263 | 263 | $expr->eq('u.user_id', $qb->createNamedParameter($userId)), |
| 264 | 264 | $expr->eq('u.instance', $qb->createNamedParameter($instanceId)), |
| 265 | 265 | $expr->eq('u.user_type', $qb->createNamedParameter($type)) |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | $expr = $qb->expr(); |
| 283 | - $pf = $this->default_select_alias . '.'; |
|
| 283 | + $pf = $this->default_select_alias.'.'; |
|
| 284 | 284 | |
| 285 | 285 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
| 286 | 286 | $qb->selectAlias('o.user_id', 'owner_userid') |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | ->leftJoin( |
| 294 | 294 | $this->default_select_alias, DeprecatedRequestBuilder::TABLE_MEMBERS, 'o', |
| 295 | 295 | $expr->andX( |
| 296 | - $expr->eq('o.circle_id', $pf . 'unique_id'), |
|
| 296 | + $expr->eq('o.circle_id', $pf.'unique_id'), |
|
| 297 | 297 | $expr->eq('o.level', $qb->createNamedParameter(DeprecatedMember::LEVEL_OWNER)), |
| 298 | 298 | $expr->eq('o.user_type', $qb->createNamedParameter(DeprecatedMember::TYPE_USER)) |
| 299 | 299 | ) |
@@ -346,8 +346,8 @@ discard block |
||
| 346 | 346 | $expr = $qb->expr(); |
| 347 | 347 | |
| 348 | 348 | if ($pf === '') { |
| 349 | - $p = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
| 350 | - $qb->andWhere($expr->gte($p . 'level', $qb->createNamedParameter($level))); |
|
| 349 | + $p = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
| 350 | + $qb->andWhere($expr->gte($p.'level', $qb->createNamedParameter($level))); |
|
| 351 | 351 | |
| 352 | 352 | return; |
| 353 | 353 | } |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | if ($p === 'g' && !$this->leftJoinedNCGroupAndUser) { |
| 377 | 377 | continue; |
| 378 | 378 | } |
| 379 | - $orX->add($expr->gte($p . '.level', $qb->createNamedParameter($level))); |
|
| 379 | + $orX->add($expr->gte($p.'.level', $qb->createNamedParameter($level))); |
|
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 | return $orX; |
@@ -391,12 +391,12 @@ discard block |
||
| 391 | 391 | protected function limitToMembersAndAlmost(IQueryBuilder $qb) { |
| 392 | 392 | $expr = $qb->expr(); |
| 393 | 393 | |
| 394 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
| 394 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
| 395 | 395 | |
| 396 | 396 | $orX = $expr->orX(); |
| 397 | - $orX->add($expr->eq($pf . 'status', $qb->createNamedParameter(DeprecatedMember::STATUS_MEMBER))); |
|
| 398 | - $orX->add($expr->eq($pf . 'status', $qb->createNamedParameter(DeprecatedMember::STATUS_INVITED))); |
|
| 399 | - $orX->add($expr->eq($pf . 'status', $qb->createNamedParameter(DeprecatedMember::STATUS_REQUEST))); |
|
| 397 | + $orX->add($expr->eq($pf.'status', $qb->createNamedParameter(DeprecatedMember::STATUS_MEMBER))); |
|
| 398 | + $orX->add($expr->eq($pf.'status', $qb->createNamedParameter(DeprecatedMember::STATUS_INVITED))); |
|
| 399 | + $orX->add($expr->eq($pf.'status', $qb->createNamedParameter(DeprecatedMember::STATUS_REQUEST))); |
|
| 400 | 400 | |
| 401 | 401 | $qb->andWhere($orX); |
| 402 | 402 | } |
@@ -409,8 +409,8 @@ discard block |
||
| 409 | 409 | */ |
| 410 | 410 | public function limitToDBField(IQueryBuilder $qb, $field, $value) { |
| 411 | 411 | $expr = $qb->expr(); |
| 412 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
| 413 | - $qb->andWhere($expr->eq($pf . $field, $qb->createNamedParameter($value))); |
|
| 412 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
| 413 | + $qb->andWhere($expr->eq($pf.$field, $qb->createNamedParameter($value))); |
|
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | |
@@ -421,8 +421,8 @@ discard block |
||
| 421 | 421 | */ |
| 422 | 422 | private function limitToDBFieldOrGreater(IQueryBuilder $qb, $field, $value) { |
| 423 | 423 | $expr = $qb->expr(); |
| 424 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
| 425 | - $qb->andWhere($expr->gte($pf . $field, $qb->createNamedParameter($value))); |
|
| 424 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
| 425 | + $qb->andWhere($expr->gte($pf.$field, $qb->createNamedParameter($value))); |
|
| 426 | 426 | } |
| 427 | 427 | |
| 428 | 428 | |
@@ -437,9 +437,9 @@ discard block |
||
| 437 | 437 | protected function limitToNCGroupUser(IQueryBuilder $qb, $userId = '') { |
| 438 | 438 | $expr = $qb->expr(); |
| 439 | 439 | |
| 440 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
| 440 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
| 441 | 441 | |
| 442 | - $and = $expr->andX($expr->eq($pf . 'user_id', 'ncgu.gid')); |
|
| 442 | + $and = $expr->andX($expr->eq($pf.'user_id', 'ncgu.gid')); |
|
| 443 | 443 | if ($userId !== '') { |
| 444 | 444 | $and->add($expr->eq('ncgu.uid', $qb->createNamedParameter($userId))); |
| 445 | 445 | } else { |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | } |
| 463 | 463 | |
| 464 | 464 | $expr = $qb->expr(); |
| 465 | - $pf = $this->default_select_alias . '.'; |
|
| 465 | + $pf = $this->default_select_alias.'.'; |
|
| 466 | 466 | |
| 467 | 467 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
| 468 | 468 | $qb->selectAlias('lc.type', 'circle_type') |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | ->selectAlias('lc.settings', 'circle_settings') |
| 472 | 472 | ->leftJoin( |
| 473 | 473 | $this->default_select_alias, DeprecatedRequestBuilder::TABLE_CIRCLES, 'lc', |
| 474 | - $expr->eq($pf . 'circle_id', 'lc.unique_id') |
|
| 474 | + $expr->eq($pf.'circle_id', 'lc.unique_id') |
|
| 475 | 475 | ); |
| 476 | 476 | } |
| 477 | 477 | |
@@ -187,11 +187,11 @@ discard block |
||
| 187 | 187 | $this->federatedUserService->commandLineInitiator($initiator, $initiatorType, $circleId, true); |
| 188 | 188 | $circle = $this->circleService->getCircle($circleId); |
| 189 | 189 | |
| 190 | - $output->writeln('<info>Name</info>: ' . $circle->getName()); |
|
| 190 | + $output->writeln('<info>Name</info>: '.$circle->getName()); |
|
| 191 | 191 | $owner = $circle->getOwner(); |
| 192 | - $output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance()); |
|
| 192 | + $output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance()); |
|
| 193 | 193 | $type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
| 194 | - $output->writeln('<info>Config</info>: ' . $type); |
|
| 194 | + $output->writeln('<info>Config</info>: '.$type); |
|
| 195 | 195 | $output->writeln(' '); |
| 196 | 196 | |
| 197 | 197 | $tree = new TreeNode(null, new SimpleDataStore(['circle' => $circle])); |
@@ -256,8 +256,7 @@ discard block |
||
| 256 | 256 | $member, |
| 257 | 257 | $this->input->getOption('display-name') |
| 258 | 258 | ), |
| 259 | - ($level > 0) ? Member::$DEF_LEVEL[$level] : |
|
| 260 | - '(' . strtolower($member->getStatus()) . ')', |
|
| 259 | + ($level > 0) ? Member::$DEF_LEVEL[$level] : '('.strtolower($member->getStatus()).')', |
|
| 261 | 260 | ($member->hasInvitedBy()) ? $this->configService->displayFederatedUser( |
| 262 | 261 | $member->getInvitedBy(), |
| 263 | 262 | $this->input->getOption('display-name') |
@@ -423,14 +422,14 @@ discard block |
||
| 423 | 422 | $member = $data->gObj('member', Member::class); |
| 424 | 423 | |
| 425 | 424 | if ($lineNumber === 1) { |
| 426 | - $line .= '<info>' . $member->getSingleId() . '</info>'; |
|
| 425 | + $line .= '<info>'.$member->getSingleId().'</info>'; |
|
| 427 | 426 | if (!$this->configService->isLocalInstance($member->getInstance())) { |
| 428 | - $line .= '@' . $member->getInstance(); |
|
| 427 | + $line .= '@'.$member->getInstance(); |
|
| 429 | 428 | } |
| 430 | - $line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')'; |
|
| 429 | + $line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')'; |
|
| 431 | 430 | |
| 432 | - $line .= ' <info>MemberId</info>: ' . $member->getId(); |
|
| 433 | - $line .= ' <info>Name</info>: ' . $this->configService->displayFederatedUser( |
|
| 431 | + $line .= ' <info>MemberId</info>: '.$member->getId(); |
|
| 432 | + $line .= ' <info>Name</info>: '.$this->configService->displayFederatedUser( |
|
| 434 | 433 | $member, |
| 435 | 434 | $this->input->getOption('display-name') |
| 436 | 435 | ); |
@@ -438,7 +437,7 @@ discard block |
||
| 438 | 437 | $line .= ' <info>Source</info>: ' |
| 439 | 438 | . Circle::$DEF_SOURCE[$member->getBasedOn()->getSource()]; |
| 440 | 439 | } else { |
| 441 | - $line .= ' <info>Type</info>: ' . Member::$TYPE[$member->getUserType()]; |
|
| 440 | + $line .= ' <info>Type</info>: '.Member::$TYPE[$member->getUserType()]; |
|
| 442 | 441 | } |
| 443 | 442 | } |
| 444 | 443 | |
@@ -451,15 +450,15 @@ discard block |
||
| 451 | 450 | return $line; |
| 452 | 451 | } |
| 453 | 452 | $owner = $circle->getOwner(); |
| 454 | - $line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance(); |
|
| 453 | + $line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance(); |
|
| 455 | 454 | $type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
| 456 | - $line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type; |
|
| 455 | + $line .= ($type === '') ? '' : ' <info>Config</info>: '.$type; |
|
| 457 | 456 | } |
| 458 | 457 | } else { |
| 459 | 458 | if ($lineNumber === 1 && !is_null($circle)) { |
| 460 | - $line .= '<info>' . $circle->getSingleId() . '</info>'; |
|
| 459 | + $line .= '<info>'.$circle->getSingleId().'</info>'; |
|
| 461 | 460 | if (!$this->configService->isLocalInstance($circle->getInstance())) { |
| 462 | - $line .= '@' . $circle->getInstance(); |
|
| 461 | + $line .= '@'.$circle->getInstance(); |
|
| 463 | 462 | } |
| 464 | 463 | } |
| 465 | 464 | } |
@@ -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; |