GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Branch user-entity (5d2483)
by Luis Ramón
03:29
created

Workcenter   A

Complexity

Total Complexity 25

Size/Duplication

Total Lines 345
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 25
c 5
b 0
f 0
lcom 1
cbo 2
dl 0
loc 345
rs 10

24 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __toString() 0 4 2
A getId() 0 4 1
A setCompany() 0 6 1
A getCompany() 0 4 1
A setAddress() 0 6 1
A getAddress() 0 4 1
A setCity() 0 6 1
A getCity() 0 4 1
A setProvince() 0 6 1
A getProvince() 0 4 1
A setZipCode() 0 6 1
A getZipCode() 0 4 1
A setPhoneNumber() 0 6 1
A getPhoneNumber() 0 4 1
A setEmail() 0 6 1
A getEmail() 0 4 1
A setManager() 0 6 1
A getManager() 0 4 1
A getAgreements() 0 4 1
A setName() 0 6 1
A getName() 0 4 1
A addAgreement() 0 6 1
A removeAgreement() 0 4 1
1
<?php
2
/*
3
  ÁTICA - Aplicación web para la gestión documental de centros educativos
4
5
  Copyright (C) 2015-2016: Luis Ramón López López
6
7
  This program is free software: you can redistribute it and/or modify
8
  it under the terms of the GNU Affero General Public License as published by
9
  the Free Software Foundation, either version 3 of the License, or
10
  (at your option) any later version.
11
12
  This program is distributed in the hope that it will be useful,
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
  GNU Affero General Public License for more details.
16
17
  You should have received a copy of the GNU Affero General Public License
18
  along with this program.  If not, see [http://www.gnu.org/licenses/].
19
*/
20
21
namespace AppBundle\Entity;
22
23
use Doctrine\Common\Collections\Collection;
24
use Doctrine\ORM\Mapping as ORM;
25
26
/**
27
 * @ORM\Entity
28
 */
