Code Duplication    Length = 7-8 lines in 2 locations

src/Mailgun/Message/MessageBuilder.php 2 locations

@@ 152-158 (lines=7) @@
149
     *
150
     * @throws TooManyRecipients
151
     */
152
    public function addToRecipient($address, array $variables = [])
153
    {
154
        if ($this->counters['recipients']['to'] > self::RECIPIENT_COUNT_LIMIT) {
155
            throw TooManyRecipients::create('to');
156
        }
157
        $this->addRecipient('to', $address, $variables);
158
    }
159
160
    /**
161
     * @param string $address
@@ 172-179 (lines=8) @@
169
     *
170
     * @throws TooManyRecipients
171
     */
172
    public function addCcRecipient($address, array $variables = [])
173
    {
174
        if ($this->counters['recipients']['cc'] > self::RECIPIENT_COUNT_LIMIT) {
175
            throw TooManyRecipients::create('cc');
176
        }
177
178
        $this->addRecipient('cc', $address, $variables);
179
    }
180
181
    /**
182
     * @param string $address