Test Setup Failed
Branch master (354693)
by Valery
10:57
created

Contact   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 95
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 21
c 1
b 0
f 0
dl 0
loc 95
rs 10
wmc 10

10 Methods

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