Subject   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 44
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getSubject() 0 4 1
A getParameters() 0 4 1
1
<?php declare(strict_types = 1);
2
3
namespace JDR\Mailer\Part;
4
5
class Subject implements EmailPart
6
{
7
    /**
8
     * @var string
9
     */
10
    private $subject;
11
12
    /**
13
     * @var string[]
14
     */
15
    private $parameters;
16
17
    /**
18
     * Constructor.
19
     *
20
     * @param string $subject
21
     * @param string $parameters
22
     */
23 9
    public function __construct(string $subject, array $parameters = [])
24
    {
25 9
        $this->subject = $subject;
26 9
        $this->parameters = $parameters;
27 9
    }
28
29
    /**
30
     * Get subject of the message.
31
     *
32
     * @return string
33
     */
34 5
    public function getSubject(): string
35
    {
36 5
        return $this->subject;
37
    }
38
39
    /**
40
     * Get the parameters used in the subject.
41
     *
42
     * @return string[]
43
     */
44 7
    public function getParameters(): array
45
    {
46 7
        return $this->parameters;
47
    }
48
}
49