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

NullMailer::send()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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