| @@ 19-25 (lines=7) @@ | ||
| 16 | private $recipients = []; |
|
| 17 | ||
| 18 | ||
| 19 | public function withAddedRecipient($email, $name = null) |
|
| 20 | { |
|
| 21 | $this->validateEmail($email); |
|
| 22 | $new = clone $this; |
|
| 23 | $new->recipients[$email] = $name; |
|
| 24 | return $new; |
|
| 25 | } |
|
| 26 | ||
| 27 | public function withAddedRecipients(array $recipients) |
|
| 28 | { |
|
| @@ 37-44 (lines=8) @@ | ||
| 34 | return $new; |
|
| 35 | } |
|
| 36 | ||
| 37 | public function withRecipient($email, $name = null) |
|
| 38 | { |
|
| 39 | $this->validateEmail($email); |
|
| 40 | $new = clone $this; |
|
| 41 | $new->recipients = []; |
|
| 42 | $new->recipients[$email] = $name; |
|
| 43 | return $new; |
|
| 44 | } |
|
| 45 | ||
| 46 | public function withRecipients(array $recipients) { |
|
| 47 | $new = clone $this; |
|