Code Duplication    Length = 11-11 lines in 3 locations

src/Mailgun/Messages/MessageBuilder.php 3 locations

@@ 348-358 (lines=11) @@
345
     *
346
     * @return string
347
     */
348
    public function setTestMode($testMode)
349
    {
350
        if (filter_var($testMode, FILTER_VALIDATE_BOOLEAN)) {
351
            $testMode = 'yes';
352
        } else {
353
            $testMode = 'no';
354
        }
355
        $this->message['o:testmode'] = $testMode;
356
357
        return $this->message['o:testmode'];
358
    }
359
360
    /**
361
     * @param string|int $campaignId
@@ 409-419 (lines=11) @@
406
     *
407
     * @return mixed
408
     */
409
    public function setDkim($enabled)
410
    {
411
        if (filter_var($enabled, FILTER_VALIDATE_BOOLEAN)) {
412
            $enabled = 'yes';
413
        } else {
414
            $enabled = 'no';
415
        }
416
        $this->message['o:dkim'] = $enabled;
417
418
        return $this->message['o:dkim'];
419
    }
420
421
    /**
422
     * @param bool $enabled
@@ 426-436 (lines=11) @@
423
     *
424
     * @return string
425
     */
426
    public function setOpenTracking($enabled)
427
    {
428
        if (filter_var($enabled, FILTER_VALIDATE_BOOLEAN)) {
429
            $enabled = 'yes';
430
        } else {
431
            $enabled = 'no';
432
        }
433
        $this->message['o:tracking-opens'] = $enabled;
434
435
        return $this->message['o:tracking-opens'];
436
    }
437
438
    /**
439
     * @param bool $enabled