@@ -229,11 +229,11 @@ discard block |
||
229 | 229 | } |
230 | 230 | |
231 | 231 | $data = [ |
232 | - 'attendee_name' => (string)$meetingAttendeeName ?: $defaultVal, |
|
233 | - 'invitee_name' => (string)$meetingInviteeName ?: $defaultVal, |
|
234 | - 'meeting_title' => (string)$meetingTitle ?: $defaultVal, |
|
235 | - 'meeting_description' => (string)$meetingDescription ?: $defaultVal, |
|
236 | - 'meeting_url' => (string)$meetingUrl ?: $defaultVal, |
|
232 | + 'attendee_name' => (string) $meetingAttendeeName ?: $defaultVal, |
|
233 | + 'invitee_name' => (string) $meetingInviteeName ?: $defaultVal, |
|
234 | + 'meeting_title' => (string) $meetingTitle ?: $defaultVal, |
|
235 | + 'meeting_description' => (string) $meetingDescription ?: $defaultVal, |
|
236 | + 'meeting_url' => (string) $meetingUrl ?: $defaultVal, |
|
237 | 237 | ]; |
238 | 238 | |
239 | 239 | $fromEMail = Util::getDefaultEmailAddress('invitations-noreply'); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $message->setReplyTo([$sender => $senderName]); |
248 | 248 | } |
249 | 249 | |
250 | - $template = $this->mailer->createEMailTemplate('dav.calendarInvite.' . $method, $data); |
|
250 | + $template = $this->mailer->createEMailTemplate('dav.calendarInvite.'.$method, $data); |
|
251 | 251 | $template->addHeader(); |
252 | 252 | |
253 | 253 | $summary = ((string) $summary !== '') ? (string) $summary : $l10n->t('Untitled event'); |
@@ -294,8 +294,8 @@ discard block |
||
294 | 294 | |
295 | 295 | $attachment = $this->mailer->createAttachment( |
296 | 296 | $iTipMessage->message->serialize(), |
297 | - 'event.ics',// TODO(leon): Make file name unique, e.g. add event id |
|
298 | - 'text/calendar; method=' . $iTipMessage->method |
|
297 | + 'event.ics', // TODO(leon): Make file name unique, e.g. add event id |
|
298 | + 'text/calendar; method='.$iTipMessage->method |
|
299 | 299 | ); |
300 | 300 | $message->attach($attachment); |
301 | 301 | |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | $lastOccurrence = $firstOccurrence; |
343 | 343 | } |
344 | 344 | } else { |
345 | - $it = new EventIterator($vObject, (string)$component->UID); |
|
345 | + $it = new EventIterator($vObject, (string) $component->UID); |
|
346 | 346 | $maxDate = new \DateTime(self::MAX_DATE); |
347 | 347 | if ($it->isInfinite()) { |
348 | 348 | $lastOccurrence = $maxDate->getTimestamp(); |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | $localeStart = $l10n->l('date', $dtstartDt, ['width' => 'medium']); |
459 | 459 | $localeEnd = $l10n->l('date', $dtendDt, ['width' => 'medium']); |
460 | 460 | |
461 | - return $localeStart . ' - ' . $localeEnd; |
|
461 | + return $localeStart.' - '.$localeEnd; |
|
462 | 462 | } |
463 | 463 | |
464 | 464 | /** @var Property\ICalendar\DateTime $dtstart */ |
@@ -477,26 +477,26 @@ discard block |
||
477 | 477 | } |
478 | 478 | } |
479 | 479 | |
480 | - $localeStart = $l10n->l('weekdayName', $dtstartDt, ['width' => 'abbreviated']) . ', ' . |
|
480 | + $localeStart = $l10n->l('weekdayName', $dtstartDt, ['width' => 'abbreviated']).', '. |
|
481 | 481 | $l10n->l('datetime', $dtstartDt, ['width' => 'medium|short']); |
482 | 482 | |
483 | 483 | // always show full date with timezone if timezones are different |
484 | 484 | if ($startTimezone !== $endTimezone) { |
485 | 485 | $localeEnd = $l10n->l('datetime', $dtendDt, ['width' => 'medium|short']); |
486 | 486 | |
487 | - return $localeStart . ' (' . $startTimezone . ') - ' . |
|
488 | - $localeEnd . ' (' . $endTimezone . ')'; |
|
487 | + return $localeStart.' ('.$startTimezone.') - '. |
|
488 | + $localeEnd.' ('.$endTimezone.')'; |
|
489 | 489 | } |
490 | 490 | |
491 | 491 | // show only end time if date is the same |
492 | 492 | if ($this->isDayEqual($dtstartDt, $dtendDt)) { |
493 | 493 | $localeEnd = $l10n->l('time', $dtendDt, ['width' => 'short']); |
494 | 494 | } else { |
495 | - $localeEnd = $l10n->l('weekdayName', $dtendDt, ['width' => 'abbreviated']) . ', ' . |
|
495 | + $localeEnd = $l10n->l('weekdayName', $dtendDt, ['width' => 'abbreviated']).', '. |
|
496 | 496 | $l10n->l('datetime', $dtendDt, ['width' => 'medium|short']); |
497 | 497 | } |
498 | 498 | |
499 | - return $localeStart . ' - ' . $localeEnd . ' (' . $startTimezone . ')'; |
|
499 | + return $localeStart.' - '.$localeEnd.' ('.$startTimezone.')'; |
|
500 | 500 | } |
501 | 501 | |
502 | 502 | /** |
@@ -539,16 +539,16 @@ discard block |
||
539 | 539 | private function addBulletList(IEMailTemplate $template, IL10N $l10n, $vevent) { |
540 | 540 | if ($vevent->SUMMARY) { |
541 | 541 | $template->addBodyListItem($vevent->SUMMARY, $l10n->t('Title:'), |
542 | - $this->getAbsoluteImagePath('caldav/title.png'),'','',self::IMIP_INDENT); |
|
542 | + $this->getAbsoluteImagePath('caldav/title.png'), '', '', self::IMIP_INDENT); |
|
543 | 543 | } |
544 | 544 | $meetingWhen = $this->generateWhenString($l10n, $vevent); |
545 | 545 | if ($meetingWhen) { |
546 | 546 | $template->addBodyListItem($meetingWhen, $l10n->t('Time:'), |
547 | - $this->getAbsoluteImagePath('caldav/time.png'),'','',self::IMIP_INDENT); |
|
547 | + $this->getAbsoluteImagePath('caldav/time.png'), '', '', self::IMIP_INDENT); |
|
548 | 548 | } |
549 | 549 | if ($vevent->LOCATION) { |
550 | 550 | $template->addBodyListItem($vevent->LOCATION, $l10n->t('Location:'), |
551 | - $this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT); |
|
551 | + $this->getAbsoluteImagePath('caldav/location.png'), '', '', self::IMIP_INDENT); |
|
552 | 552 | } |
553 | 553 | if ($vevent->URL) { |
554 | 554 | $url = $vevent->URL->getValue(); |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | htmlspecialchars($url)), |
558 | 558 | $l10n->t('Link:'), |
559 | 559 | $this->getAbsoluteImagePath('caldav/link.png'), |
560 | - $url,'',self::IMIP_INDENT); |
|
560 | + $url, '', self::IMIP_INDENT); |
|
561 | 561 | } |
562 | 562 | |
563 | 563 | $this->addAttendees($template, $l10n, $vevent); |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | /* Put description last, like an email body, since it can be arbitrarily long */ |
566 | 566 | if ($vevent->DESCRIPTION) { |
567 | 567 | $template->addBodyListItem($vevent->DESCRIPTION->getValue(), $l10n->t('Description:'), |
568 | - $this->getAbsoluteImagePath('caldav/description.png'),'','',self::IMIP_INDENT); |
|
568 | + $this->getAbsoluteImagePath('caldav/description.png'), '', '', self::IMIP_INDENT); |
|
569 | 569 | } |
570 | 570 | } |
571 | 571 | |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | /** @var Property\ICalendar\CalAddress $organizer */ |
596 | 596 | $organizer = $vevent->ORGANIZER; |
597 | 597 | $organizerURI = $organizer->getNormalizedValue(); |
598 | - [$scheme,$organizerEmail] = explode(':',$organizerURI,2); # strip off scheme mailto: |
|
598 | + [$scheme, $organizerEmail] = explode(':', $organizerURI, 2); # strip off scheme mailto: |
|
599 | 599 | /** @var string|null $organizerName */ |
600 | 600 | $organizerName = isset($organizer['CN']) ? $organizer['CN'] : null; |
601 | 601 | $organizerHTML = sprintf('<a href="%s">%s</a>', |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | } |
613 | 613 | $template->addBodyListItem($organizerHTML, $l10n->t('Organizer:'), |
614 | 614 | $this->getAbsoluteImagePath('caldav/organizer.png'), |
615 | - $organizerText,'',self::IMIP_INDENT); |
|
615 | + $organizerText, '', self::IMIP_INDENT); |
|
616 | 616 | } |
617 | 617 | |
618 | 618 | $attendees = $vevent->select('ATTENDEE'); |
@@ -624,7 +624,7 @@ discard block |
||
624 | 624 | $attendeesText = []; |
625 | 625 | foreach ($attendees as $attendee) { |
626 | 626 | $attendeeURI = $attendee->getNormalizedValue(); |
627 | - [$scheme,$attendeeEmail] = explode(':',$attendeeURI,2); # strip off scheme mailto: |
|
627 | + [$scheme, $attendeeEmail] = explode(':', $attendeeURI, 2); # strip off scheme mailto: |
|
628 | 628 | $attendeeName = isset($attendee['CN']) ? $attendee['CN'] : null; |
629 | 629 | $attendeeHTML = sprintf('<a href="%s">%s</a>', |
630 | 630 | htmlspecialchars($attendeeURI), |
@@ -639,9 +639,9 @@ discard block |
||
639 | 639 | array_push($attendeesText, $attendeeText); |
640 | 640 | } |
641 | 641 | |
642 | - $template->addBodyListItem(implode('<br/>',$attendeesHTML), $l10n->t('Attendees:'), |
|
642 | + $template->addBodyListItem(implode('<br/>', $attendeesHTML), $l10n->t('Attendees:'), |
|
643 | 643 | $this->getAbsoluteImagePath('caldav/attendees.png'), |
644 | - implode("\n",$attendeesText),'',self::IMIP_INDENT); |
|
644 | + implode("\n", $attendeesText), '', self::IMIP_INDENT); |
|
645 | 645 | } |
646 | 646 | |
647 | 647 | /** |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | * @return string |
693 | 693 | */ |
694 | 694 | private function createInvitationToken(Message $iTipMessage, $lastOccurrence):string { |
695 | - $token = $this->random->generate(60, ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS); |
|
695 | + $token = $this->random->generate(60, ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS); |
|
696 | 696 | |
697 | 697 | /** @var VEvent $vevent */ |
698 | 698 | $vevent = $iTipMessage->message->VEVENT; |