FeedbackDto::setSubject()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Dto;
6
7
use Symfony\Component\Validator\Constraints as Assert;
8
9
final class FeedbackDto
10
{
11
    /**
12
     * @Assert\NotBlank()
13
     * @Assert\Length(min="2", max="100")
14
     */
15
    private ?string $from_name;
16
17
    /**
18
     * @Assert\NotBlank()
19
     * @Assert\Email()
20
     * @Assert\Length(min="6")
21
     */
22
    private ?string $from_email;
23
24
    /**
25
     * @Assert\NotBlank()
26
     * @Assert\Email()
27
     * @Assert\Length(min="6")
28
     */
29
    private ?string $to_email;
30
31
    private ?string $subject;
32
33
    /**
34
     * @Assert\NotBlank()
35
     * @Assert\Length(min="14")
36
     */
37
    private ?string $message;
38
39
    public function getFromName(): ?string
40
    {
41
        return $this->from_name;
42
    }
43
44
    public function setFromName(string $from_name): self
45
    {
46
        $this->from_name = $from_name;
47
48
        return $this;
49
    }
50
51
    public function getFromEmail(): ?string
52
    {
53
        return $this->from_email;
54
    }
55
56
    public function setFromEmail(string $from_email): self
57
    {
58
        $this->from_email = $from_email;
59
60
        return $this;
61
    }
62
63
    public function getToEmail(): ?string
64
    {
65
        return $this->to_email;
66
    }
67
68
    public function setToEmail(string $to_email): self
69
    {
70
        $this->to_email = $to_email;
71
72
        return $this;
73
    }
74
75
    public function getSubject(): ?string
76
    {
77
        return $this->subject;
78
    }
79
80
    public function setSubject(string $subject): self
81
    {
82
        $this->subject = $subject;
83
84
        return $this;
85
    }
86
87
    public function getMessage(): ?string
88
    {
89
        return $this->message;
90
    }
91
92
    public function setMessage(string $message): self
93
    {
94
        $this->message = $message;
95
96
        return $this;
97
    }
98
}
99