Message::__construct()   A
last analyzed

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 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpEmail\Content\SimpleContent;
6
7
class Message
8
{
9
    public const DEFAULT_CHARSET = 'utf-8';
10
11
    /**
12
     * @var string
13
     */
14
    private $body;
15
16
    /**
17
     * @var string
18
     */
19
    private $charset;
20
21 4
    public function __construct(string $body, string $charset = self::DEFAULT_CHARSET)
22
    {
23 4
        $this->body    = $body;
24 4
        $this->charset = $charset;
25
    }
26
27
    /**
28
     * @return string
29
     */
30 4
    public function getBody(): string
31
    {
32 4
        return $this->body;
33
    }
34
35
    /**
36
     * @return string
37
     */
38 4
    public function getCharset(): string
39
    {
40 4
        return $this->charset;
41
    }
42
}
43