aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Mail/IEMailTemplate.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-03-01 21:15:39 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-03-05 09:06:51 +0100
commit0cef93829998fd6d5879f91fb34639a5a193365c (patch)
tree1ced5de03e419b5b34662fd157ded5978c7b205d /lib/public/Mail/IEMailTemplate.php
parent6c49cc0294b4a9e1e89c5510486e37d475a3e806 (diff)
downloadnextcloud-server-0cef93829998fd6d5879f91fb34639a5a193365c.tar.gz
nextcloud-server-0cef93829998fd6d5879f91fb34639a5a193365c.zip
Make \OCP\Mail strict
* Fix typehints * Made strict Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/public/Mail/IEMailTemplate.php')
-rw-r--r--lib/public/Mail/IEMailTemplate.php21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/public/Mail/IEMailTemplate.php b/lib/public/Mail/IEMailTemplate.php
index 6d37c21ada1..6abcdd12b9c 100644
--- a/lib/public/Mail/IEMailTemplate.php
+++ b/lib/public/Mail/IEMailTemplate.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright 2017, Morris Jobke <hey@morrisjobke.de>
*
@@ -62,7 +63,7 @@ interface IEMailTemplate {
*
* @since 13.0.0
*/
- public function setSubject($subject);
+ public function setSubject(string $subject);
/**
* Adds a header to the email
@@ -80,7 +81,7 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
- public function addHeading($title, $plainTitle = '');
+ public function addHeading(string $title, $plainTitle = '');
/**
* Adds a paragraph to the body of the email
@@ -91,7 +92,7 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
- public function addBodyText($text, $plainText = '');
+ public function addBodyText(string $text, $plainText = '');
/**
* Adds a list item to the body of the email
@@ -105,7 +106,7 @@ interface IEMailTemplate {
* if empty the $metaInfo is used, if false none will be used
* @since 12.0.0
*/
- public function addBodyListItem($text, $metaInfo = '', $icon = '', $plainText = '', $plainMetaInfo = '');
+ public function addBodyListItem(string $text, string $metaInfo = '', string $icon = '', string $plainText = '', string $plainMetaInfo = '');
/**
* Adds a button group of two buttons to the body of the email
@@ -119,7 +120,7 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
- public function addBodyButtonGroup($textLeft, $urlLeft, $textRight, $urlRight, $plainTextLeft = '', $plainTextRight = '');
+ public function addBodyButtonGroup(string $textLeft, string $urlLeft, string $textRight, string $urlRight, string $plainTextLeft = '', string $plainTextRight = '');
/**
* Adds a button to the body of the email
@@ -131,7 +132,7 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
- public function addBodyButton($text, $url, $plainText = '');
+ public function addBodyButton(string $text, string $url, string $plainText = '');
/**
* Adds a logo and a text to the footer. <br> in the text will be replaced by new lines in the plain text email
@@ -140,7 +141,7 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
- public function addFooter($text = '');
+ public function addFooter(string $text = '');
/**
* Returns the rendered email subject as string
@@ -149,7 +150,7 @@ interface IEMailTemplate {
*
* @since 13.0.0
*/
- public function renderSubject();
+ public function renderSubject(): string;
/**
* Returns the rendered HTML email as string
@@ -158,7 +159,7 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
- public function renderHtml();
+ public function renderHtml(): string;
/**
* Returns the rendered plain text email as string
@@ -167,5 +168,5 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
- public function renderText();
+ public function renderText(): string;
}