Code Duplication    Length = 9-10 lines in 3 locations

src/Message/MessageBuilder.php 3 locations

@@ 150-158 (lines=9) @@
147
     *
148
     * @throws TooManyRecipients
149
     */
150
    public function addToRecipient(string $address, array $variables = []): self
151
    {
152
        if ($this->counters['recipients']['to'] > self::RECIPIENT_COUNT_LIMIT) {
153
            throw TooManyRecipients::create('to');
154
        }
155
        $this->addRecipient('to', $address, $variables);
156
157
        return $this;
158
    }
159
160
    /**
161
     * @param string $address
@@ 172-181 (lines=10) @@
169
     *
170
     * @throws TooManyRecipients
171
     */
172
    public function addCcRecipient(string $address, array $variables = []): self
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
        return $this;
181
    }
182
183
    /**
184
     * @param string $address
@@ 195-204 (lines=10) @@
192
     *
193
     * @throws TooManyRecipients
194
     */
195
    public function addBccRecipient(string $address, array $variables = []): self
196
    {
197
        if ($this->counters['recipients']['bcc'] > self::RECIPIENT_COUNT_LIMIT) {
198
            throw TooManyRecipients::create('bcc');
199
        }
200
201
        $this->addRecipient('bcc', $address, $variables);
202
203
        return $this;
204
    }
205
206
    /**
207
     * @param string $address