Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
38 | public function __construct($value) |
||
39 | { |
||
40 | $filteredValue = \filter_var($value, FILTER_VALIDATE_EMAIL); |
||
41 | if ($filteredValue === false) { |
||
42 | throw new \InvalidArgumentException(sprintf( |
||
43 | 'Argument "%s" is invalid. Allowed types for argument are "email".', |
||
44 | $value |
||
45 | )); |
||
46 | } |
||
47 | |||
48 | parent::__construct($filteredValue); |
||
49 | } |
||
50 | |||
72 |