Completed
Pull Request — master (#137)
by
unknown
11:18
created

Customer::setLastName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 6
rs 9.4285
1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Symfony\Component\Security\Core\User\UserInterface;
7
use JMS\Serializer\Annotation\ExclusionPolicy;
8
use JMS\Serializer\Annotation\Expose;
9
use JMS\Serializer\Annotation\Type;
10
use JMS\Serializer\Annotation\SerializedName;
11
12
/**
13
 * User.
14
 *
15
 * @ORM\Table(name="customers")
16
 * @ORM\Entity(repositoryClass="AppBundle\Repository\CustomerRepository")
17
 * @ExclusionPolicy("all")
18
 */
19
class Customer implements UserInterface
20
{
21
    /**
22
     * @var int
23
     *
24
     * @ORM\Column(name="id", type="integer")
25
     * @ORM\Id
26
     * @ORM\GeneratedValue(strategy="AUTO")
27
     */
28
    protected $id;
29
30
    /**
31
     * @var string
32
     *
33
     * @ORM\Column(name="first_name", type="string", length=100, nullable=true)
34
     * @Expose
35
     */
36
    protected $firstName;
37
38
    /**
39
     * @var string
40
     *
41
     * @ORM\Column(name="last_name", type="string", length=100, nullable=true)
42
     * @Expose
43
     */
44
    protected $lastName;
45
46
    /**
47
     * @var string
48
     *
49
     * @ORM\Column(name="email", type="string", length=100, nullable=true)
50
     * @Expose
51
     */
52
    protected $email;
53
54
    /**
55
     * @var string
56
     *
57
     * @ORM\Column(name="username", type="string", length=100)
58
     */
59
    protected $username;
60
61
    /**
62
     * @var string
63
     *
64
     * @ORM\Column(name="api_key", type="string", length=255, nullable=true)
65
     * @Expose
66
     */
67
    private $apiKey;
68
69
    /**
70
     * @var string
71
     *
72
     * @ORM\Column(name="facebook_id", type="string", length=255, nullable=true, unique=true)
73
     */
74
    private $facebookId;
75
76
    /**
77
     * Get id.
78
     *
79
     * @return int
80
     */
81
    public function getId()
82
    {
83
        return $this->id;
84
    }
85
86
    /**
87
     * Set apiKey.
88
     *
89
     * @param string $apiKey
90
     *
91
     * @return Customer
92
     */
93
    public function setApiKey($apiKey)
94
    {
95
        $this->apiKey = $apiKey;
96
97
        return $this;
98
    }
99
100
    /**
101
     * Get apiKey.
102
     *
103
     * @return string
104
     */
105
    public function getApiKey()
106
    {
107
        return $this->apiKey;
108
    }
109
110
    /**
111
     * @inheritdoc
112
     */
113
    public function getRoles()
114
    {
115
        return array('ROLE_API');
116
    }
117
118
    /**
119
     * @inheritdoc
120
     */
121
    public function getPassword()
122
    {
123
    }
124
125
    /**
126
     * @inheritdoc
127
     */
128
    public function getSalt()
129
    {
130
    }
131
132
    /**
133
     * @inheritdoc
134
     */
135
    public function eraseCredentials()
136
    {
137
    }
138
139
    /**
140
     * Set facebookId.
141
     *
142
     * @param string $facebookId
143
     *
144
     * @return Customer
145
     */
146
    public function setFacebookID($facebookId)
147
    {
148
        $this->facebookId = $facebookId;
149
150
        return $this;
151
    }
152
153
    /**
154
     * Get facebookId.
155
     *
156
     * @return string
157
     */
158
    public function getFacebookID()
159
    {
160
        return $this->facebookId;
161
    }
162
163
    /**
164
     * Set username.
165
     *
166
     * @param string $username
167
     *
168
     * @return Customer
169
     */
170
    public function setUsername($username)
171
    {
172
        $this->username = $username;
173
174
        return $this;
175
    }
176
177
    /**
178
     * Get username.
179
     *
180
     * @return string
181
     */
182
    public function getUsername()
183
    {
184
        return $this->username;
185
    }
186
187
    /**
188
     * Set firstName.
189
     *
190
     * @param string $firstName
191
     *
192
     * @return Customer
193
     */
194
    public function setFirstName($firstName)
195
    {
196
        $this->firstName = $firstName;
197
198
        return $this;
199
    }
200
201
    /**
202
     * Get firstName.
203
     *
204
     * @return string
205
     */
206
    public function getFirstName()
207
    {
208
        return $this->firstName;
209
    }
210
211
    /**
212
     * Set lastName.
213
     *
214
     * @param string $lastName
215
     *
216
     * @return Customer
217
     */
218
    public function setLastName($lastName)
219
    {
220
        $this->lastName = $lastName;
221
222
        return $this;
223
    }
224
225
    /**
226
     * Get lastName.
227
     *
228
     * @return string
229
     */
230
    public function getLastName()
231
    {
232
        return $this->lastName;
233
    }
234
235
    /**
236
     * Set email.
237
     *
238
     * @param string $email
239
     *
240
     * @return Customer
241
     */
242
    public function setEmail($email)
243
    {
244
        $this->email = $email;
245
246
        return $this;
247
    }
248
249
    /**
250
     * Get email.
251
     *
252
     * @return string
253
     */
254
    public function getEmail()
255
    {
256
        return $this->email;
257
    }
258
}
259