Cancelled
Push — develop ( 5a5c91...8665a3 )
by Florian
33s queued 10s
created

EmailTemplate::getSubjectKeyword()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\DTO;
4
5
class EmailTemplate
6
{
7
    private string $id;
8
    private string $providerId;
9
    private string $address;
10
    private string $from;
11
    private ?string $subjectKeyword;
12
13
    /**
14
     * @param string      $id
15
     * @param string      $providerId
16
     * @param string      $name
17
     * @param string      $address
18
     * @param string|null $subjectKeyword
19
     */
20
    public function __construct(string $id, string $providerId, string $name, string $address, string $subjectKeyword = null)
21
    {
22
        $this->id = $id;
23
        $this->providerId = $providerId;
24
        $this->address = $address;
25
        $this->from = sprintf('%s <%s>', $name, $address);
26
        $this->subjectKeyword = $subjectKeyword;
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function getId(): string
33
    {
34
        return $this->id;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getProviderId(): string
41
    {
42
        return $this->providerId;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getAddress(): string
49
    {
50
        return $this->address;
51
    }
52
53
    /**
54
     * @return string
55
     */
56
    public function getFrom(): string
57
    {
58
        return $this->from;
59
    }
60
61
    /**
62
     * @return string|null
63
     */
64
    public function getSubjectKeyword(): ?string
65
    {
66
        return $this->subjectKeyword;
67
    }
68
}
69