@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | public function getCachedRemoteInstance(string $instance): RemoteInstance { |
331 | 331 | $remoteInstance = $this->remoteRequest->getFromInstance($instance); |
332 | 332 | if ($remoteInstance->getType() === RemoteInstance::TYPE_UNKNOWN) { |
333 | - throw new UnknownRemoteException($instance . ' is set as \'unknown\' in database'); |
|
333 | + throw new UnknownRemoteException($instance.' is set as \'unknown\' in database'); |
|
334 | 334 | } |
335 | 335 | |
336 | 336 | return $remoteInstance; |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | * @throws RemoteNotFoundException |
572 | 572 | * @throws RemoteUidException |
573 | 573 | */ |
574 | - public function confirmValidRemote(RemoteInstance $remote, ?RemoteInstance &$stored = null): void { |
|
574 | + public function confirmValidRemote(RemoteInstance $remote, ?RemoteInstance & $stored = null): void { |
|
575 | 575 | try { |
576 | 576 | $stored = $this->remoteRequest->getFromHref($remote->getId()); |
577 | 577 | } catch (RemoteNotFoundException $e) { |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | } |
439 | 439 | |
440 | 440 | $ids = array_map( |
441 | - function (ShareWrapper $share): string { |
|
441 | + function(ShareWrapper $share): string { |
|
442 | 442 | return $share->getId(); |
443 | 443 | }, |
444 | 444 | $this->getItemsFromRequest($qb) |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | $expr = $qb->expr(); |
454 | 454 | $qb->leftJoin( |
455 | 455 | CoreQueryBuilder::SHARE, CoreRequestBuilder::TABLE_SHARE, 'p', |
456 | - $expr->andX($expr->eq('p.id', CoreQueryBuilder::SHARE . '.parent')) |
|
456 | + $expr->andX($expr->eq('p.id', CoreQueryBuilder::SHARE.'.parent')) |
|
457 | 457 | ); |
458 | 458 | |
459 | 459 | $qb->filterNull('parent'); |
@@ -61,9 +61,9 @@ discard block |
||
61 | 61 | |
62 | 62 | public static $DELAY = |
63 | 63 | [ |
64 | - 1 => 60, // every minute |
|
65 | - 2 => 300, // every 5 minutes |
|
66 | - 3 => 3600, // every hour |
|
64 | + 1 => 60, // every minute |
|
65 | + 2 => 300, // every 5 minutes |
|
66 | + 3 => 3600, // every hour |
|
67 | 67 | 4 => 75400, // every day |
68 | 68 | 5 => 432000 // evey week |
69 | 69 | ]; |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $this->federatedUserService->bypassCurrentUserCondition(true); |
179 | 179 | |
180 | 180 | $this->lockMaintenanceRun(); |
181 | - $this->debug('running maintenance (' . $level . ')'); |
|
181 | + $this->debug('running maintenance ('.$level.')'); |
|
182 | 182 | |
183 | 183 | switch ($level) { |
184 | 184 | case 1: |
@@ -349,14 +349,14 @@ discard block |
||
349 | 349 | ->includeSystemCircles(); |
350 | 350 | |
351 | 351 | $circles = array_map( |
352 | - function (Circle $circle) { |
|
352 | + function(Circle $circle) { |
|
353 | 353 | return $circle->getSingleId(); |
354 | 354 | }, $this->circleRequest->getCircles(null, $probe) |
355 | 355 | ); |
356 | 356 | |
357 | 357 | $shares = array_unique( |
358 | 358 | array_map( |
359 | - function (ShareWrapper $share) { |
|
359 | + function(ShareWrapper $share) { |
|
360 | 360 | return $share->getSharedWith(); |
361 | 361 | }, $this->shareWrapperRequest->getShares() |
362 | 362 | ) |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | */ |
502 | 502 | private function output(string $message): void { |
503 | 503 | if (!is_null($this->output)) { |
504 | - $this->output->writeln('- ' . $message); |
|
504 | + $this->output->writeln('- '.$message); |
|
505 | 505 | } |
506 | 506 | } |
507 | 507 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | } catch (FederatedItemException $e) { |
125 | 125 | if ($input->getOption('status-code')) { |
126 | 126 | throw new FederatedItemException( |
127 | - ' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage() |
|
127 | + ' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage() |
|
128 | 128 | ); |
129 | 129 | } |
130 | 130 | |
@@ -136,9 +136,9 @@ discard block |
||
136 | 136 | } elseif (strtolower($input->getOption('output')) !== 'none') { |
137 | 137 | /** @var Circle $circle */ |
138 | 138 | $circle = $this->deserialize($outcome, Circle::class); |
139 | - $output->writeln('Id: <info>' . $circle->getSingleId() . '</info>'); |
|
140 | - $output->writeln('Name: <info>' . $circle->getDisplayName() . '</info>'); |
|
141 | - $output->writeln('Owner: <info>' . $circle->getOwner()->getDisplayName() . '</info>'); |
|
139 | + $output->writeln('Id: <info>'.$circle->getSingleId().'</info>'); |
|
140 | + $output->writeln('Name: <info>'.$circle->getDisplayName().'</info>'); |
|
141 | + $output->writeln('Owner: <info>'.$circle->getOwner()->getDisplayName().'</info>'); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | return 0; |
@@ -403,9 +403,9 @@ discard block |
||
403 | 403 | |
404 | 404 | $display = $circle->getDisplayName(); |
405 | 405 | if ($circle->getSource() === Member::TYPE_CIRCLE) { |
406 | - $display .= ' (Circle owned by ' . $circle->getOwner()->getDisplayName() . ')'; |
|
406 | + $display .= ' (Circle owned by '.$circle->getOwner()->getDisplayName().')'; |
|
407 | 407 | } else { |
408 | - $display .= ' (' . Circle::$DEF_SOURCE[$circle->getSource()] . ')'; |
|
408 | + $display .= ' ('.Circle::$DEF_SOURCE[$circle->getSource()].')'; |
|
409 | 409 | } |
410 | 410 | |
411 | 411 | $share->setSharedWithDisplayName($display); |
@@ -502,20 +502,20 @@ discard block |
||
502 | 502 | |
503 | 503 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
504 | 504 | $shareTime = new DateTime(); |
505 | - $shareTime->setTimestamp($this->getInt($prefix . 'stime', $data)); |
|
506 | - |
|
507 | - $this->setId($this->get($prefix . 'id', $data)) |
|
508 | - ->setShareType($this->getInt($prefix . 'share_type', $data)) |
|
509 | - ->setPermissions($this->getInt($prefix . 'permissions', $data)) |
|
510 | - ->setItemType($this->get($prefix . 'item_type', $data)) |
|
511 | - ->setItemSource($this->getInt($prefix . 'item_source', $data)) |
|
512 | - ->setItemTarget($this->get($prefix . 'item_target', $data)) |
|
513 | - ->setFileSource($this->getInt($prefix . 'file_source', $data)) |
|
514 | - ->setFileTarget($this->get($prefix . 'file_target', $data)) |
|
515 | - ->setSharedWith($this->get($prefix . 'share_with', $data)) |
|
516 | - ->setSharedBy($this->get($prefix . 'uid_initiator', $data)) |
|
517 | - ->setShareOwner($this->get($prefix . 'uid_owner', $data)) |
|
518 | - ->setToken($this->get($prefix . 'token', $data)) |
|
505 | + $shareTime->setTimestamp($this->getInt($prefix.'stime', $data)); |
|
506 | + |
|
507 | + $this->setId($this->get($prefix.'id', $data)) |
|
508 | + ->setShareType($this->getInt($prefix.'share_type', $data)) |
|
509 | + ->setPermissions($this->getInt($prefix.'permissions', $data)) |
|
510 | + ->setItemType($this->get($prefix.'item_type', $data)) |
|
511 | + ->setItemSource($this->getInt($prefix.'item_source', $data)) |
|
512 | + ->setItemTarget($this->get($prefix.'item_target', $data)) |
|
513 | + ->setFileSource($this->getInt($prefix.'file_source', $data)) |
|
514 | + ->setFileTarget($this->get($prefix.'file_target', $data)) |
|
515 | + ->setSharedWith($this->get($prefix.'share_with', $data)) |
|
516 | + ->setSharedBy($this->get($prefix.'uid_initiator', $data)) |
|
517 | + ->setShareOwner($this->get($prefix.'uid_owner', $data)) |
|
518 | + ->setToken($this->get($prefix.'token', $data)) |
|
519 | 519 | ->setShareTime($shareTime); |
520 | 520 | |
521 | 521 | // if (($password = $this->get('personal_password', $data, '')) !== '') { |
@@ -524,9 +524,9 @@ discard block |
||
524 | 524 | // $share->setPassword($this->get('password', $data, '')); |
525 | 525 | // } |
526 | 526 | |
527 | - $this->setChildId($this->getInt($prefix . 'child_id', $data)) |
|
528 | - ->setChildFileTarget($this->get($prefix . 'child_file_target', $data)) |
|
529 | - ->setChildPermissions($this->getInt($prefix . 'child_permissions', $data)) |
|
527 | + $this->setChildId($this->getInt($prefix.'child_id', $data)) |
|
528 | + ->setChildFileTarget($this->get($prefix.'child_file_target', $data)) |
|
529 | + ->setChildPermissions($this->getInt($prefix.'child_permissions', $data)) |
|
530 | 530 | ->setProviderId(ShareByCircleProvider::IDENTIFIER) |
531 | 531 | ->setStatus(Ishare::STATUS_ACCEPTED); |
532 | 532 |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | } |
393 | 393 | |
394 | 394 | if ($circle->getDisplayName() !== '') { |
395 | - $this->searchInDBField('display_name', '%' . $circle->getDisplayName() . '%'); |
|
395 | + $this->searchInDBField('display_name', '%'.$circle->getDisplayName().'%'); |
|
396 | 396 | } |
397 | 397 | if ($circle->getSource() > 0) { |
398 | 398 | $this->limitInt('source', $circle->getSource()); |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | $this->generateRemoteInstanceSelectAlias($aliasRemoteInstance) |
415 | 415 | ->leftJoin( |
416 | 416 | $alias, CoreRequestBuilder::TABLE_REMOTE, $aliasRemoteInstance, |
417 | - $expr->eq($alias . '.instance', $aliasRemoteInstance . '.instance') |
|
417 | + $expr->eq($alias.'.instance', $aliasRemoteInstance.'.instance') |
|
418 | 418 | ); |
419 | 419 | } catch (RequestBuilderException $e) { |
420 | 420 | } |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | $expr = $this->expr(); |
467 | 467 | $this->leftJoin( |
468 | 468 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_REMOTE, $aliasRemote, |
469 | - $expr->eq($aliasRemote . '.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
469 | + $expr->eq($aliasRemote.'.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
470 | 470 | ); |
471 | 471 | } |
472 | 472 | |
@@ -494,12 +494,12 @@ discard block |
||
494 | 494 | $this->leftJoin( |
495 | 495 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteMember, |
496 | 496 | $expr->andX( |
497 | - $expr->eq($aliasRemoteMember . '.circle_id', $aliasCircle . '.unique_id'), |
|
497 | + $expr->eq($aliasRemoteMember.'.circle_id', $aliasCircle.'.unique_id'), |
|
498 | 498 | $expr->eq( |
499 | - $aliasRemoteMember . '.instance', |
|
499 | + $aliasRemoteMember.'.instance', |
|
500 | 500 | $this->createNamedParameter($remoteInstance->getInstance()) |
501 | 501 | ), |
502 | - $expr->gte($aliasRemoteMember . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
502 | + $expr->gte($aliasRemoteMember.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
503 | 503 | ) |
504 | 504 | ); |
505 | 505 | } |
@@ -531,21 +531,21 @@ discard block |
||
531 | 531 | $this->leftJoin( |
532 | 532 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircle, |
533 | 533 | $expr->andX( |
534 | - $expr->eq($aliasRemoteCircle . '.single_id', $aliasCircle . '.unique_id'), |
|
535 | - $expr->emptyString($aliasRemoteCircle . '.instance'), |
|
536 | - $expr->gte($aliasRemoteCircle . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
534 | + $expr->eq($aliasRemoteCircle.'.single_id', $aliasCircle.'.unique_id'), |
|
535 | + $expr->emptyString($aliasRemoteCircle.'.instance'), |
|
536 | + $expr->gte($aliasRemoteCircle.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
537 | 537 | ) |
538 | 538 | ); |
539 | 539 | $this->leftJoin( |
540 | 540 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircleOwner, |
541 | 541 | $expr->andX( |
542 | - $expr->eq($aliasRemoteCircle . '.circle_id', $aliasRemoteCircleOwner . '.circle_id'), |
|
542 | + $expr->eq($aliasRemoteCircle.'.circle_id', $aliasRemoteCircleOwner.'.circle_id'), |
|
543 | 543 | $expr->eq( |
544 | - $aliasRemoteCircleOwner . '.instance', |
|
544 | + $aliasRemoteCircleOwner.'.instance', |
|
545 | 545 | $this->createNamedParameter($remoteInstance->getInstance()) |
546 | 546 | ), |
547 | 547 | $expr->eq( |
548 | - $aliasRemoteCircleOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
548 | + $aliasRemoteCircleOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
549 | 549 | ) |
550 | 550 | ) |
551 | 551 | ); |
@@ -578,16 +578,16 @@ discard block |
||
578 | 578 | $expr = $this->expr(); |
579 | 579 | $orX = $expr->orX(); |
580 | 580 | $orX->add( |
581 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
581 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
582 | 582 | ); |
583 | 583 | |
584 | 584 | $orExtOrPassive = $expr->orX(); |
585 | 585 | $orExtOrPassive->add( |
586 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
586 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
587 | 587 | ); |
588 | 588 | if (!$sensitive) { |
589 | 589 | $orExtOrPassive->add( |
590 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
590 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
591 | 591 | ); |
592 | 592 | } else { |
593 | 593 | if ($this->getDefaultSelectAlias() === CoreQueryBuilder::MEMBER) { |
@@ -596,8 +596,8 @@ discard block |
||
596 | 596 | } |
597 | 597 | |
598 | 598 | $orInstance = $expr->orX(); |
599 | - $orInstance->add($expr->isNotNull($aliasRemoteMember . '.instance')); |
|
600 | - $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner . '.instance')); |
|
599 | + $orInstance->add($expr->isNotNull($aliasRemoteMember.'.instance')); |
|
600 | + $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner.'.instance')); |
|
601 | 601 | |
602 | 602 | $andExternal = $expr->andX(); |
603 | 603 | $andExternal->add($orExtOrPassive); |
@@ -606,13 +606,13 @@ discard block |
||
606 | 606 | $orExtOrTrusted = $expr->orX(); |
607 | 607 | $orExtOrTrusted->add($andExternal); |
608 | 608 | $orExtOrTrusted->add( |
609 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
609 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
610 | 610 | ); |
611 | 611 | |
612 | 612 | $andTrusted = $expr->andX(); |
613 | 613 | $andTrusted->add($orExtOrTrusted); |
614 | 614 | $andTrusted->add($this->exprLimitBitwise('config', Circle::CFG_FEDERATED, $aliasCircle)); |
615 | - $andTrusted->add($expr->emptyString($aliasOwner . '.instance')); |
|
615 | + $andTrusted->add($expr->emptyString($aliasOwner.'.instance')); |
|
616 | 616 | $orX->add($andTrusted); |
617 | 617 | |
618 | 618 | $this->andWhere($orX); |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | } |
640 | 640 | $this->innerJoin( |
641 | 641 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
642 | - $expr->eq($aliasMember . '.circle_id', $alias . '.unique_id') |
|
642 | + $expr->eq($aliasMember.'.circle_id', $alias.'.unique_id') |
|
643 | 643 | ); |
644 | 644 | |
645 | 645 | $this->filterDirectMembership($aliasMember, $member); |
@@ -664,12 +664,12 @@ discard block |
||
664 | 664 | $aliasCircle, |
665 | 665 | 'circles_membership', |
666 | 666 | $aliasMembership, |
667 | - $this->expr()->eq($aliasCircle . '.unique_id', $aliasMembership . '.circle_id') |
|
667 | + $this->expr()->eq($aliasCircle.'.unique_id', $aliasMembership.'.circle_id') |
|
668 | 668 | ); |
669 | 669 | |
670 | 670 | $this->andWhere( |
671 | 671 | $this->expr()->eq( |
672 | - $aliasMembership . '.single_id', |
|
672 | + $aliasMembership.'.single_id', |
|
673 | 673 | $this->createNamedParameter($federatedUser->getSingleId()) |
674 | 674 | ) |
675 | 675 | ); |
@@ -690,19 +690,19 @@ discard block |
||
690 | 690 | |
691 | 691 | if ($member->getUserId() !== '') { |
692 | 692 | $andX->add( |
693 | - $expr->eq($aliasMember . '.user_id', $this->createNamedParameter($member->getUserId())) |
|
693 | + $expr->eq($aliasMember.'.user_id', $this->createNamedParameter($member->getUserId())) |
|
694 | 694 | ); |
695 | 695 | } |
696 | 696 | |
697 | 697 | if ($member->getSingleId() !== '') { |
698 | 698 | $andX->add( |
699 | - $expr->eq($aliasMember . '.single_id', $this->createNamedParameter($member->getSingleId())) |
|
699 | + $expr->eq($aliasMember.'.single_id', $this->createNamedParameter($member->getSingleId())) |
|
700 | 700 | ); |
701 | 701 | } |
702 | 702 | |
703 | 703 | if ($member->getUserType() > 0) { |
704 | 704 | $andX->add( |
705 | - $expr->eq($aliasMember . '.user_type', $this->createNamedParameter($member->getUserType())) |
|
705 | + $expr->eq($aliasMember.'.user_type', $this->createNamedParameter($member->getUserType())) |
|
706 | 706 | ); |
707 | 707 | } |
708 | 708 | |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | if ($member->getLevel() > 0) { |
712 | 712 | $andX->add( |
713 | 713 | $expr->gte( |
714 | - $aliasMember . '.level', |
|
714 | + $aliasMember.'.level', |
|
715 | 715 | $this->createNamedParameter($member->getLevel(), IQueryBuilder::PARAM_INT) |
716 | 716 | ) |
717 | 717 | ); |
@@ -752,7 +752,7 @@ discard block |
||
752 | 752 | $helperAlias, |
753 | 753 | CoreRequestBuilder::TABLE_CIRCLE, |
754 | 754 | $aliasCircle, |
755 | - $expr->eq($aliasCircle . '.unique_id', $helperAlias . '.' . $field) |
|
755 | + $expr->eq($aliasCircle.'.unique_id', $helperAlias.'.'.$field) |
|
756 | 756 | ); |
757 | 757 | |
758 | 758 | if (!is_null($initiator)) { |
@@ -783,7 +783,7 @@ discard block |
||
783 | 783 | $this->generateCircleSelectAlias($aliasInvitedBy) |
784 | 784 | ->leftJoin( |
785 | 785 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasInvitedBy, |
786 | - $expr->eq($aliasMember . '.invited_by', $aliasInvitedBy . '.unique_id') |
|
786 | + $expr->eq($aliasMember.'.invited_by', $aliasInvitedBy.'.unique_id') |
|
787 | 787 | ); |
788 | 788 | |
789 | 789 | $this->leftJoinOwner($aliasInvitedBy); |
@@ -814,7 +814,7 @@ discard block |
||
814 | 814 | $this->generateCircleSelectAlias($aliasBasedOn) |
815 | 815 | ->leftJoin( |
816 | 816 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasBasedOn, |
817 | - $expr->eq($aliasBasedOn . '.unique_id', $aliasMember . '.single_id') |
|
817 | + $expr->eq($aliasBasedOn.'.unique_id', $aliasMember.'.single_id') |
|
818 | 818 | ); |
819 | 819 | |
820 | 820 | if (!is_null($initiator)) { |
@@ -847,9 +847,9 @@ discard block |
||
847 | 847 | ->leftJoin( |
848 | 848 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
849 | 849 | $expr->andX( |
850 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $field), |
|
850 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$field), |
|
851 | 851 | $expr->eq( |
852 | - $aliasMember . '.level', |
|
852 | + $aliasMember.'.level', |
|
853 | 853 | $this->createNamedParameter(Member::LEVEL_OWNER, self::PARAM_INT) |
854 | 854 | ) |
855 | 855 | ) |
@@ -887,10 +887,10 @@ discard block |
||
887 | 887 | ->leftJoin( |
888 | 888 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
889 | 889 | $expr->andX( |
890 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $fieldCircleId), |
|
891 | - $expr->eq($aliasMember . '.single_id', $alias . '.' . $fieldSingleId), |
|
890 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$fieldCircleId), |
|
891 | + $expr->eq($aliasMember.'.single_id', $alias.'.'.$fieldSingleId), |
|
892 | 892 | $expr->gte( |
893 | - $aliasMember . '.level', |
|
893 | + $aliasMember.'.level', |
|
894 | 894 | $this->createNamedParameter(Member::LEVEL_MEMBER, self::PARAM_INT) |
895 | 895 | ) |
896 | 896 | ) |
@@ -923,7 +923,7 @@ discard block |
||
923 | 923 | |
924 | 924 | $this->leftJoin( |
925 | 925 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
926 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
926 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
927 | 927 | ); |
928 | 928 | |
929 | 929 | // if (!$this->getBool('getData', $options, false)) { |
@@ -937,8 +937,8 @@ discard block |
||
937 | 937 | ->leftJoin( |
938 | 938 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
939 | 939 | $expr->andX( |
940 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id'), |
|
941 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id') |
|
940 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id'), |
|
941 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id') |
|
942 | 942 | ) |
943 | 943 | ); |
944 | 944 | |
@@ -955,12 +955,12 @@ discard block |
||
955 | 955 | $aliasUpstreamMembership = $this->generateAlias($alias, self::UPSTREAM_MEMBERSHIPS, $options); |
956 | 956 | $this->leftJoin( |
957 | 957 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasUpstreamMembership, |
958 | - $expr->eq($aliasUpstreamMembership . '.single_id', $this->createNamedParameter($singleId)) |
|
958 | + $expr->eq($aliasUpstreamMembership.'.single_id', $this->createNamedParameter($singleId)) |
|
959 | 959 | ); |
960 | 960 | |
961 | 961 | $orX = $expr->orX( |
962 | - $expr->eq($aliasUpstreamMembership . '.circle_id', $alias . '.' . $field), |
|
963 | - $expr->eq($alias . '.' . $field, $this->createNamedParameter($singleId)) |
|
962 | + $expr->eq($aliasUpstreamMembership.'.circle_id', $alias.'.'.$field), |
|
963 | + $expr->eq($alias.'.'.$field, $this->createNamedParameter($singleId)) |
|
964 | 964 | ); |
965 | 965 | |
966 | 966 | $this->andWhere($orX); |
@@ -981,11 +981,11 @@ discard block |
||
981 | 981 | |
982 | 982 | $expr = $this->expr(); |
983 | 983 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); |
984 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); |
|
984 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); |
|
985 | 985 | if ($level > 1) { |
986 | 986 | $this->andWhere( |
987 | 987 | $expr->gte( |
988 | - $aliasMembership . '.level', |
|
988 | + $aliasMembership.'.level', |
|
989 | 989 | $this->createNamedParameter($level, IQueryBuilder::PARAM_INT) |
990 | 990 | ) |
991 | 991 | ); |
@@ -1013,8 +1013,8 @@ discard block |
||
1013 | 1013 | $this->leftJoin( |
1014 | 1014 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
1015 | 1015 | $expr->andX( |
1016 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field), |
|
1017 | - $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') |
|
1016 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field), |
|
1017 | + $expr->eq($aliasMembership.'.single_id', $alias.'.single_id') |
|
1018 | 1018 | ) |
1019 | 1019 | ); |
1020 | 1020 | |
@@ -1027,8 +1027,8 @@ discard block |
||
1027 | 1027 | ->leftJoin( |
1028 | 1028 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, |
1029 | 1029 | $expr->andX( |
1030 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), |
|
1031 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') |
|
1030 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), |
|
1031 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') |
|
1032 | 1032 | ) |
1033 | 1033 | ); |
1034 | 1034 | } |
@@ -1068,7 +1068,7 @@ discard block |
||
1068 | 1068 | |
1069 | 1069 | $this->leftJoin( |
1070 | 1070 | $alias, CoreRequestBuilder::TABLE_TOKEN, $aliasShareToken, |
1071 | - $expr->eq($aliasShareToken . '.share_id', $alias . '.' . $field) |
|
1071 | + $expr->eq($aliasShareToken.'.share_id', $alias.'.'.$field) |
|
1072 | 1072 | ); |
1073 | 1073 | } |
1074 | 1074 | |
@@ -1110,14 +1110,14 @@ discard block |
||
1110 | 1110 | try { |
1111 | 1111 | $aliasConfig = $this->generateAlias($alias, self::CONFIG, $options); |
1112 | 1112 | $this->selectAlias( |
1113 | - $aliasConfig . '.config', |
|
1114 | - (($alias !== $this->getDefaultSelectAlias()) ? $alias . '_' : '') . 'circle_config' |
|
1113 | + $aliasConfig.'.config', |
|
1114 | + (($alias !== $this->getDefaultSelectAlias()) ? $alias.'_' : '').'circle_config' |
|
1115 | 1115 | ); |
1116 | 1116 | $this->leftJoin( |
1117 | 1117 | $alias, |
1118 | 1118 | CoreRequestBuilder::TABLE_CIRCLE, |
1119 | 1119 | $aliasConfig, |
1120 | - $expr->eq($alias . '.circle_id', $aliasConfig . '.unique_id') |
|
1120 | + $expr->eq($alias.'.circle_id', $aliasConfig.'.unique_id') |
|
1121 | 1121 | ); |
1122 | 1122 | } catch (RequestBuilderException $e) { |
1123 | 1123 | } |
@@ -1155,7 +1155,7 @@ discard block |
||
1155 | 1155 | $aliasMembership, |
1156 | 1156 | $expr->andX( |
1157 | 1157 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasMembership), |
1158 | - $expr->eq($aliasMembership . '.circle_id', $helperAlias . '.' . $field) |
|
1158 | + $expr->eq($aliasMembership.'.circle_id', $helperAlias.'.'.$field) |
|
1159 | 1159 | ) |
1160 | 1160 | ); |
1161 | 1161 | |
@@ -1174,11 +1174,11 @@ discard block |
||
1174 | 1174 | $aliasMembershipCircle = $this->generateAlias($aliasMembership, self::CONFIG, $options); |
1175 | 1175 | $orXMembershipCircle = $expr->orX(); |
1176 | 1176 | array_map( |
1177 | - function (string $alias) use ($orXMembershipCircle, $aliasMembershipCircle) { |
|
1177 | + function(string $alias) use ($orXMembershipCircle, $aliasMembershipCircle) { |
|
1178 | 1178 | $orXMembershipCircle->add( |
1179 | 1179 | $this->expr()->eq( |
1180 | - $alias . '.circle_id', |
|
1181 | - $aliasMembershipCircle . '.unique_id' |
|
1180 | + $alias.'.circle_id', |
|
1181 | + $aliasMembershipCircle.'.unique_id' |
|
1182 | 1182 | ) |
1183 | 1183 | ); |
1184 | 1184 | }, |
@@ -1210,7 +1210,7 @@ discard block |
||
1210 | 1210 | $aliasDirectInitiator, |
1211 | 1211 | $expr->andX( |
1212 | 1212 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasDirectInitiator), |
1213 | - $expr->eq($aliasDirectInitiator . '.circle_id', $helperAlias . '.' . $field) |
|
1213 | + $expr->eq($aliasDirectInitiator.'.circle_id', $helperAlias.'.'.$field) |
|
1214 | 1214 | ) |
1215 | 1215 | ); |
1216 | 1216 | } catch (RequestBuilderException $e) { |
@@ -1224,8 +1224,8 @@ discard block |
||
1224 | 1224 | $this->leftJoin( |
1225 | 1225 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
1226 | 1226 | $expr->andX( |
1227 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), |
|
1228 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') |
|
1227 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), |
|
1228 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') |
|
1229 | 1229 | ) |
1230 | 1230 | ); |
1231 | 1231 | |
@@ -1233,8 +1233,8 @@ discard block |
||
1233 | 1233 | $this->leftJoin( |
1234 | 1234 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
1235 | 1235 | $expr->andX( |
1236 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), |
|
1237 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') |
|
1236 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), |
|
1237 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') |
|
1238 | 1238 | ) |
1239 | 1239 | ); |
1240 | 1240 | |
@@ -1285,7 +1285,7 @@ discard block |
||
1285 | 1285 | $orX->add( |
1286 | 1286 | $expr->andX( |
1287 | 1287 | $this->exprLimitBitwise('config', Circle::CFG_PERSONAL, $aliasMembershipCircle), |
1288 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1288 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1289 | 1289 | ) |
1290 | 1290 | ); |
1291 | 1291 | } |
@@ -1295,10 +1295,10 @@ discard block |
||
1295 | 1295 | $orXLevelCheck = $expr->orX(); |
1296 | 1296 | |
1297 | 1297 | array_map( |
1298 | - function (string $alias) use ($orXLevelCheck, $minimumLevel) { |
|
1298 | + function(string $alias) use ($orXLevelCheck, $minimumLevel) { |
|
1299 | 1299 | $orXLevelCheck->add( |
1300 | 1300 | $this->expr()->gte( |
1301 | - $alias . '.level', |
|
1301 | + $alias.'.level', |
|
1302 | 1302 | $this->createNamedParameter($minimumLevel) |
1303 | 1303 | ) |
1304 | 1304 | ); |
@@ -1388,21 +1388,21 @@ discard block |
||
1388 | 1388 | $expr = $this->expr(); |
1389 | 1389 | $andPassive = $expr->andX(); |
1390 | 1390 | $andPassive->add( |
1391 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1391 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1392 | 1392 | ); |
1393 | 1393 | |
1394 | 1394 | $orMemberOrLevel = $expr->orX(); |
1395 | 1395 | $orMemberOrLevel->add( |
1396 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance') |
|
1396 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance') |
|
1397 | 1397 | ); |
1398 | 1398 | // TODO: do we need this ? (display members from the local instance) |
1399 | 1399 | $orMemberOrLevel->add( |
1400 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance') |
|
1400 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance') |
|
1401 | 1401 | ); |
1402 | 1402 | |
1403 | 1403 | $orMemberOrLevel->add( |
1404 | 1404 | $expr->eq( |
1405 | - $this->getDefaultSelectAlias() . '.level', |
|
1405 | + $this->getDefaultSelectAlias().'.level', |
|
1406 | 1406 | $this->createNamedParameter(Member::LEVEL_OWNER) |
1407 | 1407 | ) |
1408 | 1408 | ); |
@@ -1439,11 +1439,11 @@ discard block |
||
1439 | 1439 | ) |
1440 | 1440 | ->leftJoin( |
1441 | 1441 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, |
1442 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') |
|
1442 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') |
|
1443 | 1443 | ) |
1444 | 1444 | ->leftJoin( |
1445 | 1445 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, |
1446 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') |
|
1446 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') |
|
1447 | 1447 | ); |
1448 | 1448 | } |
1449 | 1449 | |
@@ -1465,8 +1465,8 @@ discard block |
||
1465 | 1465 | $this->leftJoin( |
1466 | 1466 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, |
1467 | 1467 | $expr->andX( |
1468 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), |
|
1469 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') |
|
1468 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), |
|
1469 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') |
|
1470 | 1470 | ) |
1471 | 1471 | ); |
1472 | 1472 | |
@@ -1516,13 +1516,13 @@ discard block |
||
1516 | 1516 | $this->leftJoin( |
1517 | 1517 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, |
1518 | 1518 | $expr->andX( |
1519 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), |
|
1520 | - $expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id') |
|
1519 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), |
|
1520 | + $expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id') |
|
1521 | 1521 | ) |
1522 | 1522 | ); |
1523 | 1523 | |
1524 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); |
|
1525 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); |
|
1524 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); |
|
1525 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); |
|
1526 | 1526 | } |
1527 | 1527 | |
1528 | 1528 | |
@@ -1626,10 +1626,10 @@ discard block |
||
1626 | 1626 | */ |
1627 | 1627 | public function generateAlias(string $base, string $extension, ?array &$options = []): string { |
1628 | 1628 | $search = str_replace('_', '.', $base); |
1629 | - $path = $search . '.' . $extension; |
|
1629 | + $path = $search.'.'.$extension; |
|
1630 | 1630 | if (!$this->validKey($path, self::$SQL_PATH) |
1631 | 1631 | && !in_array($extension, $this->getArray($search, self::$SQL_PATH))) { |
1632 | - throw new RequestBuilderException($extension . ' not found in ' . $search); |
|
1632 | + throw new RequestBuilderException($extension.' not found in '.$search); |
|
1633 | 1633 | } |
1634 | 1634 | |
1635 | 1635 | if (!is_array($options)) { |
@@ -1638,15 +1638,15 @@ discard block |
||
1638 | 1638 | |
1639 | 1639 | $optionPath = ''; |
1640 | 1640 | foreach (explode('.', $path) as $p) { |
1641 | - $optionPath = trim($optionPath . '.' . $p, '.'); |
|
1641 | + $optionPath = trim($optionPath.'.'.$p, '.'); |
|
1642 | 1642 | $options = array_merge( |
1643 | 1643 | $options, |
1644 | - $this->getArray($optionPath . '.' . self::OPTIONS, self::$SQL_PATH), |
|
1645 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) |
|
1644 | + $this->getArray($optionPath.'.'.self::OPTIONS, self::$SQL_PATH), |
|
1645 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) |
|
1646 | 1646 | ); |
1647 | 1647 | } |
1648 | 1648 | |
1649 | - return $base . '_' . $extension; |
|
1649 | + return $base.'_'.$extension; |
|
1650 | 1650 | } |
1651 | 1651 | |
1652 | 1652 | |
@@ -1666,7 +1666,7 @@ discard block |
||
1666 | 1666 | } else { |
1667 | 1667 | $k = $arr; |
1668 | 1668 | } |
1669 | - $path[$k] = $prefix . '_' . $k . '_'; |
|
1669 | + $path[$k] = $prefix.'_'.$k.'_'; |
|
1670 | 1670 | } |
1671 | 1671 | |
1672 | 1672 | return $path; |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | */ |
217 | 217 | public function limitToCreation(int $delay = 0): self { |
218 | 218 | $date = new DateTime('now'); |
219 | - $date->sub(new DateInterval('PT' . $delay . 'M')); |
|
219 | + $date->sub(new DateInterval('PT'.$delay.'M')); |
|
220 | 220 | |
221 | 221 | $this->limitToDBFieldDateTime('creation', $date, true); |
222 | 222 | |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $expr = $this->expr(); |
234 | 234 | $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() |
235 | 235 | . '.' : ''; |
236 | - $field = $pf . $field; |
|
236 | + $field = $pf.$field; |
|
237 | 237 | |
238 | 238 | $orX = $expr->orX(); |
239 | 239 | $orX->add( |
@@ -263,8 +263,8 @@ discard block |
||
263 | 263 | } |
264 | 264 | |
265 | 265 | $expr = $this->expr(); |
266 | - $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() . '.' : ''; |
|
267 | - $field = $pf . $field; |
|
266 | + $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias().'.' : ''; |
|
267 | + $field = $pf.$field; |
|
268 | 268 | |
269 | 269 | $orX = $expr->orX(); |
270 | 270 | $orX->add( |
@@ -282,8 +282,8 @@ discard block |
||
282 | 282 | public function searchInDBField(string $field, string $value): void { |
283 | 283 | $expr = $this->expr(); |
284 | 284 | |
285 | - $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() . '.' : ''; |
|
286 | - $field = $pf . $field; |
|
285 | + $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias().'.' : ''; |
|
286 | + $field = $pf.$field; |
|
287 | 287 | |
288 | 288 | $this->andWhere($expr->iLike($field, $this->createNamedParameter($value))); |
289 | 289 | } |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | */ |
406 | 406 | public function exprLike(string $field, string $value, string $alias = '', bool $cs = true): string { |
407 | 407 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
408 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
408 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
409 | 409 | } |
410 | 410 | |
411 | 411 | $expr = $this->expr(); |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | |
419 | 419 | public function exprLimit(string $field, string $value, string $alias = '', bool $cs = true): IQueryFunction { |
420 | 420 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
421 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
421 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
422 | 422 | } |
423 | 423 | |
424 | 424 | $expr = $this->expr(); |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | |
437 | 437 | public function exprLimitInt(string $field, int $value, string $alias = ''): IQueryFunction { |
438 | 438 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
439 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
439 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
440 | 440 | } |
441 | 441 | |
442 | 442 | $expr = $this->expr(); |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | */ |
455 | 455 | public function exprLimitBool(string $field, bool $value, string $alias = ''): IQueryFunction { |
456 | 456 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
457 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
457 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
458 | 458 | } |
459 | 459 | |
460 | 460 | $expr = $this->expr(); |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | string $alias = '' |
476 | 476 | ): ICompositeExpression { |
477 | 477 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
478 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
478 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
479 | 479 | } |
480 | 480 | |
481 | 481 | $expr = $this->expr(); |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | string $alias = '' |
502 | 502 | ): ICompositeExpression { |
503 | 503 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
504 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
504 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
505 | 505 | } |
506 | 506 | |
507 | 507 | $expr = $this->expr(); |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | bool $cs = true |
531 | 531 | ): ICompositeExpression { |
532 | 532 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
533 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
533 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
534 | 534 | } |
535 | 535 | |
536 | 536 | $andX = $this->expr()->andX(); |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | */ |
556 | 556 | public function exprLimitInArray(string $field, array $values, string $alias = ''): IQueryFunction { |
557 | 557 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
558 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
558 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
559 | 559 | } |
560 | 560 | |
561 | 561 | $expr = $this->expr(); |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | */ |
574 | 574 | public function exprLimitBitwise(string $field, int $flag, string $alias = ''): IQueryFunction { |
575 | 575 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
576 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
576 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
577 | 577 | } |
578 | 578 | |
579 | 579 | $expr = $this->expr(); |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | */ |
596 | 596 | public function exprLt(string $field, int $value, bool $lte = false, string $alias = ''): IQueryFunction { |
597 | 597 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
598 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
598 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
599 | 599 | } |
600 | 600 | |
601 | 601 | $expr = $this->expr(); |
@@ -617,7 +617,7 @@ discard block |
||
617 | 617 | */ |
618 | 618 | public function exprGt(string $field, int $value, bool $gte = false, string $alias = ''): IQueryFunction { |
619 | 619 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
620 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
620 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
621 | 621 | } |
622 | 622 | |
623 | 623 | $expr = $this->expr(); |
@@ -726,7 +726,7 @@ discard block |
||
726 | 726 | */ |
727 | 727 | public function exprUnlike(string $field, string $value, string $alias = '', bool $cs = true): string { |
728 | 728 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
729 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
729 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
730 | 730 | } |
731 | 731 | |
732 | 732 | $expr = $this->expr(); |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | */ |
751 | 751 | public function exprFilter(string $field, string $value, string $alias = '', bool $cs = true): string { |
752 | 752 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
753 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
753 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
754 | 754 | } |
755 | 755 | |
756 | 756 | $expr = $this->expr(); |
@@ -776,7 +776,7 @@ discard block |
||
776 | 776 | */ |
777 | 777 | public function exprFilterInt(string $field, int $value, string $alias = ''): string { |
778 | 778 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
779 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
779 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
780 | 780 | } |
781 | 781 | |
782 | 782 | $expr = $this->expr(); |
@@ -794,7 +794,7 @@ discard block |
||
794 | 794 | */ |
795 | 795 | public function exprFilterBool(string $field, bool $value, string $alias = ''): string { |
796 | 796 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
797 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
797 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
798 | 798 | } |
799 | 799 | |
800 | 800 | $expr = $this->expr(); |
@@ -815,7 +815,7 @@ discard block |
||
815 | 815 | string $alias = '' |
816 | 816 | ): ICompositeExpression { |
817 | 817 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
818 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
818 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
819 | 819 | } |
820 | 820 | |
821 | 821 | $expr = $this->expr(); |
@@ -841,7 +841,7 @@ discard block |
||
841 | 841 | string $alias = '' |
842 | 842 | ): ICompositeExpression { |
843 | 843 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
844 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
844 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
845 | 845 | } |
846 | 846 | |
847 | 847 | $expr = $this->expr(); |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | bool $cs = true |
871 | 871 | ): ICompositeExpression { |
872 | 872 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
873 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
873 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
874 | 874 | } |
875 | 875 | |
876 | 876 | $orX = $this->expr()->orX(); |
@@ -895,7 +895,7 @@ discard block |
||
895 | 895 | */ |
896 | 896 | public function exprFilterInArray(string $field, array $values, string $alias = ''): string { |
897 | 897 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
898 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
898 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
899 | 899 | } |
900 | 900 | |
901 | 901 | $expr = $this->expr(); |
@@ -913,7 +913,7 @@ discard block |
||
913 | 913 | */ |
914 | 914 | public function exprFilterBitwise(string $field, int $flag, string $alias = ''): string { |
915 | 915 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
916 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
916 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
917 | 917 | } |
918 | 918 | |
919 | 919 | $expr = $this->expr(); |
@@ -1074,12 +1074,12 @@ discard block |
||
1074 | 1074 | string $alias = '' |
1075 | 1075 | ): self { |
1076 | 1076 | $selectFields = array_map( |
1077 | - function (string $item) use ($alias) { |
|
1077 | + function(string $item) use ($alias) { |
|
1078 | 1078 | if ($alias === '') { |
1079 | 1079 | return $item; |
1080 | 1080 | } |
1081 | 1081 | |
1082 | - return $alias . '.' . $item; |
|
1082 | + return $alias.'.'.$item; |
|
1083 | 1083 | }, $fields |
1084 | 1084 | ); |
1085 | 1085 | |
@@ -1105,13 +1105,13 @@ discard block |
||
1105 | 1105 | string $prefix, |
1106 | 1106 | array $default = [] |
1107 | 1107 | ): self { |
1108 | - $prefix = trim($prefix) . '_'; |
|
1108 | + $prefix = trim($prefix).'_'; |
|
1109 | 1109 | foreach ($default as $k => $v) { |
1110 | - $this->addDefaultValue($prefix . $k, (string)$v); |
|
1110 | + $this->addDefaultValue($prefix.$k, (string)$v); |
|
1111 | 1111 | } |
1112 | 1112 | |
1113 | 1113 | foreach ($fields as $field) { |
1114 | - $this->selectAlias($alias . '.' . $field, $prefix . $field); |
|
1114 | + $this->selectAlias($alias.'.'.$field, $prefix.$field); |
|
1115 | 1115 | } |
1116 | 1116 | |
1117 | 1117 | return $this; |