<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
{
$this->recipientUid = $user['uid'] ?? 0;
try {
- $this->l10n = $user['language'] ? $this->l10n->withLang($user['language']) : $this->l10n;
+ $this->l10n = isset($user['language']) ? $this->l10n->withLang($user['language']) : $this->l10n;
} catch (Exception $e) {
$this->logger->warning('cannot use language.', ['user' => $user, 'exception' => $e]);
}
*
* @return string[][]
*/
- public function getHeaders()
+ public function getHeaders(): array
{
return $this->headers;
}
* @param string[][] $headers
* @return $this
*/
- public function withHeaders(array $headers)
+ public function withHeaders(array $headers): MailBuilder
{
$this->headers = $headers;