Conditions | 3 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
12 | 42 | public static function email(string $email, string $message = ''): string |
|
13 | { |
||
14 | 42 | if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { |
|
15 | 12 | throw new InvalidEmailAddressException($email, $message ?: sprintf('Expected valid email address string. Got: `%s`', $email)); |
|
16 | } |
||
17 | |||
18 | 30 | return $email; |
|
19 | } |
||
30 |