Skip to content

Instantly share code, notes, and snippets.

@mikemix
Last active August 26, 2022 18:53
Show Gist options
  • Save mikemix/b9e098bb92259edc4c8f0468c4959568 to your computer and use it in GitHub Desktop.
Save mikemix/b9e098bb92259edc4c8f0468c4959568 to your computer and use it in GitHub Desktop.
<?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;
}
}
@Myks92
Copy link

Myks92 commented Aug 25, 2022

Fix:

EmailAdddress -> EmailAddress

@mikemix
Copy link
Author

mikemix commented Aug 26, 2022

Thx.

@Myks92
Copy link

Myks92 commented Aug 26, 2022

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