Code Duplication    Length = 9-9 lines in 2 locations

src/Request.php 2 locations

@@ 27-35 (lines=9) @@
24
        return $new;
25
    }
26
27
    public function withAddedRecipients(array $recipients) 
28
    {
29
        $new = clone $this;
30
        foreach($recipients as $email => $name) {
31
            $this->validateEmail($email);
32
            $new->recipients[$email] = $name;
33
        }
34
        return $new;
35
    }
36
37
    public function withRecipient($email, $name = null)
38
    {
@@ 46-54 (lines=9) @@
43
        return $new;
44
    }
45
46
    public function withRecipients(array $recipients) {
47
        $new = clone $this;
48
        $new->recipients = [];
49
        foreach($recipients as $email => $name) {
50
            $this->validateEmail($email);
51
            $new->recipients[$email] = $name;
52
        }
53
        return $new;
54
    }
55
56
    /**
57
     * @throws \InvalidArgumentException