- added some missing type-hints
- no need for local array `$t` (changed to "anonymous" varriant)
- formatted some arrays
This commit is contained in:
Roland Häder 2022-09-11 07:04:13 +02:00
parent 05b15f2824
commit bf9f09182e
No known key found for this signature in database
GPG key ID: C82EDE5DDFA0BA77
7 changed files with 35 additions and 30 deletions

View file

@ -34,12 +34,14 @@ class CalendarExport
{
/**
* Get the events widget.
*
* @param int $uid
*
* @return string Formated HTML of the calendar widget.
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public static function getHTML(int $uid = 0) {
public static function getHTML(int $uid = 0): string
{
if (empty($uid)) {
return '';
}
@ -49,11 +51,11 @@ class CalendarExport
return '';
}
$tpl = Renderer::getMarkupTemplate("widget/events.tpl");
$tpl = Renderer::getMarkupTemplate('widget/events.tpl');
$return = Renderer::replaceMacros($tpl, [
'$etitle' => DI::l10n()->t("Export"),
'$export_ical' => DI::l10n()->t("Export calendar as ical"),
'$export_csv' => DI::l10n()->t("Export calendar as csv"),
'$etitle' => DI::l10n()->t('Export'),
'$export_ical' => DI::l10n()->t('Export calendar as ical'),
'$export_csv' => DI::l10n()->t('Export calendar as csv'),
'$user' => $user['nickname']
]);