@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | } |
146 | 146 | } catch (Exception $e) { |
147 | 147 | $this->miscService->log( |
148 | - get_class($e) . ' on new event: ' . $e->getMessage() . ' - ' . json_encode($event), 1 |
|
148 | + get_class($e).' on new event: '.$e->getMessage().' - '.json_encode($event), 1 |
|
149 | 149 | ); |
150 | 150 | throw $e; |
151 | 151 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | * @throws RequestResultNotJsonException |
216 | 216 | * @throws GlobalScaleEventException |
217 | 217 | */ |
218 | - public function confirmEvent(GSEvent &$event): void { |
|
218 | + public function confirmEvent(GSEvent & $event): void { |
|
219 | 219 | $this->signEvent($event); |
220 | 220 | |
221 | 221 | $circle = $event->getDeprecatedCircle(); |
@@ -229,13 +229,13 @@ discard block |
||
229 | 229 | $request->setDataSerialize($event); |
230 | 230 | |
231 | 231 | $result = $this->retrieveJson($request); |
232 | - $this->miscService->log('result ' . json_encode($result), 0); |
|
232 | + $this->miscService->log('result '.json_encode($result), 0); |
|
233 | 233 | if ($this->getInt('status', $result) === 0) { |
234 | 234 | throw new GlobalScaleEventException($this->get('error', $result)); |
235 | 235 | } |
236 | 236 | |
237 | 237 | $updatedData = $this->getArray('event', $result); |
238 | - $this->miscService->log('updatedEvent: ' . json_encode($updatedData), 0); |
|
238 | + $this->miscService->log('updatedEvent: '.json_encode($updatedData), 0); |
|
239 | 239 | if (!empty($updatedData)) { |
240 | 240 | $updated = new GSEvent(); |
241 | 241 | try { |
@@ -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; |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | try { |
235 | 235 | $reflection = new ReflectionClass($class); |
236 | 236 | } catch (ReflectionException $e) { |
237 | - throw new InvalidItemException('reflection issue with ' . $class); |
|
237 | + throw new InvalidItemException('reflection issue with '.$class); |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | if (!$reflection->implementsInterface(IDeserializable::class)) { |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | * @return string |
355 | 355 | */ |
356 | 356 | private function getRef(string $key, string $ref): string { |
357 | - return $this->get($key . '.' . $ref, $this->ref); |
|
357 | + return $this->get($key.'.'.$ref, $this->ref); |
|
358 | 358 | } |
359 | 359 | |
360 | 360 | /** |
@@ -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): IQueryFunction { |
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): IQueryFunction { |
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): IQueryFunction { |
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 = ''): IQueryFunction { |
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 = ''): IQueryFunction { |
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 = ''): IQueryFunction { |
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 = ''): IQueryFunction { |
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; |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | $l10n = \OCP\Server::get(IFactory::class)->get('circles'); |
408 | 408 | $display = $l10n->t('%s (Circle owned by %s)', [$display, $circle->getOwner()->getDisplayName()]); |
409 | 409 | } else { |
410 | - $display .= ' (' . Circle::$DEF_SOURCE[$circle->getSource()] . ')'; |
|
410 | + $display .= ' ('.Circle::$DEF_SOURCE[$circle->getSource()].')'; |
|
411 | 411 | } |
412 | 412 | |
413 | 413 | $share->setSharedWithDisplayName($display); |
@@ -504,20 +504,20 @@ discard block |
||
504 | 504 | |
505 | 505 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
506 | 506 | $shareTime = new DateTime(); |
507 | - $shareTime->setTimestamp($this->getInt($prefix . 'stime', $data)); |
|
508 | - |
|
509 | - $this->setId($this->get($prefix . 'id', $data)) |
|
510 | - ->setShareType($this->getInt($prefix . 'share_type', $data)) |
|
511 | - ->setPermissions($this->getInt($prefix . 'permissions', $data)) |
|
512 | - ->setItemType($this->get($prefix . 'item_type', $data)) |
|
513 | - ->setItemSource($this->getInt($prefix . 'item_source', $data)) |
|
514 | - ->setItemTarget($this->get($prefix . 'item_target', $data)) |
|
515 | - ->setFileSource($this->getInt($prefix . 'file_source', $data)) |
|
516 | - ->setFileTarget($this->get($prefix . 'file_target', $data)) |
|
517 | - ->setSharedWith($this->get($prefix . 'share_with', $data)) |
|
518 | - ->setSharedBy($this->get($prefix . 'uid_initiator', $data)) |
|
519 | - ->setShareOwner($this->get($prefix . 'uid_owner', $data)) |
|
520 | - ->setToken($this->get($prefix . 'token', $data)) |
|
507 | + $shareTime->setTimestamp($this->getInt($prefix.'stime', $data)); |
|
508 | + |
|
509 | + $this->setId($this->get($prefix.'id', $data)) |
|
510 | + ->setShareType($this->getInt($prefix.'share_type', $data)) |
|
511 | + ->setPermissions($this->getInt($prefix.'permissions', $data)) |
|
512 | + ->setItemType($this->get($prefix.'item_type', $data)) |
|
513 | + ->setItemSource($this->getInt($prefix.'item_source', $data)) |
|
514 | + ->setItemTarget($this->get($prefix.'item_target', $data)) |
|
515 | + ->setFileSource($this->getInt($prefix.'file_source', $data)) |
|
516 | + ->setFileTarget($this->get($prefix.'file_target', $data)) |
|
517 | + ->setSharedWith($this->get($prefix.'share_with', $data)) |
|
518 | + ->setSharedBy($this->get($prefix.'uid_initiator', $data)) |
|
519 | + ->setShareOwner($this->get($prefix.'uid_owner', $data)) |
|
520 | + ->setToken($this->get($prefix.'token', $data)) |
|
521 | 521 | ->setShareTime($shareTime); |
522 | 522 | |
523 | 523 | // if (($password = $this->get('personal_password', $data, '')) !== '') { |
@@ -526,9 +526,9 @@ discard block |
||
526 | 526 | // $share->setPassword($this->get('password', $data, '')); |
527 | 527 | // } |
528 | 528 | |
529 | - $this->setChildId($this->getInt($prefix . 'child_id', $data)) |
|
530 | - ->setChildFileTarget($this->get($prefix . 'child_file_target', $data)) |
|
531 | - ->setChildPermissions($this->getInt($prefix . 'child_permissions', $data)) |
|
529 | + $this->setChildId($this->getInt($prefix.'child_id', $data)) |
|
530 | + ->setChildFileTarget($this->get($prefix.'child_file_target', $data)) |
|
531 | + ->setChildPermissions($this->getInt($prefix.'child_permissions', $data)) |
|
532 | 532 | ->setProviderId(ShareByCircleProvider::IDENTIFIER) |
533 | 533 | ->setStatus(Ishare::STATUS_ACCEPTED); |
534 | 534 |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | return $value; |
245 | 245 | } |
246 | 246 | |
247 | - if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') { |
|
247 | + if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') { |
|
248 | 248 | return $value; |
249 | 249 | } |
250 | 250 | |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | */ |
479 | 479 | public function getTrustedDomains(): array { |
480 | 480 | return array_map( |
481 | - function (string $address) { |
|
481 | + function(string $address) { |
|
482 | 482 | return strtolower($address); |
483 | 483 | }, $this->config->getSystemValue('trusted_domains', []) |
484 | 484 | ); |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | } |
515 | 515 | |
516 | 516 | if (array_key_exists('port', $loopback)) { |
517 | - $loopbackCloudId = $loopback['host'] . ':' . $loopback['port']; |
|
517 | + $loopbackCloudId = $loopback['host'].':'.$loopback['port']; |
|
518 | 518 | } else { |
519 | 519 | $loopbackCloudId = $loopback['host']; |
520 | 520 | } |
@@ -553,13 +553,13 @@ discard block |
||
553 | 553 | $path = $this->getAppValue(self::LOOPBACK_CLOUD_PATH); |
554 | 554 | } |
555 | 555 | |
556 | - $base = $scheme . '://' . $instance . $path; |
|
556 | + $base = $scheme.'://'.$instance.$path; |
|
557 | 557 | |
558 | 558 | if ($route === '') { |
559 | 559 | return $base; |
560 | 560 | } |
561 | 561 | |
562 | - return rtrim($base, '/') . $this->linkToRoute($route, $args); |
|
562 | + return rtrim($base, '/').$this->linkToRoute($route, $args); |
|
563 | 563 | } |
564 | 564 | |
565 | 565 | |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | ): string { |
665 | 665 | $name = ($displayName) ? $federatedUser->getDisplayName() : $federatedUser->getUserId(); |
666 | 666 | if ($federatedUser->getUserType() === Member::TYPE_MAIL) { |
667 | - return $name . ' ' . $this->displayInstance( |
|
667 | + return $name.' '.$this->displayInstance( |
|
668 | 668 | $federatedUser->getInstance(), |
669 | 669 | self::DISPLAY_PARENTHESIS |
670 | 670 | ); |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | return $name; |
675 | 675 | } |
676 | 676 | |
677 | - return $name . $this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT); |
|
677 | + return $name.$this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT); |
|
678 | 678 | } |
679 | 679 | |
680 | 680 | /** |
@@ -690,9 +690,9 @@ discard block |
||
690 | 690 | |
691 | 691 | switch ($type) { |
692 | 692 | case self::DISPLAY_AT: |
693 | - return '@' . $instance; |
|
693 | + return '@'.$instance; |
|
694 | 694 | case self::DISPLAY_PARENTHESIS: |
695 | - return '(' . $instance . ')'; |
|
695 | + return '('.$instance.')'; |
|
696 | 696 | } |
697 | 697 | |
698 | 698 | return $instance; |