@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | return $default; |
99 | 99 | } |
100 | 100 | $newstring = $vevent->$property->getValue(); |
101 | - if(isset($oldVEvent->$property) && $oldVEvent->$property->getValue() !== $newstring ) { |
|
101 | + if (isset($oldVEvent->$property) && $oldVEvent->$property->getValue() !== $newstring) { |
|
102 | 102 | $oldstring = $oldVEvent->$property->getValue(); |
103 | 103 | return sprintf($strikethrough, $oldstring, $newstring); |
104 | 104 | } |
@@ -115,15 +115,15 @@ discard block |
||
115 | 115 | $data = []; |
116 | 116 | $data['meeting_when'] = $this->generateWhenString($vEvent); |
117 | 117 | |
118 | - foreach(self::STRING_DIFF as $key => $property) { |
|
118 | + foreach (self::STRING_DIFF as $key => $property) { |
|
119 | 119 | $data[$key] = self::readPropertyWithDefault($vEvent, $property, $defaultVal); |
120 | 120 | } |
121 | 121 | |
122 | 122 | $data['meeting_url_html'] = self::readPropertyWithDefault($vEvent, 'URL', $defaultVal); |
123 | 123 | |
124 | - if(!empty($oldVEvent)) { |
|
124 | + if (!empty($oldVEvent)) { |
|
125 | 125 | $oldMeetingWhen = $this->generateWhenString($oldVEvent); |
126 | - $data['meeting_title_html'] = $this->generateDiffString($vEvent, $oldVEvent, 'SUMMARY', $data['meeting_title']); |
|
126 | + $data['meeting_title_html'] = $this->generateDiffString($vEvent, $oldVEvent, 'SUMMARY', $data['meeting_title']); |
|
127 | 127 | $data['meeting_description_html'] = $this->generateDiffString($vEvent, $oldVEvent, 'DESCRIPTION', $data['meeting_description']); |
128 | 128 | $data['meeting_location_html'] = $this->generateDiffString($vEvent, $oldVEvent, 'LOCATION', $data['meeting_location']); |
129 | 129 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | $localeStart = $this->l10n->l('date', $dtstartDt, ['width' => 'medium']); |
193 | 193 | $localeEnd = $this->l10n->l('date', $dtendDt, ['width' => 'medium']); |
194 | 194 | |
195 | - return $localeStart . ' - ' . $localeEnd; |
|
195 | + return $localeStart.' - '.$localeEnd; |
|
196 | 196 | } |
197 | 197 | |
198 | 198 | /** @var Property\ICalendar\DateTime $dtstart */ |
@@ -211,26 +211,26 @@ discard block |
||
211 | 211 | } |
212 | 212 | } |
213 | 213 | |
214 | - $localeStart = $this->l10n->l('weekdayName', $dtstartDt, ['width' => 'abbreviated']) . ', ' . |
|
214 | + $localeStart = $this->l10n->l('weekdayName', $dtstartDt, ['width' => 'abbreviated']).', '. |
|
215 | 215 | $this->l10n->l('datetime', $dtstartDt, ['width' => 'medium|short']); |
216 | 216 | |
217 | 217 | // always show full date with timezone if timezones are different |
218 | 218 | if ($startTimezone !== $endTimezone) { |
219 | 219 | $localeEnd = $this->l10n->l('datetime', $dtendDt, ['width' => 'medium|short']); |
220 | 220 | |
221 | - return $localeStart . ' (' . $startTimezone . ') - ' . |
|
222 | - $localeEnd . ' (' . $endTimezone . ')'; |
|
221 | + return $localeStart.' ('.$startTimezone.') - '. |
|
222 | + $localeEnd.' ('.$endTimezone.')'; |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | // show only end time if date is the same |
226 | 226 | if ($dtstartDt->format('Y-m-d') === $dtendDt->format('Y-m-d')) { |
227 | 227 | $localeEnd = $this->l10n->l('time', $dtendDt, ['width' => 'short']); |
228 | 228 | } else { |
229 | - $localeEnd = $this->l10n->l('weekdayName', $dtendDt, ['width' => 'abbreviated']) . ', ' . |
|
229 | + $localeEnd = $this->l10n->l('weekdayName', $dtendDt, ['width' => 'abbreviated']).', '. |
|
230 | 230 | $this->l10n->l('datetime', $dtendDt, ['width' => 'medium|short']); |
231 | 231 | } |
232 | 232 | |
233 | - return $localeStart . ' - ' . $localeEnd . ' (' . $startTimezone . ')'; |
|
233 | + return $localeStart.' - '.$localeEnd.' ('.$startTimezone.')'; |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | /** |
@@ -242,20 +242,20 @@ discard block |
||
242 | 242 | $strikethrough = "<span style='text-decoration: line-through'>%s</span>"; |
243 | 243 | |
244 | 244 | $newMeetingWhen = $this->generateWhenString($vEvent); |
245 | - $newSummary = isset($vEvent->SUMMARY) && (string)$vEvent->SUMMARY !== '' ? (string)$vEvent->SUMMARY : $this->l10n->t('Untitled event');; |
|
246 | - $newDescription = isset($vEvent->DESCRIPTION) && (string)$vEvent->DESCRIPTION !== '' ? (string)$vEvent->DESCRIPTION : $defaultVal; |
|
247 | - $newUrl = isset($vEvent->URL) && (string)$vEvent->URL !== '' ? sprintf('<a href="%1$s">%1$s</a>', $vEvent->URL) : $defaultVal; |
|
248 | - $newLocation = isset($vEvent->LOCATION) && (string)$vEvent->LOCATION !== '' ? (string)$vEvent->LOCATION : $defaultVal; |
|
245 | + $newSummary = isset($vEvent->SUMMARY) && (string) $vEvent->SUMMARY !== '' ? (string) $vEvent->SUMMARY : $this->l10n->t('Untitled event'); ; |
|
246 | + $newDescription = isset($vEvent->DESCRIPTION) && (string) $vEvent->DESCRIPTION !== '' ? (string) $vEvent->DESCRIPTION : $defaultVal; |
|
247 | + $newUrl = isset($vEvent->URL) && (string) $vEvent->URL !== '' ? sprintf('<a href="%1$s">%1$s</a>', $vEvent->URL) : $defaultVal; |
|
248 | + $newLocation = isset($vEvent->LOCATION) && (string) $vEvent->LOCATION !== '' ? (string) $vEvent->LOCATION : $defaultVal; |
|
249 | 249 | |
250 | 250 | $data = []; |
251 | 251 | $data['meeting_when_html'] = $newMeetingWhen === '' ?: sprintf($strikethrough, $newMeetingWhen); |
252 | 252 | $data['meeting_when'] = $newMeetingWhen; |
253 | 253 | $data['meeting_title_html'] = sprintf($strikethrough, $newSummary); |
254 | - $data['meeting_title'] = $newSummary !== '' ? $newSummary: $this->l10n->t('Untitled event'); |
|
254 | + $data['meeting_title'] = $newSummary !== '' ? $newSummary : $this->l10n->t('Untitled event'); |
|
255 | 255 | $data['meeting_description_html'] = $newDescription !== '' ? sprintf($strikethrough, $newDescription) : ''; |
256 | 256 | $data['meeting_description'] = $newDescription; |
257 | 257 | $data['meeting_url_html'] = $newUrl !== '' ? sprintf($strikethrough, $newUrl) : ''; |
258 | - $data['meeting_url'] = isset($vEvent->URL) ? (string)$vEvent->URL : ''; |
|
258 | + $data['meeting_url'] = isset($vEvent->URL) ? (string) $vEvent->URL : ''; |
|
259 | 259 | $data['meeting_location_html'] = $newLocation !== '' ? sprintf($strikethrough, $newLocation) : ''; |
260 | 260 | $data['meeting_location'] = $newLocation; |
261 | 261 | return $data; |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $component = $vObject->VEVENT; |
273 | 273 | |
274 | 274 | if (isset($component->RRULE)) { |
275 | - $it = new EventIterator($vObject, (string)$component->UID); |
|
275 | + $it = new EventIterator($vObject, (string) $component->UID); |
|
276 | 276 | $maxDate = new \DateTime(IMipPlugin::MAX_DATE); |
277 | 277 | if ($it->isInfinite()) { |
278 | 278 | return $maxDate->getTimestamp(); |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | return $dtEnd->getDateTime()->getTimeStamp(); |
296 | 296 | } |
297 | 297 | |
298 | - if(isset($component->DURATION)) { |
|
298 | + if (isset($component->DURATION)) { |
|
299 | 299 | /** @var \DateTime $endDate */ |
300 | 300 | $endDate = clone $dtStart->getDateTime(); |
301 | 301 | // $component->DTEND->getDateTime() returns DateTimeImmutable |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | return $endDate->getTimestamp(); |
304 | 304 | } |
305 | 305 | |
306 | - if(!$dtStart->hasTime()) { |
|
306 | + if (!$dtStart->hasTime()) { |
|
307 | 307 | /** @var \DateTime $endDate */ |
308 | 308 | // $component->DTSTART->getDateTime() returns DateTimeImmutable |
309 | 309 | $endDate = clone $dtStart->getDateTime(); |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | * @param Property|null $attendee |
320 | 320 | */ |
321 | 321 | public function setL10n(?Property $attendee = null) { |
322 | - if($attendee === null) { |
|
322 | + if ($attendee === null) { |
|
323 | 323 | return; |
324 | 324 | } |
325 | 325 | |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | * @return bool |
336 | 336 | */ |
337 | 337 | public function getAttendeeRsvpOrReqForParticipant(?Property $attendee = null) { |
338 | - if($attendee === null) { |
|
338 | + if ($attendee === null) { |
|
339 | 339 | return false; |
340 | 340 | } |
341 | 341 | |
@@ -426,10 +426,10 @@ discard block |
||
426 | 426 | htmlspecialchars($organizer->getNormalizedValue()), |
427 | 427 | htmlspecialchars($organizerName ?: $organizerEmail)); |
428 | 428 | $organizerText = sprintf('%s <%s>', $organizerName, $organizerEmail); |
429 | - if(isset($organizer['PARTSTAT']) ) { |
|
429 | + if (isset($organizer['PARTSTAT'])) { |
|
430 | 430 | /** @var Parameter $partstat */ |
431 | 431 | $partstat = $organizer['PARTSTAT']; |
432 | - if(strcasecmp($partstat->getValue(), 'ACCEPTED') === 0) { |
|
432 | + if (strcasecmp($partstat->getValue(), 'ACCEPTED') === 0) { |
|
433 | 433 | $organizerHTML .= ' ✔︎'; |
434 | 434 | $organizerText .= ' ✔︎'; |
435 | 435 | } |