29
class Workcenter
30
{
31
    /**
32
     * @ORM\Id
33
     * @ORM\Column(type="integer")
34
     * @ORM\GeneratedValue
35
     * @var int
36
     */
37
    protected $id;
38
39
    /**
40
     * @ORM\ManyToOne(targetEntity="Company")
41
     * @ORM\JoinColumn(nullable=false)
42
     */
43
    protected $company;
44
45
    /**
46
     * @ORM\Column(type="string")
47
     * @var string
48
     */
49
    protected $name;
50
51
    /**
52
     * @ORM\Column(type="string")
53
     * @var string
54
     */
55
    protected $address;
56
57
    /**
58
     * @ORM\Column(type="string")
59
     * @var string
60
     */
61
    protected $city;
62
63
    /**
64
     * @ORM\Column(type="string")
65
     * @var string
66
     */
67
    protected $province;
68
69
    /**
70
     * @ORM\Column(type="string")
71
     * @var string
72
     */
73
    protected $zipCode;
74
75
    /**
76
     * @ORM\Column(type="string", nullable=true)
77
     * @var string
78
     */
79
    protected $phoneNumber;
80
81
    /**
82
     * @ORM\Column(type="string", nullable=true)
83
     * @var string
84
     */
85
    protected $email;
86
87
    /**
88
     * @ORM\ManyToOne(targetEntity="User")
89
     * @ORM\JoinColumn(nullable=false)
90
     * @var User
91
     */
92
    protected $manager;
93
94
    /**
95
     * @ORM\OneToMany(targetEntity="Agreement", mappedBy="workcenter")
96
     * @var Collection
97
     */
98
    protected $agreements;
99
100
101
    /**
102
     * Constructor
103
     */
104
    public function __construct()
105
    {
106
        $this->agreements = new \Doctrine\Common\Collections\ArrayCollection();
107
    }
108
109
    public function __toString()
110
    {
111
        return $this->getName() ? $this->getName() . ' (' . $this->getCompany() . ')' : '';
112
    }
113
114
    /**
115
     * Get id
116
     *
117
     * @return integer
118
     */
119
    public function getId()
120
    {
121
        return $this->id;
122
    }
123
124
    /**
125
     * Set company
126
     *
127
     * @param Company $company
128
     *
129
     * @return Workcenter
130
     */
131
    public function setCompany(Company $company)
132
    {
133
        $this->company = $company;
134
135
        return $this;
136
    }
137
138
    /**
139
     * Get company
140
     *
141
     * @return Company
142
     */
143
    public function getCompany()
144
    {
145
        return $this->company;
146
    }
147
148
    /**
149
     * Set address
150
     *
151
     * @param string $address
152
     *
153
     * @return Workcenter
154
     */
155
    public function setAddress($address)
156
    {
157
        $this->address = $address;
158
159
        return $this;
160
    }
161
162
    /**
163
     * Get address
164
     *
165
     * @return string
166
     */
167
    public function getAddress()
168
    {
169
        return $this->address;
170
    }
171
172
    /**
173
     * Set city
174
     *
175
     * @param string $city
176
     *
177
     * @return Workcenter
178
     */
179
    public function setCity($city)
180
    {
181
        $this->city = $city;
182
183
        return $this;
184
    }
185
186
    /**
187
     * Get city
188
     *
189
     * @return string
190
     */
191
    public function getCity()
192
    {
193
        return $this->city;
194
    }
195
196
    /**
197
     * Set province
198
     *
199
     * @param string $province
200
     *
201
     * @return Workcenter
202
     */
203
    public function setProvince($province)
204
    {
205
        $this->province = $province;
206
207
        return $this;
208
    }
209
210
    /**
211
     * Get province
212
     *
213
     * @return string
214
     */
215
    public function getProvince()
216
    {
217
        return $this->province;
218
    }
219
220
    /**
221
     * Set zipCode
222
     *
223
     * @param string $zipCode
224
     *
225
     * @return Workcenter
226
     */
227
    public function setZipCode($zipCode)
228
    {
229
        $this->zipCode = $zipCode;
230
231
        return $this;
232
    }
233
234
    /**
235
     * Get zipCode
236
     *
237
     * @return string
238
     */
239
    public function getZipCode()
240
    {
241
        return $this->zipCode;
242
    }
243
244
    /**
245
     * Set phoneNumber
246
     *
247
     * @param string $phoneNumber
248
     *
249
     * @return Workcenter
250
     */
251
    public function setPhoneNumber($phoneNumber)
252
    {
253
        $this->phoneNumber = $phoneNumber;
254
255
        return $this;
256
    }
257
258
    /**
259
     * Get phoneNumber
260
     *
261
     * @return string
262
     */
263
    public function getPhoneNumber()
264
    {
265
        return $this->phoneNumber;
266
    }
267
268
    /**
269
     * Set email
270
     *
271
     * @param string $email
272
     *
273
     * @return Workcenter
274
     */
275
    public function setEmail($email)
276
    {
277
        $this->email = $email;
278
279
        return $this;
280
    }
281
282
    /**
283
     * Get email
284
     *
285
     * @return string
286
     */
287
    public function getEmail()
288
    {
289
        return $this->email;
290
    }
291
292
    /**
293
     * Set manager
294
     *
295
     * @param User $manager
296
     *
297
     * @return Workcenter
298
     */
299
    public function setManager(User $manager)
300
    {
301
        $this->manager = $manager;
302
303
        return $this;
304
    }
305
306
    /**
307
     * Get manager
308
     *
309
     * @return User
310
     */
311
    public function getManager()
312
    {
313
        return $this->manager;
314
    }
315
316
    /**
317
     * Add agreement
318
     *
319
     * @param Agreement $agreement
320
     *
321
     * @return Workcenter
322
     */
323
    public function addAgreement(Agreement $agreement)
324
    {
325
        $this->agreements[] = $agreement;
326
327
        return $this;
328
    }
329
330
    /**
331
     * Remove agreement
332
     *
333
     * @param Agreement $agreement
334
     */
335
    public function removeAgreement(Agreement $agreement)
336
    {
337
        $this->agreements->removeElement($agreement);
338
    }
339
340
    /**
341
     * Get agreements
342
     *
343
     * @return Collection
344
     */
345
    public function getAgreements()
346
    {
347
        return $this->agreements;
348
    }
349
350
    /**
351
     * Set name
352
     *
353
     * @param string $name
354
     *
355
     * @return Workcenter
356
     */
357
    public function setName($name)
358
    {
359
        $this->name = $name;
360
361
        return $this;
362
    }
363
364
    /**
365
     * Get name
366
     *
367
     * @return string
368
     */
369
    public function getName()
370
    {
371
        return $this->name;
372
    }
373
}
374