Completed
Pull Request — master (#137)
by
unknown
15:28
created

Customer::setUsername()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 3
c 1
b 0
f 1
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="firstname", type="string", length=100, nullable=true)
34
     * @Expose
35
     */
36
    protected $firstname;
37
38
    /**
39
     * @var string
40
     *
41
     * @ORM\Column(name="lastname", type="string", length=100, nullable=true)
42
     * @Expose
43
     */
44
    protected $lastname;
45
    /**
46
     * @var string
47
     *
48
     * @ORM\Column(name="email", type="string", length=100, nullable=true)
49
     * @Expose
50
     */
51
    protected $email;
52
    /**
53
     * @var string
54
     *
55
     * @ORM\Column(name="username", type="string", length=100)
56
     */
57
    protected $username;
58
59
    /**
60
     * @var string
61
     *
62
     * @ORM\Column(name="apiKey", type="string", length=255, nullable=true)
63
     * @Expose
64
     */
65
    private $apiKey;
66
67
    /**
68
     * @var string
69
     *
70
     * @ORM\Column(name="facebook_id", type="string", length=255, nullable=true, unique=true)
71
     */
72
    private $facebookID;
73
74
    /**
75
     * Get id.
76
     *
77
     * @return int
78
     */
79
    public function getId()
80
    {
81
        return $this->id;
82
    }
83
84
    /**
85
     * Set apiKey.
86
     *
87
     * @param string $apiKey
88
     *
89
     * @return Customer
90
     */
91
    public function setApiKey($apiKey)
92
    {
93
        $this->apiKey = $apiKey;
94
95
        return $this;
96
    }
97
98
    /**
99
     * Get apiKey.
100
     *
101
     * @return string
102
     */
103
    public function getApiKey()
104
    {
105
        return $this->apiKey;
106
    }
107
108
    public function getRoles()
109
    {
110
        return array('ROLE_API');
111
    }
112
113
    public function getPassword()
114
    {
115
    }
116
    public function getSalt()
117
    {
118
    }
119
    public function eraseCredentials()
120
    {
121
    }
122
123
    /**
124
     * Set facebookID.
125
     *
126
     * @param string $facebookID
127
     *
128
     * @return Customer
129
     */
130
    public function setFacebookID($facebookID)
131
    {
132
        $this->facebookID = $facebookID;
133
134
        return $this;
135
    }
136
137
    /**
138
     * Get facebookID.
139
     *
140
     * @return string
141
     */
142
    public function getFacebookID()
143
    {
144
        return $this->facebookID;
145
    }
146
147
    /**
148
     * Set usernameApi.
149
     *
150
     * @param string $username
151
     *
152
     * @return Customer
153
     */
154
    public function setUsername($username)
155
    {
156
        $this->username = $username;
157
158
        return $this;
159
    }
160
161
    /**
162
     * Get username.
163
     *
164
     * @return string
165
     */
166
    public function getUsername()
167
    {
168
        return $this->username;
169
    }
170
171
    /**
172
     * Set firstname.
173
     *
174
     * @param string $firstname
175
     *
176
     * @return Customer
177
     */
178
    public function setFirstname($firstname)
179
    {
180
        $this->firstname = $firstname;
181
182
        return $this;
183
    }
184
185
    /**
186
     * Get firstname.
187
     *
188
     * @return string
189
     */
190
    public function getFirstname()
191
    {
192
        return $this->firstname;
193
    }
194
195
    /**
196
     * Set lastname.
197
     *
198
     * @param string $lastname
199
     *
200
     * @return Customer
201
     */
202
    public function setLastname($lastname)
203
    {
204
        $this->lastname = $lastname;
205
206
        return $this;
207
    }
208
209
    /**
210
     * Get lastname.
211
     *
212
     * @return string
213
     */
214
    public function getLastname()
215
    {
216
        return $this->lastname;
217
    }
218
219
    /**
220
     * Set email.
221
     *
222
     * @param string $email
223
     *
224
     * @return Customer
225
     */
226
    public function setEmail($email)
227
    {
228
        $this->email = $email;
229
230
        return $this;
231
    }
232
233
    /**
234
     * Get email.
235
     *
236
     * @return string
237
     */
238
    public function getEmail()
239
    {
240
        return $this->email;
241
    }
242
}
243