Message   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 getContentType() 0 4 1
A getBody() 0 4 1
1
<?php declare(strict_types = 1);
2
3
namespace JDR\Mailer\Email;
4
5
class Message
6
{
7
    /**
8
     * @var string
9
     */
10
    private $contentType;
11
12
    /**
13
     * @var string
14
     */
15
    private $body;
16
17
    /**
18
     * Constructor.
19
     *
20
     * @param string $contentType
21
     * @param string $body
22
     */
23 10
    public function __construct(string $contentType, string $body)
24
    {
25 10
        $this->contentType = $contentType;
26 10
        $this->body = $body;
27 10
    }
28
29
    /**
30
     * Get content type of the message.
31
     *
32
     * @return string
33
     */
34 2
    public function getContentType(): string
35
    {
36 2
        return $this->contentType;
37
    }
38
39
    /**
40
     * Get body of the message.
41
     *
42
     * @return string
43
     */
44 2
    public function getBody(): string
45
    {
46 2
        return $this->body;
47
    }
48
}
49