| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 12 | public function __construct($email, $headers = null) |
|
| 31 | { |
||
| 32 | 12 | if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { |
|
| 33 | 8 | throw new InvalidArgumentException( |
|
| 34 | 8 | sprintf('"%s" is an invalid email address', $email) |
|
| 35 | 2 | ); |
|
| 36 | } |
||
| 37 | |||
| 38 | 4 | $this->destination = $email; |
|
| 39 | 4 | $this->type = static::MAIL; |
|
| 40 | 4 | $this->headers = (string) $headers; |
|
| 41 | 1 | } |
|
| 42 | |||
| 44 |