TemplatedContent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getTemplateData() 0 3 1
A getTemplateId() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpEmail\Content;
6
7
use PhpEmail\Content;
8
9
class TemplatedContent implements Content\Contracts\TemplatedContent
10
{
11
    /**
12
     * @var string
13
     */
14
    protected $templateId;
15
16
    /**
17
     * @var array
18
     */
19
    protected $templateData;
20
21
    /**
22
     * @param string $templateId
23
     * @param array  $templateData
24
     */
25 1
    public function __construct(string $templateId, array $templateData)
26
    {
27 1
        $this->templateId   = $templateId;
28 1
        $this->templateData = $templateData;
29
    }
30
31
    /**
32
     * @return string
33
     */
34 1
    public function getTemplateId(): string
35
    {
36 1
        return $this->templateId;
37
    }
38
39
    /**
40
     * @return array|string[]
41
     */
42 1
    public function getTemplateData(): array
43
    {
44 1
        return $this->templateData;
45
    }
46
}
47