Skip to content

Commit

Permalink
ID#323: introduced type declaration for various classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Achatz committed May 18, 2018
1 parent 231133a commit 11e8a71
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/mail/MailAddress.php
Expand Up @@ -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!');
Expand Down
2 changes: 1 addition & 1 deletion tools/mail/Message.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tools/mail/MessageBuilder.php
Expand Up @@ -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');

Expand Down

0 comments on commit 11e8a71

Please sign in to comment.