Conditions | 4 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
46 | 8 | public function add($email) |
|
47 | { |
||
48 | 8 | if ($email instanceof EmailAddress) { |
|
49 | 6 | parent::add($email); |
|
50 | |||
51 | 6 | return $this; |
|
52 | } |
||
53 | |||
54 | 8 | if (is_array($email) || $email instanceof Recipients) { |
|
55 | 8 | array_walk($email, [$this, 'add']); |
|
56 | |||
57 | 8 | return $this; |
|
58 | } |
||
59 | |||
60 | 5 | parent::add(new EmailAddress($email)); |
|
61 | |||
62 | 5 | return $this; |
|
63 | } |
||
64 | } |