Skip to content
Permalink
Browse files

ID#323: introduced type declaration for various classes.

  • Loading branch information...
Christian Achatz
Christian Achatz committed May 18, 2018
1 parent 231133a commit 11e8a7165afdce0b54c4b57ffcd9d21aca4d6e6a
Showing with 3 additions and 3 deletions.
  1. +1 −1 tools/mail/MailAddress.php
  2. +1 −1 tools/mail/Message.php
  3. +1 −1 tools/mail/MessageBuilder.php
@@ -46,7 +46,7 @@ class MailAddress {
*
* @throws InvalidArgumentException In case of invalid/empty name and/or e-mail.
*/
public function __construct($name, $email) {
public function __construct(string $name = null, string $email = null) {
if (empty($email)) {
throw new InvalidArgumentException('(Display) Name and/or e-mail must not be empty!');
@@ -81,7 +81,7 @@ class Message {
* @param string $subject The message's subject.
* @param string $content The message content.
*/
public function __construct(MailAddress $sender, $subject, $content) {
public function __construct(MailAddress $sender, string $subject, string $content) {
$this->sender = $sender;
$this->subject = $subject;
@@ -47,7 +47,7 @@ class MessageBuilder extends APFObject {
* @version
* Version 0.1, 26.01.2017 (ID#251: added builder to allow backward-compatible configuration of e-mail message)<br />
*/
public function createMessage($section, $subject, $content) {
public function createMessage(string $section, string $subject, string $content) {
$config = $this->getConfiguration('APF\tools\mail', 'mailsender.ini');

0 comments on commit 11e8a71

Please sign in to comment.
You can’t perform that action at this time.