diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-01 21:15:39 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-05 09:06:51 +0100 |
commit | 0cef93829998fd6d5879f91fb34639a5a193365c (patch) | |
tree | 1ced5de03e419b5b34662fd157ded5978c7b205d /lib/public/Mail/IMailer.php | |
parent | 6c49cc0294b4a9e1e89c5510486e37d475a3e806 (diff) | |
download | nextcloud-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/IMailer.php')
-rw-r--r-- | lib/public/Mail/IMailer.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/public/Mail/IMailer.php b/lib/public/Mail/IMailer.php index 10096548256..e8f5d6e7d03 100644 --- a/lib/public/Mail/IMailer.php +++ b/lib/public/Mail/IMailer.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @@ -51,7 +52,7 @@ interface IMailer { * @return IMessage * @since 8.1.0 */ - public function createMessage(); + public function createMessage(): IMessage; /** * @param string|null $data @@ -60,7 +61,7 @@ interface IMailer { * @return IAttachment * @since 13.0.0 */ - public function createAttachment($data = null, $filename = null, $contentType = null); + public function createAttachment($data = null, $filename = null, $contentType = null): IAttachment; /** * @param string $path @@ -68,7 +69,7 @@ interface IMailer { * @return IAttachment * @since 13.0.0 */ - public function createAttachmentFromPath($path, $contentType = null); + public function createAttachmentFromPath(string $path, $contentType = null): IAttachment; /** * Creates a new email template object @@ -78,7 +79,7 @@ interface IMailer { * @return IEMailTemplate * @since 12.0.0 Parameters added in 12.0.3 */ - public function createEMailTemplate($emailId, array $data = []); + public function createEMailTemplate(string $emailId, array $data = []): IEMailTemplate; /** * Send the specified message. Also sets the from address to the value defined in config.php @@ -91,7 +92,7 @@ interface IMailer { * has been supplied.) * @since 8.1.0 */ - public function send(IMessage $message); + public function send(IMessage $message): array; /** * Checks if an e-mail address is valid @@ -100,5 +101,5 @@ interface IMailer { * @return bool True if the mail address is valid, false otherwise * @since 8.1.0 */ - public function validateMailAddress($email); + public function validateMailAddress(string $email): bool; } |