Completed
Pull Request — master (#137)
by
unknown
12:08
created

UpdateCustomerRequest   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 118
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 118
rs 10
c 0
b 0
f 0
wmc 6
lcom 0
cbo 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setFirstName() 0 6 1
A getFirstName() 0 4 1
A setLastName() 0 6 1
A getLastName() 0 4 1
A setEmail() 0 6 1
A getEmail() 0 4 1
1
<?php
2
3
namespace AppBundle\Model;
4
use Doctrine\ORM\Mapping as ORM;
5
use JMS\Serializer\Annotation as Serializer;
6
use Symfony\Component\Validator\Constraints as Assert;
7
//use AppBundle\Entity\Customer;
8
use JMS\Serializer\Annotation\Accessor;
9
use JMS\Serializer\Annotation\ExclusionPolicy;
10
use JMS\Serializer\Annotation\Expose;
11
use JMS\Serializer\Annotation\Type;
12
13
/**
14
 * @ExclusionPolicy("all")
15
 */
16
class UpdateCustomerRequest
17
{
18
19
20
    /**
21
     * @var string
22
     *  @Type("string")
23
     * @Accessor(getter="getFirstName")
24
     * @Assert\Regex(pattern="/\d/", match=false)
25
     * @Assert\Type("string")
26
     * @Assert\Length(min=2, max=100)
27
     * @Assert\NotBlank(
28
     *     message="not.blank"
29
     * )
30
     * @Expose
31
     */
32
    private $firstName;
33
34
    /**
35
     * @var string
36
     * @Type("string")
37
     * @Accessor(getter="getLastName")
38
     * @Assert\Regex(pattern="/\d/", match=false)
39
     * @Assert\Type("string")
40
     * @Assert\Length(min=2, max=100)
41
     * @Assert\NotBlank(
42
     *     message="not.blank"
43
     * )
44
     * @Expose
45
     */
46
    protected $lastName;
47
48
    /**
49
     * @var string
50
     * @Type("string")
51
     * @Accessor(getter="getEmail")
52
     * @Assert\Email()
53
     * @Assert\Type("string")
54
     * @Assert\Length(max=100)
55
     * @Assert\NotBlank(
56
     *     message="not.blank"
57
     * )
58
     * @Expose
59
     */
60
    protected $email;
61
62
    /**
63
     * Set firstName.
64
     *
65
     * @param string $firstName
66
     *
67
     * @return Customer
68
     */
69
    public function setFirstName($firstName)
70
    {
71
        $this->firstName = $firstName;
72
73
        return $this;
74
    }
75
76
    /**
77
     * Get firstName.
78
     *
79
     * @return string
80
     */
81
    public function getFirstName()
82
    {
83
        return $this->firstName;
84
    }
85
86
    /**
87
     * Set lastName.
88
     *
89
     * @param string $lastName
90
     *
91
     * @return Customer
92
     */
93
    public function setLastName($lastName)
94
    {
95
        $this->lastName = $lastName;
96
97
        return $this;
98
    }
99
100
    /**
101
     * Get lastName.
102
     *
103
     * @return string
104
     */
105
    public function getLastName()
106
    {
107
        return $this->lastName;
108
    }
109
110
    /**
111
     * Set email.
112
     *
113
     * @param string $email
114
     *
115
     * @return Customer
116
     */
117
    public function setEmail($email)
118
    {
119
        $this->email = $email;
120
121
        return $this;
122
    }
123
124
    /**
125
     * Get email.
126
     *
127
     * @return string
128
     */
129
    public function getEmail()
130
    {
131
        return $this->email;
132
    }
133
}
134
135