| Total Complexity | 8 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 86.36% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class Message |
||
| 10 | { |
||
| 11 | private string $name; |
||
| 12 | private string $email; |
||
| 13 | private string $subject; |
||
| 14 | private string $content; |
||
| 15 | private array $files = []; |
||
| 16 | private string $to; |
||
| 17 | |||
| 18 | 2 | public function __construct(string $name, string $email, string $subject, string $content, string $to) |
|
| 19 | { |
||
| 20 | 2 | $this->name = $name; |
|
| 21 | 2 | $this->email = $email; |
|
| 22 | 2 | $this->subject = $subject; |
|
| 23 | 2 | $this->content = $content; |
|
| 24 | 2 | $this->to = $to; |
|
| 25 | 2 | } |
|
| 26 | |||
| 27 | public function addFile(UploadedFileInterface $file) |
||
| 28 | { |
||
| 29 | $this->files[] = $file; |
||
| 30 | } |
||
| 31 | |||
| 32 | 2 | public function getName(): string |
|
| 33 | { |
||
| 34 | 2 | return $this->name; |
|
| 35 | } |
||
| 36 | |||
| 37 | 2 | public function getEmail(): string |
|
| 38 | { |
||
| 39 | 2 | return $this->email; |
|
| 40 | } |
||
| 41 | |||
| 42 | 2 | public function getSubject(): string |
|
| 43 | { |
||
| 44 | 2 | return $this->subject; |
|
| 45 | } |
||
| 46 | |||
| 47 | 2 | public function getContent(): string |
|
| 48 | { |
||
| 49 | 2 | return $this->content; |
|
| 50 | } |
||
| 51 | |||
| 52 | 2 | public function getFiles(): array |
|
| 53 | { |
||
| 54 | 2 | return $this->files; |
|
| 55 | } |
||
| 56 | |||
| 57 | 2 | public function getTo(): string |
|
| 60 | } |
||
| 61 | } |
||
| 62 |