Message   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 34
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

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