2727use OCP \IConfig ;
2828
2929class EMailTemplate extends ParentTemplate {
30- protected $ urlPath = "" ;
31- protected $ bodyText = '%s ' ;
32- protected $ heading = <<<EOF
30+ protected string $ urlPath = "" ;
31+ protected string $ bodyText = '%s ' ;
32+ protected string $ heading = <<<EOF
3333<table align="center" class="container main-heading float-center" style="Margin:0 auto;background:0 0!important;border-collapse:collapse;border-spacing:0;float:none;margin:0 auto;padding:0;text-align:center;vertical-align:top;width:580px">
3434 <tbody>
3535 <tr style="padding:0;text-align:left;vertical-align:top;">
@@ -47,7 +47,7 @@ class EMailTemplate extends ParentTemplate {
4747 </tbody>
4848</table>
4949EOF ;
50- protected $ head = <<<EOF
50+ protected string $ head = <<<EOF
5151<!doctype html>
5252<html>
5353 <head>
@@ -163,7 +163,7 @@ class EMailTemplate extends ParentTemplate {
163163EOF ;
164164
165165
166- protected $ tail = <<<EOF
166+ protected string $ tail = <<<EOF
167167</div>
168168</td>
169169<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;"> </td>
@@ -173,7 +173,7 @@ class EMailTemplate extends ParentTemplate {
173173</html>
174174EOF ;
175175
176- protected $ header = <<<EOF
176+ protected string $ header = <<<EOF
177177<!-- START Header -->
178178<div class="header" style="clear: both;text-align: center; width: 100%;border-bottom:2px solid #e5e5e5;">
179179 <table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
@@ -199,12 +199,12 @@ class EMailTemplate extends ParentTemplate {
199199<!-- END Header -->
200200EOF ;
201201
202- protected $ bodyBegin = <<<EOF
202+ protected string $ bodyBegin = <<<EOF
203203<div class="content" style="box-sizing: border-box; display: block; Margin: 0 auto; max-width: 600px;">
204204EOF ;
205205
206206
207- protected $ bodyEnd = <<<EOF
207+ protected string $ bodyEnd = <<<EOF
208208</div>
209209EOF ;
210210 protected $ l10n = null ;
@@ -224,10 +224,13 @@ class EMailTemplate extends ParentTemplate {
224224 * manipulates the result for the welcome email to only include one button
225225 */
226226 public function addBodyButtonGroup (
227- string $ textLeft , string $ urlLeft ,
228- string $ textRight , string $ urlRight ,
227+ string $ textLeft ,
228+ string $ urlLeft ,
229+ string $ textRight ,
230+ string $ urlRight ,
229231 string $ plainTextLeft = '' ,
230- string $ plainTextRight = '' ) {
232+ string $ plainTextRight = '' ,
233+ ): void {
231234
232235 // for the welcome email we omit the left button ("Install client") and only show the button that links to the instance
233236 if ($ this ->emailId === 'settings.Welcome ' ) {
@@ -242,7 +245,7 @@ public function addBodyButtonGroup(
242245 * Adds a header to the email
243246 */
244247
245- public function addHeader (? string $ lang = null ) {
248+ public function addHeader (): void {
246249 $ this ->setLanguage ();
247250 if ($ this ->headerAdded ) {
248251 return ;
@@ -264,7 +267,7 @@ public function addHeader(?string $lang = null) {
264267 * @param string|bool $plainTitle Title that is used in the plain text email
265268 * if empty the $title is used, if false none will be used
266269 */
267- public function addHeading (string $ title , $ plainTitle = '' ) {
270+ public function addHeading (string $ title , $ plainTitle = '' ): void {
268271 if ($ plainTitle === '' ) {
269272 $ plainTitle = $ title ;
270273 }
@@ -363,7 +366,7 @@ public function addHeading(string $title, $plainTitle = '') {
363366 * @param string|bool $plainText Text that is used in the plain text email
364367 * if empty the $text is used, if false none will be used
365368 */
366- public function addBodyText (string $ text , $ plainText = '' ) {
369+ public function addBodyText (string $ text , $ plainText = '' ): void {
367370 if ($ this ->footerAdded ) {
368371 return ;
369372 }
@@ -426,7 +429,7 @@ public function addBodyText(string $text, $plainText = '') {
426429 * This method completely overwrites the default behaviour.
427430 */
428431
429- public function addFooter (string $ text = '' , ?string $ lang = null ) {
432+ public function addFooter (string $ text = '' , ?string $ lang = null ): void {
430433 $ this ->footer = '<div class="footer" style="clear: both; Margin-top: 10px; text-align: center; width: 100%;border-top:1px solid #191919">
431434 <table class="footer-section" role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
432435 <tr>
0 commit comments