@@ -12,9 +12,9 @@ |
||
12 | 12 | |
13 | 13 | return RectorConfig::configure() |
14 | 14 | ->withPaths([ |
15 | - __DIR__ . '/appinfo', |
|
16 | - __DIR__ . '/lib', |
|
17 | - __DIR__ . '/tests/unit', |
|
15 | + __DIR__.'/appinfo', |
|
16 | + __DIR__.'/lib', |
|
17 | + __DIR__.'/tests/unit', |
|
18 | 18 | ]) |
19 | 19 | ->withImportNames(importShortClasses: false) |
20 | 20 | ->withSets([ |
@@ -241,16 +241,16 @@ discard block |
||
241 | 241 | try { |
242 | 242 | $test = new ReflectionClass($class); |
243 | 243 | } catch (ReflectionException $e) { |
244 | - throw new FederatedEventException('ReflectionException with ' . $class . ': ' . $e->getMessage()); |
|
244 | + throw new FederatedEventException('ReflectionException with '.$class.': '.$e->getMessage()); |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | if (!in_array(IFederatedItem::class, $test->getInterfaceNames())) { |
248 | - throw new FederatedEventException($class . ' does not implements IFederatedItem'); |
|
248 | + throw new FederatedEventException($class.' does not implements IFederatedItem'); |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | $item = Server::get($class); |
252 | 252 | if (!($item instanceof IFederatedItem)) { |
253 | - throw new FederatedEventException($class . ' not an IFederatedItem'); |
|
253 | + throw new FederatedEventException($class.' not an IFederatedItem'); |
|
254 | 254 | } |
255 | 255 | |
256 | 256 | if ($item instanceof IFederatedItemHighSeverity) { |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | $knownInstances = $this->memberRequest->getMemberInstances($circle->getSingleId()); |
449 | 449 | $instances = array_filter( |
450 | 450 | array_map( |
451 | - function (RemoteInstance $instance) use ($knownInstances) { |
|
451 | + function(RemoteInstance $instance) use ($knownInstances) { |
|
452 | 452 | if (!in_array($instance->getInstance(), $knownInstances)) { |
453 | 453 | return null; |
454 | 454 | } |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | if ($event->hasMember() |
464 | 464 | && !$this->configService->isLocalInstance($event->getMember()->getInstance())) { |
465 | 465 | $currentInstances = array_map( |
466 | - function (RemoteInstance $instance): string { |
|
466 | + function(RemoteInstance $instance): string { |
|
467 | 467 | return $instance->getInstance(); |
468 | 468 | }, $instances |
469 | 469 | ); |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | $l10n = Server::get(IFactory::class)->get('circles'); |
452 | 452 | $display = $l10n->t('%s (Team owned by %s)', [$display, $circle->getOwner()->getDisplayName()]); |
453 | 453 | } else { |
454 | - $display .= ' (' . Circle::$DEF_SOURCE[$circle->getSource()] . ')'; |
|
454 | + $display .= ' ('.Circle::$DEF_SOURCE[$circle->getSource()].')'; |
|
455 | 455 | } |
456 | 456 | |
457 | 457 | $share->setSharedWithDisplayName($display); |
@@ -541,22 +541,22 @@ discard block |
||
541 | 541 | |
542 | 542 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
543 | 543 | $shareTime = new DateTime(); |
544 | - $shareTime->setTimestamp($this->getInt($prefix . 'stime', $data)); |
|
545 | - |
|
546 | - $this->setId($this->get($prefix . 'id', $data)) |
|
547 | - ->setShareType($this->getInt($prefix . 'share_type', $data)) |
|
548 | - ->setPermissions($this->getInt($prefix . 'permissions', $data)) |
|
549 | - ->setItemType($this->get($prefix . 'item_type', $data)) |
|
550 | - ->setItemSource($this->getInt($prefix . 'item_source', $data)) |
|
551 | - ->setItemTarget($this->get($prefix . 'item_target', $data)) |
|
552 | - ->setFileSource($this->getInt($prefix . 'file_source', $data)) |
|
553 | - ->setFileTarget($this->get($prefix . 'file_target', $data)) |
|
554 | - ->setSharedWith($this->get($prefix . 'share_with', $data)) |
|
555 | - ->setSharedBy($this->get($prefix . 'uid_initiator', $data)) |
|
556 | - ->setShareOwner($this->get($prefix . 'uid_owner', $data)) |
|
557 | - ->setToken($this->get($prefix . 'token', $data)) |
|
544 | + $shareTime->setTimestamp($this->getInt($prefix.'stime', $data)); |
|
545 | + |
|
546 | + $this->setId($this->get($prefix.'id', $data)) |
|
547 | + ->setShareType($this->getInt($prefix.'share_type', $data)) |
|
548 | + ->setPermissions($this->getInt($prefix.'permissions', $data)) |
|
549 | + ->setItemType($this->get($prefix.'item_type', $data)) |
|
550 | + ->setItemSource($this->getInt($prefix.'item_source', $data)) |
|
551 | + ->setItemTarget($this->get($prefix.'item_target', $data)) |
|
552 | + ->setFileSource($this->getInt($prefix.'file_source', $data)) |
|
553 | + ->setFileTarget($this->get($prefix.'file_target', $data)) |
|
554 | + ->setSharedWith($this->get($prefix.'share_with', $data)) |
|
555 | + ->setSharedBy($this->get($prefix.'uid_initiator', $data)) |
|
556 | + ->setShareOwner($this->get($prefix.'uid_owner', $data)) |
|
557 | + ->setToken($this->get($prefix.'token', $data)) |
|
558 | 558 | ->setShareTime($shareTime) |
559 | - ->setShareNote($this->get($prefix . 'note', $data)); |
|
559 | + ->setShareNote($this->get($prefix.'note', $data)); |
|
560 | 560 | |
561 | 561 | $this->importAttributesFromDatabase($this->get('attributes', $data)); |
562 | 562 | |
@@ -566,9 +566,9 @@ discard block |
||
566 | 566 | // $share->setPassword($this->get('password', $data, '')); |
567 | 567 | // } |
568 | 568 | |
569 | - $this->setChildId($this->getInt($prefix . 'child_id', $data)) |
|
570 | - ->setChildFileTarget($this->get($prefix . 'child_file_target', $data)) |
|
571 | - ->setChildPermissions($this->getInt($prefix . 'child_permissions', $data)) |
|
569 | + $this->setChildId($this->getInt($prefix.'child_id', $data)) |
|
570 | + ->setChildFileTarget($this->get($prefix.'child_file_target', $data)) |
|
571 | + ->setChildPermissions($this->getInt($prefix.'child_permissions', $data)) |
|
572 | 572 | ->setProviderId(ShareByCircleProvider::IDENTIFIER) |
573 | 573 | ->setStatus(Ishare::STATUS_ACCEPTED); |
574 | 574 |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $this->configService = Server::get(ConfigService::class); |
116 | 116 | $this->miscService = Server::get(MiscService::class); |
117 | 117 | } catch (QueryException $e) { |
118 | - $this->logger->info('Circles: cannot init FileSharingBroadcaster - ' . $e->getMessage(), ['exception' => $e]); |
|
118 | + $this->logger->info('Circles: cannot init FileSharingBroadcaster - '.$e->getMessage(), ['exception' => $e]); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | try { |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | |
261 | 261 | $allShares = $this->fileSharesRequest->getSharesForCircle($member->getCircleId()); |
262 | 262 | $knownShares = array_map( |
263 | - function (SharesToken $shareToken) { |
|
263 | + function(SharesToken $shareToken) { |
|
264 | 264 | return $shareToken->getShareId(); |
265 | 265 | }, |
266 | 266 | $this->tokensRequest->getTokensFromMember($member) |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | * @throws IllegalIDChangeException |
308 | 308 | */ |
309 | 309 | private function generateShare($data): IShare { |
310 | - $this->logger->log(0, 'Regenerate shares from payload: ' . json_encode($data)); |
|
310 | + $this->logger->log(0, 'Regenerate shares from payload: '.json_encode($data)); |
|
311 | 311 | |
312 | 312 | $share = new Share($this->rootFolder, $this->userManager); |
313 | 313 | $share->setId($data['id']); |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | $this->sendPasswordByMail($share, $displayName, $email, $password); |
401 | 401 | } catch (Exception $e) { |
402 | 402 | OC::$server->getLogger() |
403 | - ->log(1, 'Circles::sharedByMail - mail were not sent: ' . $e->getMessage()); |
|
403 | + ->log(1, 'Circles::sharedByMail - mail were not sent: '.$e->getMessage()); |
|
404 | 404 | } |
405 | 405 | } |
406 | 406 | |
@@ -418,8 +418,8 @@ discard block |
||
418 | 418 | $message = $this->mailer->createMessage(); |
419 | 419 | |
420 | 420 | $this->logger->log( |
421 | - 0, "Sending mail to circle '" . $circleName . "': " . $email . ' file: ' . $fileName |
|
422 | - . ' - link: ' . $link |
|
421 | + 0, "Sending mail to circle '".$circleName."': ".$email.' file: '.$fileName |
|
422 | + . ' - link: '.$link |
|
423 | 423 | ); |
424 | 424 | |
425 | 425 | $subject = $this->l10n->t('%s shared »%s« with you.', [$author, $fileName]); |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | |
458 | 458 | $message = $this->mailer->createMessage(); |
459 | 459 | |
460 | - $this->logger->log(0, "Sending password mail to circle '" . $circleName . "': " . $email); |
|
460 | + $this->logger->log(0, "Sending password mail to circle '".$circleName."': ".$email); |
|
461 | 461 | |
462 | 462 | $filename = $share->getNode() |
463 | 463 | ->getName(); |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | $message->setFrom([Util::getDefaultEmailAddress($instanceName) => $senderName]); |
513 | 513 | if ($initiatorEmailAddress !== null) { |
514 | 514 | $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]); |
515 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
515 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
516 | 516 | } else { |
517 | 517 | $emailTemplate->addFooter(); |
518 | 518 | } |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | $emailTemplate->addHeader(); |
548 | 548 | $emailTemplate->addHeading($subject, false); |
549 | 549 | $emailTemplate->addBodyText( |
550 | - htmlspecialchars($text) . '<br>' . htmlspecialchars( |
|
550 | + htmlspecialchars($text).'<br>'.htmlspecialchars( |
|
551 | 551 | $this->l10n->t('Click the button below to open it.') |
552 | 552 | ), $text |
553 | 553 | ); |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | $this->sendMailExistingShares($template, $author->getCachedName(), $recipient); |
594 | 594 | $this->sendPasswordExistingShares($author, $recipient, $password); |
595 | 595 | } catch (Exception $e) { |
596 | - $this->logger->log(2, 'Failed to send mail about existing share ' . $e->getMessage()); |
|
596 | + $this->logger->log(2, 'Failed to send mail about existing share '.$e->getMessage()); |
|
597 | 597 | } |
598 | 598 | } |
599 | 599 | |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | $authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author; |
617 | 617 | $authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null; |
618 | 618 | |
619 | - $this->logger->log(0, "Sending password mail about existing files to '" . $email . "'"); |
|
619 | + $this->logger->log(0, "Sending password mail about existing files to '".$email."'"); |
|
620 | 620 | |
621 | 621 | $plainBodyPart = $this->l10n->t( |
622 | 622 | "%1\$s shared multiple files with you.\nYou should have already received a separate email with a link to access them.\n", |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | $message->setFrom([Util::getDefaultEmailAddress($instanceName) => $senderName]); |
659 | 659 | if ($authorEmail !== null) { |
660 | 660 | $message->setReplyTo([$authorEmail => $authorName]); |
661 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
661 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
662 | 662 | } else { |
663 | 663 | $emailTemplate->addFooter(); |
664 | 664 | } |
@@ -703,7 +703,7 @@ discard block |
||
703 | 703 | */ |
704 | 704 | protected function generateMailExitingShares($author, $circleName) { |
705 | 705 | $this->logger->log( |
706 | - 0, "Generating mail about existing share mail from '" . $author . "' in " |
|
706 | + 0, "Generating mail about existing share mail from '".$author."' in " |
|
707 | 707 | . $circleName |
708 | 708 | ); |
709 | 709 |