Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
10 | class EmailAddress implements EmailAddressInterface |
||
11 | { |
||
12 | /** @var string */ |
||
13 | private $emailAddress; |
||
14 | |||
15 | /** |
||
16 | * Constructor |
||
17 | * |
||
18 | * @throws \Nordic\EmailAddress\InvalidEmailAddressException |
||
19 | */ |
||
20 | 27 | public function __construct(string $emailAddress) |
|
21 | { |
||
22 | 27 | $this->emailAddress = Assertion::email($emailAddress); |
|
23 | 21 | } |
|
24 | |||
25 | /** |
||
26 | * @inheritDoc |
||
27 | */ |
||
28 | 6 | public function equals(EmailAddressInterface $emailAddress): bool |
|
31 | } |
||
32 | |||
33 | /** |
||
34 | * @inheritDoc |
||
35 | */ |
||
36 | 12 | public function __toString(): string |
|
39 | } |
||
40 | } |
||
41 |