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