@@ -227,11 +227,11 @@ discard block |
||
227 | 227 | } |
228 | 228 | |
229 | 229 | $data = [ |
230 | - 'attendee_name' => (string)$meetingAttendeeName ?: $defaultVal, |
|
231 | - 'invitee_name' => (string)$meetingInviteeName ?: $defaultVal, |
|
232 | - 'meeting_title' => (string)$meetingTitle ?: $defaultVal, |
|
233 | - 'meeting_description' => (string)$meetingDescription ?: $defaultVal, |
|
234 | - 'meeting_url' => (string)$meetingUrl ?: $defaultVal, |
|
230 | + 'attendee_name' => (string) $meetingAttendeeName ?: $defaultVal, |
|
231 | + 'invitee_name' => (string) $meetingInviteeName ?: $defaultVal, |
|
232 | + 'meeting_title' => (string) $meetingTitle ?: $defaultVal, |
|
233 | + 'meeting_description' => (string) $meetingDescription ?: $defaultVal, |
|
234 | + 'meeting_url' => (string) $meetingUrl ?: $defaultVal, |
|
235 | 235 | ]; |
236 | 236 | |
237 | 237 | $fromEMail = Util::getDefaultEmailAddress('invitations-noreply'); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | $message->setReplyTo([$sender => $senderName]); |
246 | 246 | } |
247 | 247 | |
248 | - $template = $this->mailer->createEMailTemplate('dav.calendarInvite.' . $method, $data); |
|
248 | + $template = $this->mailer->createEMailTemplate('dav.calendarInvite.'.$method, $data); |
|
249 | 249 | $template->addHeader(); |
250 | 250 | |
251 | 251 | $summary = ((string) $summary !== '') ? (string) $summary : $l10n->t('Untitled event'); |
@@ -292,8 +292,8 @@ discard block |
||
292 | 292 | |
293 | 293 | $attachment = $this->mailer->createAttachment( |
294 | 294 | $iTipMessage->message->serialize(), |
295 | - 'event.ics',// TODO(leon): Make file name unique, e.g. add event id |
|
296 | - 'text/calendar; method=' . $iTipMessage->method |
|
295 | + 'event.ics', // TODO(leon): Make file name unique, e.g. add event id |
|
296 | + 'text/calendar; method='.$iTipMessage->method |
|
297 | 297 | ); |
298 | 298 | $message->attach($attachment); |
299 | 299 | |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | $lastOccurrence = $firstOccurrence; |
341 | 341 | } |
342 | 342 | } else { |
343 | - $it = new EventIterator($vObject, (string)$component->UID); |
|
343 | + $it = new EventIterator($vObject, (string) $component->UID); |
|
344 | 344 | $maxDate = new \DateTime(self::MAX_DATE); |
345 | 345 | if ($it->isInfinite()) { |
346 | 346 | $lastOccurrence = $maxDate->getTimestamp(); |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | $localeStart = $l10n->l('date', $dtstartDt, ['width' => 'medium']); |
457 | 457 | $localeEnd = $l10n->l('date', $dtendDt, ['width' => 'medium']); |
458 | 458 | |
459 | - return $localeStart . ' - ' . $localeEnd; |
|
459 | + return $localeStart.' - '.$localeEnd; |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | /** @var Property\ICalendar\DateTime $dtstart */ |
@@ -475,26 +475,26 @@ discard block |
||
475 | 475 | } |
476 | 476 | } |
477 | 477 | |
478 | - $localeStart = $l10n->l('weekdayName', $dtstartDt, ['width' => 'abbreviated']) . ', ' . |
|
478 | + $localeStart = $l10n->l('weekdayName', $dtstartDt, ['width' => 'abbreviated']).', '. |
|
479 | 479 | $l10n->l('datetime', $dtstartDt, ['width' => 'medium|short']); |
480 | 480 | |
481 | 481 | // always show full date with timezone if timezones are different |
482 | 482 | if ($startTimezone !== $endTimezone) { |
483 | 483 | $localeEnd = $l10n->l('datetime', $dtendDt, ['width' => 'medium|short']); |
484 | 484 | |
485 | - return $localeStart . ' (' . $startTimezone . ') - ' . |
|
486 | - $localeEnd . ' (' . $endTimezone . ')'; |
|
485 | + return $localeStart.' ('.$startTimezone.') - '. |
|
486 | + $localeEnd.' ('.$endTimezone.')'; |
|
487 | 487 | } |
488 | 488 | |
489 | 489 | // show only end time if date is the same |
490 | 490 | if ($this->isDayEqual($dtstartDt, $dtendDt)) { |
491 | 491 | $localeEnd = $l10n->l('time', $dtendDt, ['width' => 'short']); |
492 | 492 | } else { |
493 | - $localeEnd = $l10n->l('weekdayName', $dtendDt, ['width' => 'abbreviated']) . ', ' . |
|
493 | + $localeEnd = $l10n->l('weekdayName', $dtendDt, ['width' => 'abbreviated']).', '. |
|
494 | 494 | $l10n->l('datetime', $dtendDt, ['width' => 'medium|short']); |
495 | 495 | } |
496 | 496 | |
497 | - return $localeStart . ' - ' . $localeEnd . ' (' . $startTimezone . ')'; |
|
497 | + return $localeStart.' - '.$localeEnd.' ('.$startTimezone.')'; |
|
498 | 498 | } |
499 | 499 | |
500 | 500 | /** |
@@ -515,13 +515,13 @@ discard block |
||
515 | 515 | private function addSubjectAndHeading(IEMailTemplate $template, IL10N $l10n, |
516 | 516 | $method, $summary) { |
517 | 517 | if ($method === self::METHOD_CANCEL) { |
518 | - $template->setSubject('Canceled: ' . $summary); |
|
518 | + $template->setSubject('Canceled: '.$summary); |
|
519 | 519 | $template->addHeading($l10n->t('Invitation canceled')); |
520 | 520 | } elseif ($method === self::METHOD_REPLY) { |
521 | - $template->setSubject('Re: ' . $summary); |
|
521 | + $template->setSubject('Re: '.$summary); |
|
522 | 522 | $template->addHeading($l10n->t('Invitation updated')); |
523 | 523 | } else { |
524 | - $template->setSubject('Invitation: ' . $summary); |
|
524 | + $template->setSubject('Invitation: '.$summary); |
|
525 | 525 | $template->addHeading($l10n->t('Invitation')); |
526 | 526 | } |
527 | 527 | } |
@@ -534,16 +534,16 @@ discard block |
||
534 | 534 | private function addBulletList(IEMailTemplate $template, IL10N $l10n, $vevent) { |
535 | 535 | if ($vevent->SUMMARY) { |
536 | 536 | $template->addBodyListItem($vevent->SUMMARY, $l10n->t('Title:'), |
537 | - $this->getAbsoluteImagePath('caldav/title.png'),'','',self::IMIP_INDENT); |
|
537 | + $this->getAbsoluteImagePath('caldav/title.png'), '', '', self::IMIP_INDENT); |
|
538 | 538 | } |
539 | 539 | $meetingWhen = $this->generateWhenString($l10n, $vevent); |
540 | 540 | if ($meetingWhen) { |
541 | 541 | $template->addBodyListItem($meetingWhen, $l10n->t('Time:'), |
542 | - $this->getAbsoluteImagePath('caldav/time.png'),'','',self::IMIP_INDENT); |
|
542 | + $this->getAbsoluteImagePath('caldav/time.png'), '', '', self::IMIP_INDENT); |
|
543 | 543 | } |
544 | 544 | if ($vevent->LOCATION) { |
545 | 545 | $template->addBodyListItem($vevent->LOCATION, $l10n->t('Location:'), |
546 | - $this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT); |
|
546 | + $this->getAbsoluteImagePath('caldav/location.png'), '', '', self::IMIP_INDENT); |
|
547 | 547 | } |
548 | 548 | if ($vevent->URL) { |
549 | 549 | $url = $vevent->URL->getValue(); |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | htmlspecialchars($url)), |
553 | 553 | $l10n->t('Link:'), |
554 | 554 | $this->getAbsoluteImagePath('caldav/link.png'), |
555 | - $url,'',self::IMIP_INDENT); |
|
555 | + $url, '', self::IMIP_INDENT); |
|
556 | 556 | } |
557 | 557 | |
558 | 558 | $this->addAttendees($template, $l10n, $vevent); |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | /* Put description last, like an email body, since it can be arbitrarily long */ |
561 | 561 | if ($vevent->DESCRIPTION) { |
562 | 562 | $template->addBodyListItem($vevent->DESCRIPTION->getValue(), $l10n->t('Description:'), |
563 | - $this->getAbsoluteImagePath('caldav/description.png'),'','',self::IMIP_INDENT); |
|
563 | + $this->getAbsoluteImagePath('caldav/description.png'), '', '', self::IMIP_INDENT); |
|
564 | 564 | } |
565 | 565 | } |
566 | 566 | |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | /** @var Property\ICalendar\CalAddress $organizer */ |
591 | 591 | $organizer = $vevent->ORGANIZER; |
592 | 592 | $organizerURI = $organizer->getNormalizedValue(); |
593 | - [$scheme,$organizerEmail] = explode(':',$organizerURI,2); # strip off scheme mailto: |
|
593 | + [$scheme, $organizerEmail] = explode(':', $organizerURI, 2); # strip off scheme mailto: |
|
594 | 594 | /** @var string|null $organizerName */ |
595 | 595 | $organizerName = isset($organizer['CN']) ? $organizer['CN'] : null; |
596 | 596 | $organizerHTML = sprintf('<a href="%s">%s</a>', |
@@ -607,7 +607,7 @@ discard block |
||
607 | 607 | } |
608 | 608 | $template->addBodyListItem($organizerHTML, $l10n->t('Organizer:'), |
609 | 609 | $this->getAbsoluteImagePath('caldav/organizer.png'), |
610 | - $organizerText,'',self::IMIP_INDENT); |
|
610 | + $organizerText, '', self::IMIP_INDENT); |
|
611 | 611 | } |
612 | 612 | |
613 | 613 | $attendees = $vevent->select('ATTENDEE'); |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | $attendeesText = []; |
620 | 620 | foreach ($attendees as $attendee) { |
621 | 621 | $attendeeURI = $attendee->getNormalizedValue(); |
622 | - [$scheme,$attendeeEmail] = explode(':',$attendeeURI,2); # strip off scheme mailto: |
|
622 | + [$scheme, $attendeeEmail] = explode(':', $attendeeURI, 2); # strip off scheme mailto: |
|
623 | 623 | $attendeeName = isset($attendee['CN']) ? $attendee['CN'] : null; |
624 | 624 | $attendeeHTML = sprintf('<a href="%s">%s</a>', |
625 | 625 | htmlspecialchars($attendeeURI), |
@@ -634,9 +634,9 @@ discard block |
||
634 | 634 | array_push($attendeesText, $attendeeText); |
635 | 635 | } |
636 | 636 | |
637 | - $template->addBodyListItem(implode('<br/>',$attendeesHTML), $l10n->t('Attendees:'), |
|
637 | + $template->addBodyListItem(implode('<br/>', $attendeesHTML), $l10n->t('Attendees:'), |
|
638 | 638 | $this->getAbsoluteImagePath('caldav/attendees.png'), |
639 | - implode("\n",$attendeesText),'',self::IMIP_INDENT); |
|
639 | + implode("\n", $attendeesText), '', self::IMIP_INDENT); |
|
640 | 640 | } |
641 | 641 | |
642 | 642 | /** |
@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | * @return string |
688 | 688 | */ |
689 | 689 | private function createInvitationToken(Message $iTipMessage, $lastOccurrence):string { |
690 | - $token = $this->random->generate(60, ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS); |
|
690 | + $token = $this->random->generate(60, ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS); |
|
691 | 691 | |
692 | 692 | /** @var VEvent $vevent */ |
693 | 693 | $vevent = $iTipMessage->message->VEVENT; |