Failed Conditions
Push — issue#767 ( d652de...c7fd2d )
by Guilherme
05:20
created

SupportMessage::setName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the login-cidadao project or it's bundles.
4
 *
5
 * (c) Guilherme Donato <guilhermednt on github>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace LoginCidadao\CoreBundle\Model;
12
13
use Symfony\Component\Validator\Constraints as Assert;
14
15
/**
16
 * Class SupportMessage represents a message sent by an user needing help.
17
 * @package LoginCidadao\CoreBundle\Model
18
 */
19
class SupportMessage
20
{
21
    /**
22
     * @var string
23
     * @Assert\NotBlank
24
     * @Assert\Length(
25
     *     min=3,
26
     *     max="255",
27
     *     minMessage="person.validation.name.length.min",
28
     *     maxMessage="person.validation.name.length.max"
29
     * )
30
     */
31
    private $name;
32
33
    /**
34
     * @var string
35
     *
36
     * @Assert\NotBlank
37
     * @Assert\Email(strict=true)
38
     * @Assert\Length(
39
     *     max="255",
40
     *     maxMessage="person.validation.email.length.max"
41
     * )
42
     */
43
    private $email;
44
45
    /**
46
     * @var string
47
     * @Assert\NotBlank
48
     */
49
    private $message;
50
51
    /**
52
     * @return mixed
53
     */
54 1
    public function getName()
55
    {
56 1
        return $this->name;
57
    }
58
59
    /**
60
     * @param mixed $name
61
     * @return SupportMessage
62
     */
63 1
    public function setName($name)
64
    {
65 1
        $this->name = $name;
66
67 1
        return $this;
68
    }
69
70
    /**
71
     * @return mixed
72
     */
73 1
    public function getEmail()
74
    {
75 1
        return $this->email;
76
    }
77
78
    /**
79
     * @param mixed $email
80
     * @return SupportMessage
81
     */
82 1
    public function setEmail($email)
83
    {
84 1
        $this->email = $email;
85
86 1
        return $this;
87
    }
88
89
    /**
90
     * @return mixed
91
     */
92 1
    public function getMessage()
93
    {
94 1
        return $this->message;
95
    }
96
97
    /**
98
     * @param mixed $message
99
     * @return SupportMessage
100
     */
101 1
    public function setMessage($message)
102
    {
103 1
        $this->message = $message;
104
105 1
        return $this;
106
    }
107
}
108