Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
11 | 4 | public function __construct(string $name, string $emailAddress) |
|
12 | { |
||
13 | 4 | if (!filter_var($emailAddress, FILTER_VALIDATE_EMAIL)) { |
|
14 | 1 | throw new \RuntimeException(sprintf('The provided email address `%s` is not valid.', $emailAddress)); |
|
15 | } |
||
16 | |||
17 | 3 | $this->name = $name; |
|
18 | 3 | $this->emailAddress = $emailAddress; |
|
19 | 3 | } |
|
20 | |||
36 |