@@ -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) { |
@@ -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; |
@@ -398,8 +398,8 @@ discard block |
||
398 | 398 | foreach (explode(' ', $circle->getDisplayName()) as $word) { |
399 | 399 | $andX->add( |
400 | 400 | $expr->iLike( |
401 | - $this->getDefaultSelectAlias() . '.' . 'display_name', |
|
402 | - $this->createNamedParameter('%' . $word . '%') |
|
401 | + $this->getDefaultSelectAlias().'.'.'display_name', |
|
402 | + $this->createNamedParameter('%'.$word.'%') |
|
403 | 403 | ) |
404 | 404 | ); |
405 | 405 | } |
@@ -410,8 +410,8 @@ discard block |
||
410 | 410 | foreach (explode(' ', $circle->getDescription()) as $word) { |
411 | 411 | $orDescription->add( |
412 | 412 | $expr->iLike( |
413 | - $this->getDefaultSelectAlias() . '.' . 'description', |
|
414 | - $this->createNamedParameter('%' . $word . '%') |
|
413 | + $this->getDefaultSelectAlias().'.'.'description', |
|
414 | + $this->createNamedParameter('%'.$word.'%') |
|
415 | 415 | ) |
416 | 416 | ); |
417 | 417 | } |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | $this->generateRemoteInstanceSelectAlias($aliasRemoteInstance) |
442 | 442 | ->leftJoin( |
443 | 443 | $alias, CoreRequestBuilder::TABLE_REMOTE, $aliasRemoteInstance, |
444 | - $expr->eq($alias . '.instance', $aliasRemoteInstance . '.instance') |
|
444 | + $expr->eq($alias.'.instance', $aliasRemoteInstance.'.instance') |
|
445 | 445 | ); |
446 | 446 | } catch (RequestBuilderException $e) { |
447 | 447 | } |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | $expr = $this->expr(); |
494 | 494 | $this->leftJoin( |
495 | 495 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_REMOTE, $aliasRemote, |
496 | - $expr->eq($aliasRemote . '.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
496 | + $expr->eq($aliasRemote.'.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
497 | 497 | ); |
498 | 498 | } |
499 | 499 | |
@@ -521,12 +521,12 @@ discard block |
||
521 | 521 | $this->leftJoin( |
522 | 522 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteMember, |
523 | 523 | $expr->andX( |
524 | - $expr->eq($aliasRemoteMember . '.circle_id', $aliasCircle . '.unique_id'), |
|
524 | + $expr->eq($aliasRemoteMember.'.circle_id', $aliasCircle.'.unique_id'), |
|
525 | 525 | $expr->eq( |
526 | - $aliasRemoteMember . '.instance', |
|
526 | + $aliasRemoteMember.'.instance', |
|
527 | 527 | $this->createNamedParameter($remoteInstance->getInstance()) |
528 | 528 | ), |
529 | - $expr->gte($aliasRemoteMember . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
529 | + $expr->gte($aliasRemoteMember.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
530 | 530 | ) |
531 | 531 | ); |
532 | 532 | } |
@@ -558,21 +558,21 @@ discard block |
||
558 | 558 | $this->leftJoin( |
559 | 559 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircle, |
560 | 560 | $expr->andX( |
561 | - $expr->eq($aliasRemoteCircle . '.single_id', $aliasCircle . '.unique_id'), |
|
562 | - $expr->emptyString($aliasRemoteCircle . '.instance'), |
|
563 | - $expr->gte($aliasRemoteCircle . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
561 | + $expr->eq($aliasRemoteCircle.'.single_id', $aliasCircle.'.unique_id'), |
|
562 | + $expr->emptyString($aliasRemoteCircle.'.instance'), |
|
563 | + $expr->gte($aliasRemoteCircle.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
564 | 564 | ) |
565 | 565 | ); |
566 | 566 | $this->leftJoin( |
567 | 567 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircleOwner, |
568 | 568 | $expr->andX( |
569 | - $expr->eq($aliasRemoteCircle . '.circle_id', $aliasRemoteCircleOwner . '.circle_id'), |
|
569 | + $expr->eq($aliasRemoteCircle.'.circle_id', $aliasRemoteCircleOwner.'.circle_id'), |
|
570 | 570 | $expr->eq( |
571 | - $aliasRemoteCircleOwner . '.instance', |
|
571 | + $aliasRemoteCircleOwner.'.instance', |
|
572 | 572 | $this->createNamedParameter($remoteInstance->getInstance()) |
573 | 573 | ), |
574 | 574 | $expr->eq( |
575 | - $aliasRemoteCircleOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
575 | + $aliasRemoteCircleOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
576 | 576 | ) |
577 | 577 | ) |
578 | 578 | ); |
@@ -605,16 +605,16 @@ discard block |
||
605 | 605 | $expr = $this->expr(); |
606 | 606 | $orX = $expr->orX(); |
607 | 607 | $orX->add( |
608 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
608 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
609 | 609 | ); |
610 | 610 | |
611 | 611 | $orExtOrPassive = $expr->orX(); |
612 | 612 | $orExtOrPassive->add( |
613 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
613 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
614 | 614 | ); |
615 | 615 | if (!$sensitive) { |
616 | 616 | $orExtOrPassive->add( |
617 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
617 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
618 | 618 | ); |
619 | 619 | } else { |
620 | 620 | if ($this->getDefaultSelectAlias() === CoreQueryBuilder::MEMBER) { |
@@ -623,8 +623,8 @@ discard block |
||
623 | 623 | } |
624 | 624 | |
625 | 625 | $orInstance = $expr->orX(); |
626 | - $orInstance->add($expr->isNotNull($aliasRemoteMember . '.instance')); |
|
627 | - $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner . '.instance')); |
|
626 | + $orInstance->add($expr->isNotNull($aliasRemoteMember.'.instance')); |
|
627 | + $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner.'.instance')); |
|
628 | 628 | |
629 | 629 | $andExternal = $expr->andX(); |
630 | 630 | $andExternal->add($orExtOrPassive); |
@@ -633,13 +633,13 @@ discard block |
||
633 | 633 | $orExtOrTrusted = $expr->orX(); |
634 | 634 | $orExtOrTrusted->add($andExternal); |
635 | 635 | $orExtOrTrusted->add( |
636 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
636 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
637 | 637 | ); |
638 | 638 | |
639 | 639 | $andTrusted = $expr->andX(); |
640 | 640 | $andTrusted->add($orExtOrTrusted); |
641 | 641 | $andTrusted->add($this->exprLimitBitwise('config', Circle::CFG_FEDERATED, $aliasCircle)); |
642 | - $andTrusted->add($expr->emptyString($aliasOwner . '.instance')); |
|
642 | + $andTrusted->add($expr->emptyString($aliasOwner.'.instance')); |
|
643 | 643 | $orX->add($andTrusted); |
644 | 644 | |
645 | 645 | $this->andWhere($orX); |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | } |
667 | 667 | $this->innerJoin( |
668 | 668 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
669 | - $expr->eq($aliasMember . '.circle_id', $alias . '.unique_id') |
|
669 | + $expr->eq($aliasMember.'.circle_id', $alias.'.unique_id') |
|
670 | 670 | ); |
671 | 671 | |
672 | 672 | $this->filterDirectMembership($aliasMember, $member); |
@@ -691,12 +691,12 @@ discard block |
||
691 | 691 | $aliasCircle, |
692 | 692 | 'circles_membership', |
693 | 693 | $aliasMembership, |
694 | - $this->expr()->eq($aliasCircle . '.unique_id', $aliasMembership . '.circle_id') |
|
694 | + $this->expr()->eq($aliasCircle.'.unique_id', $aliasMembership.'.circle_id') |
|
695 | 695 | ); |
696 | 696 | |
697 | 697 | $this->andWhere( |
698 | 698 | $this->expr()->eq( |
699 | - $aliasMembership . '.single_id', |
|
699 | + $aliasMembership.'.single_id', |
|
700 | 700 | $this->createNamedParameter($federatedUser->getSingleId()) |
701 | 701 | ) |
702 | 702 | ); |
@@ -717,19 +717,19 @@ discard block |
||
717 | 717 | |
718 | 718 | if ($member->getUserId() !== '') { |
719 | 719 | $andX->add( |
720 | - $expr->eq($aliasMember . '.user_id', $this->createNamedParameter($member->getUserId())) |
|
720 | + $expr->eq($aliasMember.'.user_id', $this->createNamedParameter($member->getUserId())) |
|
721 | 721 | ); |
722 | 722 | } |
723 | 723 | |
724 | 724 | if ($member->getSingleId() !== '') { |
725 | 725 | $andX->add( |
726 | - $expr->eq($aliasMember . '.single_id', $this->createNamedParameter($member->getSingleId())) |
|
726 | + $expr->eq($aliasMember.'.single_id', $this->createNamedParameter($member->getSingleId())) |
|
727 | 727 | ); |
728 | 728 | } |
729 | 729 | |
730 | 730 | if ($member->getUserType() > 0) { |
731 | 731 | $andX->add( |
732 | - $expr->eq($aliasMember . '.user_type', $this->createNamedParameter($member->getUserType())) |
|
732 | + $expr->eq($aliasMember.'.user_type', $this->createNamedParameter($member->getUserType())) |
|
733 | 733 | ); |
734 | 734 | } |
735 | 735 | |
@@ -738,7 +738,7 @@ discard block |
||
738 | 738 | if ($member->getLevel() > 0) { |
739 | 739 | $andX->add( |
740 | 740 | $expr->gte( |
741 | - $aliasMember . '.level', |
|
741 | + $aliasMember.'.level', |
|
742 | 742 | $this->createNamedParameter($member->getLevel(), IQueryBuilder::PARAM_INT) |
743 | 743 | ) |
744 | 744 | ); |
@@ -779,7 +779,7 @@ discard block |
||
779 | 779 | $helperAlias, |
780 | 780 | CoreRequestBuilder::TABLE_CIRCLE, |
781 | 781 | $aliasCircle, |
782 | - $expr->eq($aliasCircle . '.unique_id', $helperAlias . '.' . $field) |
|
782 | + $expr->eq($aliasCircle.'.unique_id', $helperAlias.'.'.$field) |
|
783 | 783 | ); |
784 | 784 | |
785 | 785 | if (!is_null($initiator)) { |
@@ -810,7 +810,7 @@ discard block |
||
810 | 810 | $this->generateCircleSelectAlias($aliasInvitedBy) |
811 | 811 | ->leftJoin( |
812 | 812 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasInvitedBy, |
813 | - $expr->eq($aliasMember . '.invited_by', $aliasInvitedBy . '.unique_id') |
|
813 | + $expr->eq($aliasMember.'.invited_by', $aliasInvitedBy.'.unique_id') |
|
814 | 814 | ); |
815 | 815 | |
816 | 816 | $this->leftJoinOwner($aliasInvitedBy); |
@@ -841,7 +841,7 @@ discard block |
||
841 | 841 | $this->generateCircleSelectAlias($aliasBasedOn) |
842 | 842 | ->leftJoin( |
843 | 843 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasBasedOn, |
844 | - $expr->eq($aliasBasedOn . '.unique_id', $aliasMember . '.single_id') |
|
844 | + $expr->eq($aliasBasedOn.'.unique_id', $aliasMember.'.single_id') |
|
845 | 845 | ); |
846 | 846 | |
847 | 847 | if (!is_null($initiator)) { |
@@ -874,9 +874,9 @@ discard block |
||
874 | 874 | ->leftJoin( |
875 | 875 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
876 | 876 | $expr->andX( |
877 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $field), |
|
877 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$field), |
|
878 | 878 | $expr->eq( |
879 | - $aliasMember . '.level', |
|
879 | + $aliasMember.'.level', |
|
880 | 880 | $this->createNamedParameter(Member::LEVEL_OWNER, self::PARAM_INT) |
881 | 881 | ) |
882 | 882 | ) |
@@ -914,10 +914,10 @@ discard block |
||
914 | 914 | ->leftJoin( |
915 | 915 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
916 | 916 | $expr->andX( |
917 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $fieldCircleId), |
|
918 | - $expr->eq($aliasMember . '.single_id', $alias . '.' . $fieldSingleId), |
|
917 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$fieldCircleId), |
|
918 | + $expr->eq($aliasMember.'.single_id', $alias.'.'.$fieldSingleId), |
|
919 | 919 | $expr->gte( |
920 | - $aliasMember . '.level', |
|
920 | + $aliasMember.'.level', |
|
921 | 921 | $this->createNamedParameter(Member::LEVEL_MEMBER, self::PARAM_INT) |
922 | 922 | ) |
923 | 923 | ) |
@@ -950,7 +950,7 @@ discard block |
||
950 | 950 | |
951 | 951 | $this->leftJoin( |
952 | 952 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
953 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
953 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
954 | 954 | ); |
955 | 955 | |
956 | 956 | // if (!$this->getBool('getData', $options, false)) { |
@@ -964,8 +964,8 @@ discard block |
||
964 | 964 | ->leftJoin( |
965 | 965 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
966 | 966 | $expr->andX( |
967 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id'), |
|
968 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id') |
|
967 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id'), |
|
968 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id') |
|
969 | 969 | ) |
970 | 970 | ); |
971 | 971 | |
@@ -982,12 +982,12 @@ discard block |
||
982 | 982 | $aliasUpstreamMembership = $this->generateAlias($alias, self::UPSTREAM_MEMBERSHIPS, $options); |
983 | 983 | $this->leftJoin( |
984 | 984 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasUpstreamMembership, |
985 | - $expr->eq($aliasUpstreamMembership . '.single_id', $this->createNamedParameter($singleId)) |
|
985 | + $expr->eq($aliasUpstreamMembership.'.single_id', $this->createNamedParameter($singleId)) |
|
986 | 986 | ); |
987 | 987 | |
988 | 988 | $orX = $expr->orX( |
989 | - $expr->eq($aliasUpstreamMembership . '.circle_id', $alias . '.' . $field), |
|
990 | - $expr->eq($alias . '.' . $field, $this->createNamedParameter($singleId)) |
|
989 | + $expr->eq($aliasUpstreamMembership.'.circle_id', $alias.'.'.$field), |
|
990 | + $expr->eq($alias.'.'.$field, $this->createNamedParameter($singleId)) |
|
991 | 991 | ); |
992 | 992 | |
993 | 993 | $this->andWhere($orX); |
@@ -1008,11 +1008,11 @@ discard block |
||
1008 | 1008 | |
1009 | 1009 | $expr = $this->expr(); |
1010 | 1010 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); |
1011 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); |
|
1011 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); |
|
1012 | 1012 | if ($level > 1) { |
1013 | 1013 | $this->andWhere( |
1014 | 1014 | $expr->gte( |
1015 | - $aliasMembership . '.level', |
|
1015 | + $aliasMembership.'.level', |
|
1016 | 1016 | $this->createNamedParameter($level, IQueryBuilder::PARAM_INT) |
1017 | 1017 | ) |
1018 | 1018 | ); |
@@ -1040,8 +1040,8 @@ discard block |
||
1040 | 1040 | $this->leftJoin( |
1041 | 1041 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
1042 | 1042 | $expr->andX( |
1043 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field), |
|
1044 | - $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') |
|
1043 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field), |
|
1044 | + $expr->eq($aliasMembership.'.single_id', $alias.'.single_id') |
|
1045 | 1045 | ) |
1046 | 1046 | ); |
1047 | 1047 | |
@@ -1054,8 +1054,8 @@ discard block |
||
1054 | 1054 | ->leftJoin( |
1055 | 1055 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, |
1056 | 1056 | $expr->andX( |
1057 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), |
|
1058 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') |
|
1057 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), |
|
1058 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') |
|
1059 | 1059 | ) |
1060 | 1060 | ); |
1061 | 1061 | } |
@@ -1095,7 +1095,7 @@ discard block |
||
1095 | 1095 | |
1096 | 1096 | $this->leftJoin( |
1097 | 1097 | $alias, CoreRequestBuilder::TABLE_TOKEN, $aliasShareToken, |
1098 | - $expr->eq($aliasShareToken . '.share_id', $alias . '.' . $field) |
|
1098 | + $expr->eq($aliasShareToken.'.share_id', $alias.'.'.$field) |
|
1099 | 1099 | ); |
1100 | 1100 | } |
1101 | 1101 | |
@@ -1137,14 +1137,14 @@ discard block |
||
1137 | 1137 | try { |
1138 | 1138 | $aliasConfig = $this->generateAlias($alias, self::CONFIG, $options); |
1139 | 1139 | $this->selectAlias( |
1140 | - $aliasConfig . '.config', |
|
1141 | - (($alias !== $this->getDefaultSelectAlias()) ? $alias . '_' : '') . 'circle_config' |
|
1140 | + $aliasConfig.'.config', |
|
1141 | + (($alias !== $this->getDefaultSelectAlias()) ? $alias.'_' : '').'circle_config' |
|
1142 | 1142 | ); |
1143 | 1143 | $this->leftJoin( |
1144 | 1144 | $alias, |
1145 | 1145 | CoreRequestBuilder::TABLE_CIRCLE, |
1146 | 1146 | $aliasConfig, |
1147 | - $expr->eq($alias . '.circle_id', $aliasConfig . '.unique_id') |
|
1147 | + $expr->eq($alias.'.circle_id', $aliasConfig.'.unique_id') |
|
1148 | 1148 | ); |
1149 | 1149 | } catch (RequestBuilderException $e) { |
1150 | 1150 | } |
@@ -1182,7 +1182,7 @@ discard block |
||
1182 | 1182 | $aliasMembership, |
1183 | 1183 | $expr->andX( |
1184 | 1184 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasMembership), |
1185 | - $expr->eq($aliasMembership . '.circle_id', $helperAlias . '.' . $field) |
|
1185 | + $expr->eq($aliasMembership.'.circle_id', $helperAlias.'.'.$field) |
|
1186 | 1186 | ) |
1187 | 1187 | ); |
1188 | 1188 | |
@@ -1201,11 +1201,11 @@ discard block |
||
1201 | 1201 | $aliasMembershipCircle = $this->generateAlias($aliasMembership, self::CONFIG, $options); |
1202 | 1202 | $orXMembershipCircle = $expr->orX(); |
1203 | 1203 | array_map( |
1204 | - function (string $alias) use ($orXMembershipCircle, $aliasMembershipCircle) { |
|
1204 | + function(string $alias) use ($orXMembershipCircle, $aliasMembershipCircle) { |
|
1205 | 1205 | $orXMembershipCircle->add( |
1206 | 1206 | $this->expr()->eq( |
1207 | - $alias . '.circle_id', |
|
1208 | - $aliasMembershipCircle . '.unique_id' |
|
1207 | + $alias.'.circle_id', |
|
1208 | + $aliasMembershipCircle.'.unique_id' |
|
1209 | 1209 | ) |
1210 | 1210 | ); |
1211 | 1211 | }, |
@@ -1237,7 +1237,7 @@ discard block |
||
1237 | 1237 | $aliasDirectInitiator, |
1238 | 1238 | $expr->andX( |
1239 | 1239 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasDirectInitiator), |
1240 | - $expr->eq($aliasDirectInitiator . '.circle_id', $helperAlias . '.' . $field) |
|
1240 | + $expr->eq($aliasDirectInitiator.'.circle_id', $helperAlias.'.'.$field) |
|
1241 | 1241 | ) |
1242 | 1242 | ); |
1243 | 1243 | } catch (RequestBuilderException $e) { |
@@ -1251,8 +1251,8 @@ discard block |
||
1251 | 1251 | $this->leftJoin( |
1252 | 1252 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
1253 | 1253 | $expr->andX( |
1254 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), |
|
1255 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') |
|
1254 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), |
|
1255 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') |
|
1256 | 1256 | ) |
1257 | 1257 | ); |
1258 | 1258 | |
@@ -1260,8 +1260,8 @@ discard block |
||
1260 | 1260 | $this->leftJoin( |
1261 | 1261 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
1262 | 1262 | $expr->andX( |
1263 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), |
|
1264 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') |
|
1263 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), |
|
1264 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') |
|
1265 | 1265 | ) |
1266 | 1266 | ); |
1267 | 1267 | |
@@ -1312,7 +1312,7 @@ discard block |
||
1312 | 1312 | $orX->add( |
1313 | 1313 | $expr->andX( |
1314 | 1314 | $this->exprLimitBitwise('config', Circle::CFG_PERSONAL, $aliasMembershipCircle), |
1315 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1315 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1316 | 1316 | ) |
1317 | 1317 | ); |
1318 | 1318 | } |
@@ -1322,10 +1322,10 @@ discard block |
||
1322 | 1322 | $orXLevelCheck = $expr->orX(); |
1323 | 1323 | |
1324 | 1324 | array_map( |
1325 | - function (string $alias) use ($orXLevelCheck, $minimumLevel) { |
|
1325 | + function(string $alias) use ($orXLevelCheck, $minimumLevel) { |
|
1326 | 1326 | $orXLevelCheck->add( |
1327 | 1327 | $this->expr()->gte( |
1328 | - $alias . '.level', |
|
1328 | + $alias.'.level', |
|
1329 | 1329 | $this->createNamedParameter($minimumLevel) |
1330 | 1330 | ) |
1331 | 1331 | ); |
@@ -1415,21 +1415,21 @@ discard block |
||
1415 | 1415 | $expr = $this->expr(); |
1416 | 1416 | $andPassive = $expr->andX(); |
1417 | 1417 | $andPassive->add( |
1418 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1418 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1419 | 1419 | ); |
1420 | 1420 | |
1421 | 1421 | $orMemberOrLevel = $expr->orX(); |
1422 | 1422 | $orMemberOrLevel->add( |
1423 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance') |
|
1423 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance') |
|
1424 | 1424 | ); |
1425 | 1425 | // TODO: do we need this ? (display members from the local instance) |
1426 | 1426 | $orMemberOrLevel->add( |
1427 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance') |
|
1427 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance') |
|
1428 | 1428 | ); |
1429 | 1429 | |
1430 | 1430 | $orMemberOrLevel->add( |
1431 | 1431 | $expr->eq( |
1432 | - $this->getDefaultSelectAlias() . '.level', |
|
1432 | + $this->getDefaultSelectAlias().'.level', |
|
1433 | 1433 | $this->createNamedParameter(Member::LEVEL_OWNER) |
1434 | 1434 | ) |
1435 | 1435 | ); |
@@ -1466,11 +1466,11 @@ discard block |
||
1466 | 1466 | ) |
1467 | 1467 | ->leftJoin( |
1468 | 1468 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, |
1469 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') |
|
1469 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') |
|
1470 | 1470 | ) |
1471 | 1471 | ->leftJoin( |
1472 | 1472 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, |
1473 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') |
|
1473 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') |
|
1474 | 1474 | ); |
1475 | 1475 | } |
1476 | 1476 | |
@@ -1492,8 +1492,8 @@ discard block |
||
1492 | 1492 | $this->leftJoin( |
1493 | 1493 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, |
1494 | 1494 | $expr->andX( |
1495 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), |
|
1496 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') |
|
1495 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), |
|
1496 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') |
|
1497 | 1497 | ) |
1498 | 1498 | ); |
1499 | 1499 | |
@@ -1543,13 +1543,13 @@ discard block |
||
1543 | 1543 | $this->leftJoin( |
1544 | 1544 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, |
1545 | 1545 | $expr->andX( |
1546 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), |
|
1547 | - $expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id') |
|
1546 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), |
|
1547 | + $expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id') |
|
1548 | 1548 | ) |
1549 | 1549 | ); |
1550 | 1550 | |
1551 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); |
|
1552 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); |
|
1551 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); |
|
1552 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); |
|
1553 | 1553 | } |
1554 | 1554 | |
1555 | 1555 | |
@@ -1653,10 +1653,10 @@ discard block |
||
1653 | 1653 | */ |
1654 | 1654 | public function generateAlias(string $base, string $extension, ?array &$options = []): string { |
1655 | 1655 | $search = str_replace('_', '.', $base); |
1656 | - $path = $search . '.' . $extension; |
|
1656 | + $path = $search.'.'.$extension; |
|
1657 | 1657 | if (!$this->validKey($path, self::$SQL_PATH) |
1658 | 1658 | && !in_array($extension, $this->getArray($search, self::$SQL_PATH))) { |
1659 | - throw new RequestBuilderException($extension . ' not found in ' . $search); |
|
1659 | + throw new RequestBuilderException($extension.' not found in '.$search); |
|
1660 | 1660 | } |
1661 | 1661 | |
1662 | 1662 | if (!is_array($options)) { |
@@ -1665,15 +1665,15 @@ discard block |
||
1665 | 1665 | |
1666 | 1666 | $optionPath = ''; |
1667 | 1667 | foreach (explode('.', $path) as $p) { |
1668 | - $optionPath = trim($optionPath . '.' . $p, '.'); |
|
1668 | + $optionPath = trim($optionPath.'.'.$p, '.'); |
|
1669 | 1669 | $options = array_merge( |
1670 | 1670 | $options, |
1671 | - $this->getArray($optionPath . '.' . self::OPTIONS, self::$SQL_PATH), |
|
1672 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) |
|
1671 | + $this->getArray($optionPath.'.'.self::OPTIONS, self::$SQL_PATH), |
|
1672 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) |
|
1673 | 1673 | ); |
1674 | 1674 | } |
1675 | 1675 | |
1676 | - return $base . '_' . $extension; |
|
1676 | + return $base.'_'.$extension; |
|
1677 | 1677 | } |
1678 | 1678 | |
1679 | 1679 | |
@@ -1693,7 +1693,7 @@ discard block |
||
1693 | 1693 | } else { |
1694 | 1694 | $k = $arr; |
1695 | 1695 | } |
1696 | - $path[$k] = $prefix . '_' . $k . '_'; |
|
1696 | + $path[$k] = $prefix.'_'.$k.'_'; |
|
1697 | 1697 | } |
1698 | 1698 | |
1699 | 1699 | return $path; |
@@ -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 |
@@ -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; |