| Conditions | 3 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 81 | private function setEmail(string $email) |
||
| 82 | { |
||
| 83 | if (empty($email)) { |
||
| 84 | throw new InvalidArgumentException('Email value can not be empty'); |
||
| 85 | } |
||
| 86 | |||
| 87 | if (! filter_var($email, FILTER_VALIDATE_EMAIL)) { |
||
| 88 | throw new InvalidArgumentException('Invalid Email address'); |
||
| 89 | } |
||
| 90 | |||
| 91 | $this->email = $email; |
||
| 92 | } |
||
| 106 |