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

Mailer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 50%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 28
ccs 3
cts 6
cp 0.5
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A send() 0 4 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