@@ -245,16 +245,16 @@ discard block |
||
245 | 245 | try { |
246 | 246 | $test = new ReflectionClass($class); |
247 | 247 | } catch (ReflectionException $e) { |
248 | - throw new FederatedEventException('ReflectionException with ' . $class . ': ' . $e->getMessage()); |
|
248 | + throw new FederatedEventException('ReflectionException with '.$class.': '.$e->getMessage()); |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | if (!in_array(IFederatedItem::class, $test->getInterfaceNames())) { |
252 | - throw new FederatedEventException($class . ' does not implements IFederatedItem'); |
|
252 | + throw new FederatedEventException($class.' does not implements IFederatedItem'); |
|
253 | 253 | } |
254 | 254 | |
255 | 255 | $item = OC::$server->get($class); |
256 | 256 | if (!($item instanceof IFederatedItem)) { |
257 | - throw new FederatedEventException($class . ' not an IFederatedItem'); |
|
257 | + throw new FederatedEventException($class.' not an IFederatedItem'); |
|
258 | 258 | } |
259 | 259 | |
260 | 260 | if ($item instanceof IFederatedItemHighSeverity) { |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | $knownInstances = $this->memberRequest->getMemberInstances($circle->getSingleId()); |
451 | 451 | $instances = array_filter( |
452 | 452 | array_map( |
453 | - function (RemoteInstance $instance) use ($knownInstances) { |
|
453 | + function(RemoteInstance $instance) use ($knownInstances) { |
|
454 | 454 | if (!in_array($instance->getInstance(), $knownInstances)) { |
455 | 455 | return null; |
456 | 456 | } |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | if ($event->hasMember() |
466 | 466 | && !$this->configService->isLocalInstance($event->getMember()->getInstance())) { |
467 | 467 | $currentInstances = array_map( |
468 | - function (RemoteInstance $instance): string { |
|
468 | + function(RemoteInstance $instance): string { |
|
469 | 469 | return $instance->getInstance(); |
470 | 470 | }, $instances |
471 | 471 | ); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | public function onDeleteCard(GenericEvent $event) { |
163 | 163 | $davCard = $this->generateDavCard($event, true); |
164 | 164 | |
165 | - $this->miscService->log('Deleting Card: ' . json_encode($davCard), 1); |
|
165 | + $this->miscService->log('Deleting Card: '.json_encode($davCard), 1); |
|
166 | 166 | $this->membersRequest->removeMembersByContactId($davCard->getUniqueId(), DeprecatedMember::TYPE_USER); |
167 | 167 | $this->manageDeprecatedCircles($davCard->getAddressBookId()); |
168 | 168 | $this->manageDeprecatedMembers($davCard); |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | */ |
204 | 204 | private function generateDavCardFromCard(int $bookId, array $card): DavCard { |
205 | 205 | $this->miscService->log( |
206 | - 'generating DavCard Model from book=' . $bookId . ' from ' . json_encode($card), 0 |
|
206 | + 'generating DavCard Model from book='.$bookId.' from '.json_encode($card), 0 |
|
207 | 207 | ); |
208 | 208 | |
209 | 209 | $davCard = new DavCard(); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | $davCard->setOwner($this->getOwnerFromAddressBook($bookId)); |
214 | 214 | $davCard->importFromDav($card['carddata']); |
215 | 215 | |
216 | - $this->miscService->log('generated DavCard Model: ' . json_encode($davCard), 0); |
|
216 | + $this->miscService->log('generated DavCard Model: '.json_encode($davCard), 0); |
|
217 | 217 | |
218 | 218 | return $davCard; |
219 | 219 | } |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | * |
225 | 225 | */ |
226 | 226 | private function manageDavCard(DavCard $davCard) { |
227 | - $this->miscService->log('Updating Card: ' . json_encode($davCard), 1); |
|
227 | + $this->miscService->log('Updating Card: '.json_encode($davCard), 1); |
|
228 | 228 | $this->manageCircles($davCard); |
229 | 229 | $this->manageContact($davCard); |
230 | 230 | } |
@@ -257,24 +257,24 @@ discard block |
||
257 | 257 | */ |
258 | 258 | private function manageDeprecatedMembers(DavCard $davCard) { |
259 | 259 | $this->miscService->log( |
260 | - 'Managing deprecated circles memberships from DavCard Model: ' . json_encode($davCard), 0 |
|
260 | + 'Managing deprecated circles memberships from DavCard Model: '.json_encode($davCard), 0 |
|
261 | 261 | ); |
262 | 262 | |
263 | 263 | $circles = array_map( |
264 | - function (DeprecatedCircle $circle) { |
|
264 | + function(DeprecatedCircle $circle) { |
|
265 | 265 | return $circle->getUniqueId(); |
266 | 266 | }, $davCard->getCircles() |
267 | 267 | ); |
268 | 268 | |
269 | 269 | $members = $this->membersRequest->getMembersByContactId($davCard->getUniqueId()); |
270 | 270 | $this->miscService->log( |
271 | - 'Found ' . sizeof($members) . ' memberships with contactId=' . $davCard->getUniqueId(), 0 |
|
271 | + 'Found '.sizeof($members).' memberships with contactId='.$davCard->getUniqueId(), 0 |
|
272 | 272 | ); |
273 | 273 | |
274 | 274 | foreach ($members as $member) { |
275 | 275 | if (!in_array($member->getCircleId(), $circles)) { |
276 | 276 | $this->miscService->log( |
277 | - 'Removing membership ' . $member->getMemberId() . ' from ' . $member->getCircleId(), 0 |
|
277 | + 'Removing membership '.$member->getMemberId().' from '.$member->getCircleId(), 0 |
|
278 | 278 | ); |
279 | 279 | $this->membersRequest->removeMember($member); |
280 | 280 | } |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | } |
355 | 355 | } |
356 | 356 | |
357 | - $davCard->setUserId($davCard->getOwner() . ':' . $davCard->getContactId()); |
|
357 | + $davCard->setUserId($davCard->getOwner().':'.$davCard->getContactId()); |
|
358 | 358 | |
359 | 359 | return DavCard::TYPE_CONTACT; |
360 | 360 | } |
@@ -393,13 +393,13 @@ discard block |
||
393 | 393 | private function manageCircles(DavCard $davCard) { |
394 | 394 | $fromCard = $davCard->getGroups(); |
395 | 395 | $current = array_map( |
396 | - function (DeprecatedCircle $circle) { |
|
396 | + function(DeprecatedCircle $circle) { |
|
397 | 397 | return $circle->getContactGroupName(); |
398 | 398 | }, $this->getCirclesFromBook($davCard->getAddressBookId()) |
399 | 399 | ); |
400 | 400 | |
401 | 401 | $this->miscService->log( |
402 | - 'manage Circles from DavCard: ' . json_encode($fromCard) . ' - current: ' . json_encode($current) |
|
402 | + 'manage Circles from DavCard: '.json_encode($fromCard).' - current: '.json_encode($current) |
|
403 | 403 | ); |
404 | 404 | |
405 | 405 | $this->manageNewCircles($davCard, $fromCard, $current); |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | |
423 | 423 | $user = $this->userManager->get($davCard->getOwner()); |
424 | 424 | $circle = new DeprecatedCircle( |
425 | - $this->configService->contactsBackendType(), $group . ' - ' . $user->getDisplayName() |
|
425 | + $this->configService->contactsBackendType(), $group.' - '.$user->getDisplayName() |
|
426 | 426 | ); |
427 | 427 | $circle->setAltName($group); |
428 | 428 | $circle->generateUniqueId(); |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | $circle->setContactGroupName($group); |
431 | 431 | |
432 | 432 | $this->miscService->log( |
433 | - 'creating new Circle: ' . json_encode($circle) . ', with owner=' . $davCard->getOwner(), 0 |
|
433 | + 'creating new Circle: '.json_encode($circle).', with owner='.$davCard->getOwner(), 0 |
|
434 | 434 | ); |
435 | 435 | try { |
436 | 436 | $this->circlesRequest->createCircle($circle); |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | $owner->setStatus(DeprecatedMember::STATUS_MEMBER); |
440 | 440 | $this->membersService->updateCachedName($owner); |
441 | 441 | |
442 | - $this->miscService->log('creating new Member: ' . json_encode($owner), 0); |
|
442 | + $this->miscService->log('creating new Member: '.json_encode($owner), 0); |
|
443 | 443 | try { |
444 | 444 | $this->membersRequest->createMember($owner); |
445 | 445 | } catch (MemberAlreadyExistsException $e) { |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | * @param DavCard $davCard |
455 | 455 | */ |
456 | 456 | private function assignCirclesToCard(DavCard $davCard) { |
457 | - $this->miscService->log('assigning Circles to DavCard Model: ' . json_encode($davCard), 0); |
|
457 | + $this->miscService->log('assigning Circles to DavCard Model: '.json_encode($davCard), 0); |
|
458 | 458 | foreach ($davCard->getGroups() as $group) { |
459 | 459 | try { |
460 | 460 | $davCard->addCircle( |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | } |
465 | 465 | } |
466 | 466 | |
467 | - $this->miscService->log('assigned Circles to DavCard Model: ' . json_encode($davCard), 0); |
|
467 | + $this->miscService->log('assigned Circles to DavCard Model: '.json_encode($davCard), 0); |
|
468 | 468 | } |
469 | 469 | |
470 | 470 | |
@@ -509,12 +509,12 @@ discard block |
||
509 | 509 | * @return string |
510 | 510 | */ |
511 | 511 | public function getOwnerFromAddressBook(int $bookId): string { |
512 | - $this->miscService->log('Retrieving Owner from book:' . $bookId, 0); |
|
512 | + $this->miscService->log('Retrieving Owner from book:'.$bookId, 0); |
|
513 | 513 | $data = $this->cardDavBackend->getAddressBookById($bookId); |
514 | 514 | |
515 | 515 | // let's assume the format is principals/users/OWNER |
516 | 516 | $owner = substr($data['principaluri'], 17); |
517 | - $this->miscService->log('Retrieved Owner:' . $owner, 0); |
|
517 | + $this->miscService->log('Retrieved Owner:'.$owner, 0); |
|
518 | 518 | |
519 | 519 | return $owner; |
520 | 520 | } |
@@ -531,12 +531,12 @@ discard block |
||
531 | 531 | $this->manageDeprecatedContacts(); |
532 | 532 | $this->manageDeprecatedCircles(); |
533 | 533 | $users = $this->userManager->search(''); |
534 | - $this->miscService->log('initiating migration for ' . sizeof($users) . ' users', 0); |
|
534 | + $this->miscService->log('initiating migration for '.sizeof($users).' users', 0); |
|
535 | 535 | foreach ($users as $user) { |
536 | - $this->miscService->log('retrieving books for user=' . $user->getUID(), 0); |
|
537 | - $books = $this->cardDavBackend->getAddressBooksForUser('principals/users/' . $user->getUID()); |
|
536 | + $this->miscService->log('retrieving books for user='.$user->getUID(), 0); |
|
537 | + $books = $this->cardDavBackend->getAddressBooksForUser('principals/users/'.$user->getUID()); |
|
538 | 538 | |
539 | - $this->miscService->log('initiating migration for user=' . $user->getUID(), 0); |
|
539 | + $this->miscService->log('initiating migration for user='.$user->getUID(), 0); |
|
540 | 540 | foreach ($books as $book) { |
541 | 541 | $this->migrateBook($book['id']); |
542 | 542 | } |
@@ -549,16 +549,16 @@ discard block |
||
549 | 549 | private function manageDeprecatedContacts() { |
550 | 550 | $contacts = $this->membersRequest->getMembersByContactId(); |
551 | 551 | $this->miscService->log( |
552 | - 'Managing Deprecated Contacts, checking ' . sizeof($contacts) . ' known contacts in database', 0 |
|
552 | + 'Managing Deprecated Contacts, checking '.sizeof($contacts).' known contacts in database', 0 |
|
553 | 553 | ); |
554 | 554 | |
555 | 555 | foreach ($contacts as $contact) { |
556 | 556 | try { |
557 | 557 | $this->getDavCardFromMember($contact); |
558 | - $this->miscService->log('Contact is not deprecated: ' . json_encode($contact)); |
|
558 | + $this->miscService->log('Contact is not deprecated: '.json_encode($contact)); |
|
559 | 559 | } catch (MemberDoesNotExistException $e) { |
560 | 560 | $this->miscService->log( |
561 | - 'Contact is deprecated and will be removed: ' . json_encode($contact) |
|
561 | + 'Contact is deprecated and will be removed: '.json_encode($contact) |
|
562 | 562 | ); |
563 | 563 | $this->membersRequest->removeMember($contact); |
564 | 564 | } |
@@ -573,15 +573,15 @@ discard block |
||
573 | 573 | */ |
574 | 574 | private function manageDeprecatedCircles(int $bookId = 0) { |
575 | 575 | $knownBooks = [$bookId]; |
576 | - $this->miscService->log('Managing Deprecated Circles, using bookId: ' . $bookId, 0); |
|
576 | + $this->miscService->log('Managing Deprecated Circles, using bookId: '.$bookId, 0); |
|
577 | 577 | |
578 | 578 | if ($bookId > 0) { |
579 | 579 | $knownBooks = []; |
580 | 580 | $contacts = $this->membersRequest->getMembersByContactId(); |
581 | - $this->miscService->log(sizeof($contacts) . ' known members as contacts in Circles DB', 0); |
|
581 | + $this->miscService->log(sizeof($contacts).' known members as contacts in Circles DB', 0); |
|
582 | 582 | |
583 | 583 | foreach ($contacts as $contact) { |
584 | - [$bookId,] = explode('/', $contact->getContactId(), 2); |
|
584 | + [$bookId, ] = explode('/', $contact->getContactId(), 2); |
|
585 | 585 | if (in_array($bookId, $knownBooks)) { |
586 | 586 | continue; |
587 | 587 | } |
@@ -590,17 +590,17 @@ discard block |
||
590 | 590 | } |
591 | 591 | } |
592 | 592 | |
593 | - $this->miscService->log('Known books: ' . json_encode($knownBooks), 0); |
|
593 | + $this->miscService->log('Known books: '.json_encode($knownBooks), 0); |
|
594 | 594 | foreach ($knownBooks as $bookId) { |
595 | - $this->miscService->log('retrieving local Circles data for bookId=' . $bookId, 0); |
|
595 | + $this->miscService->log('retrieving local Circles data for bookId='.$bookId, 0); |
|
596 | 596 | $circles = $this->circlesRequest->getFromContactBook($bookId); |
597 | 597 | $this->miscService->log( |
598 | - 'Known circles for bookId=' . $bookId . ': ' . json_encode($circles), 0 |
|
598 | + 'Known circles for bookId='.$bookId.': '.json_encode($circles), 0 |
|
599 | 599 | ); |
600 | 600 | |
601 | 601 | $fromBook = $this->getExistingCirclesFromBook($bookId); |
602 | 602 | $this->miscService->log( |
603 | - 'Generated circles from bookId=' . $bookId . ': ' . json_encode($fromBook), 0 |
|
603 | + 'Generated circles from bookId='.$bookId.': '.json_encode($fromBook), 0 |
|
604 | 604 | ); |
605 | 605 | |
606 | 606 | foreach ($circles as $circle) { |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | } |
610 | 610 | |
611 | 611 | $this->miscService->log( |
612 | - $circle->getUniqueId() . ' is a deprecated Circle and will be destroyed', 0 |
|
612 | + $circle->getUniqueId().' is a deprecated Circle and will be destroyed', 0 |
|
613 | 613 | ); |
614 | 614 | |
615 | 615 | $this->membersRequest->removeAllFromCircle($circle->getUniqueId()); |
@@ -631,7 +631,7 @@ discard block |
||
631 | 631 | $cards = $this->cardDavBackend->getCards($bookId); |
632 | 632 | |
633 | 633 | $this->miscService->log( |
634 | - 'retrieving existing circles from bookId=' . $bookId . ' in ' . sizeof($cards) . ' cards', 0 |
|
634 | + 'retrieving existing circles from bookId='.$bookId.' in '.sizeof($cards).' cards', 0 |
|
635 | 635 | ); |
636 | 636 | foreach ($cards as $card) { |
637 | 637 | $davCard = $this->generateDavCardFromCard($bookId, $card); |
@@ -639,17 +639,17 @@ discard block |
||
639 | 639 | $circles = array_merge($circles, $davCard->getCircles()); |
640 | 640 | } |
641 | 641 | |
642 | - $this->miscService->log('Found ' . sizeof($circles) . ' Circles from book=' . $bookId, 0); |
|
642 | + $this->miscService->log('Found '.sizeof($circles).' Circles from book='.$bookId, 0); |
|
643 | 643 | $existing = array_unique( |
644 | 644 | array_map( |
645 | - function (DeprecatedCircle $circle) { |
|
645 | + function(DeprecatedCircle $circle) { |
|
646 | 646 | return $circle->getContactGroupName(); |
647 | 647 | }, $circles |
648 | 648 | ) |
649 | 649 | ); |
650 | 650 | |
651 | 651 | $this->miscService->log( |
652 | - 'retrieved existing circles from book=' . $bookId . ': ' . json_encode($existing), 0 |
|
652 | + 'retrieved existing circles from book='.$bookId.': '.json_encode($existing), 0 |
|
653 | 653 | ); |
654 | 654 | |
655 | 655 | return $existing; |
@@ -664,14 +664,14 @@ discard block |
||
664 | 664 | */ |
665 | 665 | public function getDavCardFromMember(DeprecatedMember $contact): DavCard { |
666 | 666 | [$bookId, $cardUri] = explode('/', $contact->getContactId(), 2); |
667 | - $this->miscService->log('Retrieving DavCard from book:' . $bookId . ', uri:' . $cardUri, 0); |
|
667 | + $this->miscService->log('Retrieving DavCard from book:'.$bookId.', uri:'.$cardUri, 0); |
|
668 | 668 | |
669 | 669 | $cards = $this->cardDavBackend->getCards($bookId); |
670 | - $this->miscService->log('Book contains ' . sizeof($cards) . ' cards', 0); |
|
670 | + $this->miscService->log('Book contains '.sizeof($cards).' cards', 0); |
|
671 | 671 | foreach ($cards as $card) { |
672 | 672 | if ($card['uri'] === $cardUri) { |
673 | 673 | $davCard = $this->generateDavCardFromCard($bookId, $card); |
674 | - $this->miscService->log('Retrieved DavCard: ' . json_encode($card)); |
|
674 | + $this->miscService->log('Retrieved DavCard: '.json_encode($card)); |
|
675 | 675 | |
676 | 676 | return $davCard; |
677 | 677 | } |
@@ -689,11 +689,11 @@ discard block |
||
689 | 689 | return; |
690 | 690 | } |
691 | 691 | |
692 | - $this->miscService->log('migrating book: ' . $bookId, 0); |
|
692 | + $this->miscService->log('migrating book: '.$bookId, 0); |
|
693 | 693 | $owner = $this->getOwnerFromAddressBook($bookId); |
694 | 694 | |
695 | 695 | $cards = $this->cardDavBackend->getCards($bookId); |
696 | - $this->miscService->log('found ' . sizeof($cards) . 'cards from book=' . $bookId, 0); |
|
696 | + $this->miscService->log('found '.sizeof($cards).'cards from book='.$bookId, 0); |
|
697 | 697 | |
698 | 698 | foreach ($cards as $card) { |
699 | 699 | $davCard = new DavCard(); |
@@ -251,7 +251,7 @@ |
||
251 | 251 | } |
252 | 252 | |
253 | 253 | $members = array_map( |
254 | - function (FederatedUser $federatedUser) use ($patron) { |
|
254 | + function(FederatedUser $federatedUser) use ($patron) { |
|
255 | 255 | $member = new Member(); |
256 | 256 | $member->importFromIFederatedUser($federatedUser); |
257 | 257 | $member->setInvitedBy($patron); |
@@ -153,7 +153,7 @@ |
||
153 | 153 | $gs = $this->globalScaleService->getGlobalScaleEvent($event); |
154 | 154 | $gs->manage($event); |
155 | 155 | } catch (Exception $e) { |
156 | - $this->miscService->log('issue onNewEvent: ' . json_encode($event) . ' - ' . $e->getMessage()); |
|
156 | + $this->miscService->log('issue onNewEvent: '.json_encode($event).' - '.$e->getMessage()); |
|
157 | 157 | } |
158 | 158 | } |
159 | 159 | } |
@@ -143,7 +143,7 @@ |
||
143 | 143 | $event->setSubject('circle_create', ['circle' => json_encode($circle)]); |
144 | 144 | |
145 | 145 | $this->userManager->callForSeenUsers( |
146 | - function ($user) use ($event) { |
|
146 | + function($user) use ($event) { |
|
147 | 147 | /** @var IUser $user */ |
148 | 148 | $this->publishEvent($event, [$user]); |
149 | 149 | } |
@@ -174,7 +174,7 @@ |
||
174 | 174 | */ |
175 | 175 | private function getFailedEvents(array $retryRange): array { |
176 | 176 | $token = array_map( |
177 | - function (EventWrapper $event): string { |
|
177 | + function(EventWrapper $event): string { |
|
178 | 178 | return $event->getToken(); |
179 | 179 | }, $this->eventWrapperRequest->getFailedEvents($retryRange) |
180 | 180 | ); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $this->miscService = OC::$server->query(MiscService::class); |
137 | 137 | } catch (QueryException $e) { |
138 | 138 | OC::$server->getLogger() |
139 | - ->log(1, 'Circles: cannot init FileSharingBroadcaster - ' . $e->getMessage()); |
|
139 | + ->log(1, 'Circles: cannot init FileSharingBroadcaster - '.$e->getMessage()); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | try { |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | |
282 | 282 | $allShares = $this->fileSharesRequest->getSharesForCircle($member->getCircleId()); |
283 | 283 | $knownShares = array_map( |
284 | - function (SharesToken $shareToken) { |
|
284 | + function(SharesToken $shareToken) { |
|
285 | 285 | return $shareToken->getShareId(); |
286 | 286 | }, |
287 | 287 | $this->tokensRequest->getTokensFromMember($member) |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | * @throws IllegalIDChangeException |
329 | 329 | */ |
330 | 330 | private function generateShare($data): IShare { |
331 | - $this->logger->log(0, 'Regenerate shares from payload: ' . json_encode($data)); |
|
331 | + $this->logger->log(0, 'Regenerate shares from payload: '.json_encode($data)); |
|
332 | 332 | |
333 | 333 | $share = new Share($this->rootFolder, $this->userManager); |
334 | 334 | $share->setId($data['id']); |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | $this->sendPasswordByMail($share, $displayName, $email, $password); |
422 | 422 | } catch (Exception $e) { |
423 | 423 | OC::$server->getLogger() |
424 | - ->log(1, 'Circles::sharedByMail - mail were not sent: ' . $e->getMessage()); |
|
424 | + ->log(1, 'Circles::sharedByMail - mail were not sent: '.$e->getMessage()); |
|
425 | 425 | } |
426 | 426 | } |
427 | 427 | |
@@ -439,8 +439,8 @@ discard block |
||
439 | 439 | $message = $this->mailer->createMessage(); |
440 | 440 | |
441 | 441 | $this->logger->log( |
442 | - 0, "Sending mail to circle '" . $circleName . "': " . $email . ' file: ' . $fileName |
|
443 | - . ' - link: ' . $link |
|
442 | + 0, "Sending mail to circle '".$circleName."': ".$email.' file: '.$fileName |
|
443 | + . ' - link: '.$link |
|
444 | 444 | ); |
445 | 445 | |
446 | 446 | $subject = $this->l10n->t('%s shared »%s« with you.', [$author, $fileName]); |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | |
480 | 480 | $message = $this->mailer->createMessage(); |
481 | 481 | |
482 | - $this->logger->log(0, "Sending password mail to circle '" . $circleName . "': " . $email); |
|
482 | + $this->logger->log(0, "Sending password mail to circle '".$circleName."': ".$email); |
|
483 | 483 | |
484 | 484 | $filename = $share->getNode() |
485 | 485 | ->getName(); |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
535 | 535 | if ($initiatorEmailAddress !== null) { |
536 | 536 | $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]); |
537 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
537 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
538 | 538 | } else { |
539 | 539 | $emailTemplate->addFooter(); |
540 | 540 | } |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | $emailTemplate->addHeader(); |
570 | 570 | $emailTemplate->addHeading($subject, false); |
571 | 571 | $emailTemplate->addBodyText( |
572 | - htmlspecialchars($text) . '<br>' . htmlspecialchars( |
|
572 | + htmlspecialchars($text).'<br>'.htmlspecialchars( |
|
573 | 573 | $this->l10n->t('Click the button below to open it.') |
574 | 574 | ), $text |
575 | 575 | ); |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | $this->sendMailExistingShares($template, $author->getCachedName(), $recipient); |
616 | 616 | $this->sendPasswordExistingShares($author, $recipient, $password); |
617 | 617 | } catch (Exception $e) { |
618 | - $this->logger->log(2, 'Failed to send mail about existing share ' . $e->getMessage()); |
|
618 | + $this->logger->log(2, 'Failed to send mail about existing share '.$e->getMessage()); |
|
619 | 619 | } |
620 | 620 | } |
621 | 621 | |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | $authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author; |
639 | 639 | $authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null; |
640 | 640 | |
641 | - $this->logger->log(0, "Sending password mail about existing files to '" . $email . "'"); |
|
641 | + $this->logger->log(0, "Sending password mail about existing files to '".$email."'"); |
|
642 | 642 | |
643 | 643 | $plainBodyPart = $this->l10n->t( |
644 | 644 | "%1\$s shared multiple files with you.\nYou should have already received a separate email with a link to access them.\n", |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
681 | 681 | if ($authorEmail !== null) { |
682 | 682 | $message->setReplyTo([$authorEmail => $authorName]); |
683 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
683 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
684 | 684 | } else { |
685 | 685 | $emailTemplate->addFooter(); |
686 | 686 | } |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | */ |
726 | 726 | protected function generateMailExitingShares($author, $circleName) { |
727 | 727 | $this->logger->log( |
728 | - 0, "Generating mail about existing share mail from '" . $author . "' in " |
|
728 | + 0, "Generating mail about existing share mail from '".$author."' in " |
|
729 | 729 | . $circleName |
730 | 730 | ); |
731 | 731 |
@@ -85,14 +85,14 @@ discard block |
||
85 | 85 | $node = $share->getNode(); |
86 | 86 | $filename = $node->getName(); |
87 | 87 | } catch (NotFoundException $e) { |
88 | - $this->miscService->log('issue while FileShare: ' . $e->getMessage()); |
|
88 | + $this->miscService->log('issue while FileShare: '.$e->getMessage()); |
|
89 | 89 | |
90 | 90 | return; |
91 | 91 | } |
92 | 92 | |
93 | 93 | $event->getData() |
94 | 94 | ->s('gs_federated', $share->getToken()) |
95 | - ->s('gs_filename', '/' . $filename); |
|
95 | + ->s('gs_filename', '/'.$filename); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | ); |
259 | 259 | } catch (Exception $e) { |
260 | 260 | OC::$server->getLogger() |
261 | - ->log(1, 'Circles::sharedByMail - mail were not sent: ' . $e->getMessage()); |
|
261 | + ->log(1, 'Circles::sharedByMail - mail were not sent: '.$e->getMessage()); |
|
262 | 262 | } |
263 | 263 | } |
264 | 264 | |
@@ -276,8 +276,8 @@ discard block |
||
276 | 276 | $message = $this->mailer->createMessage(); |
277 | 277 | |
278 | 278 | $this->miscService->log( |
279 | - "Sending mail to circle '" . $circleName . "': " . $email . ' file: ' . $fileName |
|
280 | - . ' - link: ' . $link, 0 |
|
279 | + "Sending mail to circle '".$circleName."': ".$email.' file: '.$fileName |
|
280 | + . ' - link: '.$link, 0 |
|
281 | 281 | ); |
282 | 282 | |
283 | 283 | $subject = $this->l10n->t('%s shared »%s« with you.', [$author, $fileName]); |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | |
317 | 317 | $message = $this->mailer->createMessage(); |
318 | 318 | |
319 | - $this->miscService->log("Sending password mail to circle '" . $circleName . "': " . $email, 0); |
|
319 | + $this->miscService->log("Sending password mail to circle '".$circleName."': ".$email, 0); |
|
320 | 320 | |
321 | 321 | $filename = $share->getNode() |
322 | 322 | ->getName(); |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
372 | 372 | if ($initiatorEmailAddress !== null) { |
373 | 373 | $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]); |
374 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
374 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
375 | 375 | } else { |
376 | 376 | $emailTemplate->addFooter(); |
377 | 377 | } |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | $emailTemplate->addHeader(); |
407 | 407 | $emailTemplate->addHeading($subject, false); |
408 | 408 | $emailTemplate->addBodyText( |
409 | - htmlspecialchars($text) . '<br>' . htmlspecialchars( |
|
409 | + htmlspecialchars($text).'<br>'.htmlspecialchars( |
|
410 | 410 | $this->l10n->t('Click the button below to open it.') |
411 | 411 | ), $text |
412 | 412 | ); |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | ); |
430 | 430 | |
431 | 431 | return array_map( |
432 | - function (DeprecatedMember $member) { |
|
432 | + function(DeprecatedMember $member) { |
|
433 | 433 | return $member->getUserId(); |
434 | 434 | }, $members |
435 | 435 | ); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $this->sendMailExistingShares($template, $author, $recipient); |
243 | 243 | $this->sendPasswordExistingShares($author, $recipient, $password); |
244 | 244 | } catch (Exception $e) { |
245 | - $this->miscService->log('Failed to send mail about existing share ' . $e->getMessage()); |
|
245 | + $this->miscService->log('Failed to send mail about existing share '.$e->getMessage()); |
|
246 | 246 | } |
247 | 247 | } |
248 | 248 | |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | private function getUnknownShares(DeprecatedMember $member): array { |
278 | 278 | $allShares = $this->fileSharesRequest->getSharesForCircle($member->getCircleId()); |
279 | 279 | $knownShares = array_map( |
280 | - function (SharesToken $shareToken) { |
|
280 | + function(SharesToken $shareToken) { |
|
281 | 281 | return $shareToken->getShareId(); |
282 | 282 | }, |
283 | 283 | $this->tokensRequest->getTokensFromMember($member) |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | $authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author; |
393 | 393 | $authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null; |
394 | 394 | |
395 | - $this->miscService->log("Sending password mail about existing files to '" . $email . "'", 0); |
|
395 | + $this->miscService->log("Sending password mail about existing files to '".$email."'", 0); |
|
396 | 396 | |
397 | 397 | $plainBodyPart = $this->l10n->t( |
398 | 398 | "%1\$s shared multiple files with you.\nYou should have already received a separate email with a link to access them.\n", |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
435 | 435 | if ($authorEmail !== null) { |
436 | 436 | $message->setReplyTo([$authorEmail => $authorName]); |
437 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
437 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
438 | 438 | } else { |
439 | 439 | $emailTemplate->addFooter(); |
440 | 440 | } |