Last active
August 26, 2022 18:53
-
-
Save mikemix/b9e098bb92259edc4c8f0468c4959568 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\Notification\Impl; | |
use App\Notification\EmailAddress; | |
use App\Notification\EmailNotificationInterface; | |
final class EmailNotification implements EmailNotificationInterface | |
{ | |
private EmailAddress $emailAddress; | |
private string $subject; | |
private string $body; | |
public function __construct(EmailAddress $emailAddress, string $subject, string $body) | |
{ | |
$this->emailAddress = $emailAddress; | |
$this->subject = $subject; | |
$this->body = $body; | |
} | |
public function getTo(): EmailAddress | |
{ | |
return $this->emailAddress; | |
} | |
public function getSubject(): string | |
{ | |
return $this->subject; | |
} | |
public function getBody(): string | |
{ | |
return $this->body; | |
} | |
} |
Thx.
Thx.
More)):
public function getTo(): EmailAddress
{
return $this->emailAddress;
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fix:
EmailAdddress -> EmailAddress