EmailPart   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 39
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getContent() 0 4 1
A getContentType() 0 4 1
A getCharset() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Explicit Architecture POC,
7
 * which is created on top of the Symfony Demo application.
8
 *
9
 * (c) Herberto Graça <[email protected]>
10
 *
11
 * For the full copyright and license information, please view the LICENSE
12
 * file that was distributed with this source code.
13
 */
14
15
namespace Acme\App\Core\Port\Notification\Client\Email;
16
17
/**
18
 * @author Marijn Koesen
19
 * @author Herberto Graca <[email protected]>
20
 */
21
class EmailPart
22
{
23
    /**
24
     * @var string
25
     */
26
    private $content;
27
28
    /**
29
     * @var string|null
30
     */
31
    private $contentType;
32
33
    /**
34
     * @var string|null
35
     */
36
    private $charset;
37
38
    public function __construct(string $content, string $contentType = null, string $charset = null)
39
    {
40
        $this->content = $content;
41
        $this->contentType = $contentType;
42
        $this->charset = $charset;
43
    }
44
45
    public function getContent(): string
46
    {
47
        return $this->content;
48
    }
49
50
    public function getContentType(): ?string
51
    {
52
        return $this->contentType;
53
    }
54
55
    public function getCharset(): ?string
56
    {
57
        return $this->charset;
58
    }
59
}
60