TemplatedContent::getTemplateId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
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;
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