Completed
Push — master ( f50bd5...3755f8 )
by René
02:05
created

Mailer::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Zortje\Emailer;
5
6
use Zortje\Emailer\Adapter\ServiceAdapter;
7
8
/**
9
 * Class Mailer
10
 *
11
 * @package Zortje\Emailer
12
 */
13
class Mailer
14
{
15
16
    /**
17
     * @var ServiceAdapter
18
     */
19
    protected $serviceAdapter;
20
21
    /**
22
     * Mailer constructor.
23
     *
24
     * @param ServiceAdapter $serviceAdapter
25
     */
26 1
    public function __construct(ServiceAdapter $serviceAdapter)
27
    {
28 1
        $this->serviceAdapter = $serviceAdapter;
29 1
    }
30
31
    /**
32
     * Send email
33
     *
34
     * @param Email $email
35
     */
36
    public function send(Email $email)
37
    {
38
        $this->serviceAdapter->send($email);
39
    }
40
}
41