Code Duplication    Length = 11-11 lines in 3 locations

src/Mailgun/Messages/MessageBuilder.php 3 locations

@@ 339-349 (lines=11) @@
336
     *
337
     * @return string
338
     */
339
    public function setTestMode($testMode)
340
    {
341
        if (filter_var($testMode, FILTER_VALIDATE_BOOLEAN)) {
342
            $testMode = 'yes';
343
        } else {
344
            $testMode = 'no';
345
        }
346
        $this->message['o:testmode'] = $testMode;
347
348
        return $this->message['o:testmode'];
349
    }
350
351
    /**
352
     * @param string|int $campaignId
@@ 400-410 (lines=11) @@
397
     *
398
     * @return mixed
399
     */
400
    public function setDkim($enabled)
401
    {
402
        if (filter_var($enabled, FILTER_VALIDATE_BOOLEAN)) {
403
            $enabled = 'yes';
404
        } else {
405
            $enabled = 'no';
406
        }
407
        $this->message['o:dkim'] = $enabled;
408
409
        return $this->message['o:dkim'];
410
    }
411
412
    /**
413
     * @param bool $enabled
@@ 417-427 (lines=11) @@
414
     *
415
     * @return string
416
     */
417
    public function setOpenTracking($enabled)
418
    {
419
        if (filter_var($enabled, FILTER_VALIDATE_BOOLEAN)) {
420
            $enabled = 'yes';
421
        } else {
422
            $enabled = 'no';
423
        }
424
        $this->message['o:tracking-opens'] = $enabled;
425
426
        return $this->message['o:tracking-opens'];
427
    }
428
429
    /**
430
     * @param bool $enabled