Template::getParameters()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php declare(strict_types = 1);
2
3
namespace JDR\Mailer\Part;
4
5 View Code Duplication
class Template implements EmailPart
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
6
{
7
    /**
8
     * @var string
9
     */
10
    private $contentType;
11
12
    /**
13
     * @var string
14
     */
15
    private $path;
16
17
    /**
18
     * @var string[]
19
     */
20
    private $parameters;
21
22
    /**
23
     * Constructor.
24
     *
25
     * @param string $contentType
26
     * @param string $path
27
     * @param string[] $parameters
28
     */
29 11
    public function __construct(string $contentType, string $path, array $parameters = [])
30
    {
31 11
        $this->contentType = $contentType;
32 11
        $this->path = $path;
33 11
        $this->parameters = $parameters;
34 11
    }
35
36
    /**
37
     * Get content type of the template.
38
     *
39
     * @return string
40
     */
41 5
    public function getContentType(): string
42
    {
43 5
        return $this->contentType;
44
    }
45
46
    /**
47
     * Get path of the template.
48
     *
49
     * @return string
50
     */
51 5
    public function getPath(): string
52
    {
53 5
        return $this->path;
54
    }
55
56
    /**
57
     * Get parameters used in the template.
58
     *
59
     * @return string
60
     */
61 7
    public function getParameters(): array
62
    {
63 7
        return $this->parameters;
64
    }
65
}
66