Message::getBody()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 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