| Total Complexity | 6 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 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 |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return string|null |
||
| 63 | */ |
||
| 64 | public function getSubjectKeyword(): ?string |
||
| 67 | } |
||
| 68 | } |
||
| 69 |