Test Failed
Push — master ( 4112a3...6b8d5c )
by Florian
05:27
created

NullMailer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 8
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A send() 0 3 1
1
<?php
2
declare(strict_types=1);
3
/**
4
 * Copyright (c) Phauthentic (https://github.com/Phauthentic)
5
 *
6
 * Licensed under The MIT License
7
 * For full copyright and license information, please see the LICENSE.txt
8
 * Redistributions of files must retain the above copyright notice.
9
 *
10
 * @copyright     Copyright (c) Phauthentic (https://github.com/Phauthentic)
11
 * @link          https://github.com/Phauthentic
12
 * @license       https://opensource.org/licenses/mit-license.php MIT License
13
 */
14
namespace Phauthentic\Email\Mailer;
15
16
use Phauthentic\Email\EmailInterface;
17
use Psr\Log\LoggerInterface;
18
19
/**
20
 * Useful for test environments if you don't want to log the emails
21
 *
22
 * The mails are not send anywhere, the send() method will always return true.
23
 */
24
class NullMailer implements MailerInterface
25
{
26
    /**
27
     * @inheritDoc
28
     */
29
    public function send(EmailInterface $email): bool
30
    {
31
        return true;
32
    }
33
}
34