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.

Workcenter::setCompany()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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(repositoryClass="WorkcenterRepository")
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", inversedBy="workcenters")
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
     * @ORM\OneToMany(targetEntity="Visit", mappedBy="workcenter")
102
     * @var Collection
103
     */
104
    protected $visits;
105
106
    /**
107
     * Constructor
108
     */
109
    public function __construct()
110
    {
111
        $this->agreements = new \Doctrine\Common\Collections\ArrayCollection();
112
        $this->visits = new \Doctrine\Common\Collections\ArrayCollection();
113
    }
114
115
    public function __toString()
116
    {
117
        return $this->getName() ? $this->getCompany() . ' - ' . $this->getName() : '';
118
    }
119
120
    /**
121
     * Get id
122
     *
123
     * @return integer
124
     */
125
    public function getId()
126
    {
127
        return $this->id;
128
    }
129
130
    /**
131
     * Set company
132
     *
133
     * @param Company $company
134
     *
135
     * @return Workcenter
136
     */
137
    public function setCompany(Company $company)
138
    {
139
        $this->company = $company;
140
141
        return $this;
142
    }
143
144
    /**
145
     * Get company
146
     *
147
     * @return Company
148
     */
149
    public function getCompany()
150
    {
151
        return $this->company;
152
    }
153
154
    /**
155
     * Set address
156
     *
157
     * @param string $address
158
     *
159
     * @return Workcenter
160
     */
161
    public function setAddress($address)
162
    {
163
        $this->address = $address;
164
165
        return $this;
166
    }
167
168
    /**
169
     * Get address
170
     *
171
     * @return string
172
     */
173
    public function getAddress()
174
    {
175
        return $this->address;
176
    }
177
178
    /**
179
     * Set city
180
     *
181
     * @param string $city
182
     *
183
     * @return Workcenter
184
     */
185
    public function setCity($city)
186
    {
187
        $this->city = $city;
188
189
        return $this;
190
    }
191
192
    /**
193
     * Get city
194
     *
195
     * @return string
196
     */
197
    public function getCity()
198
    {
199
        return $this->city;
200
    }
201
202
    /**
203
     * Set province
204
     *
205
     * @param string $province
206
     *
207
     * @return Workcenter
208
     */
209
    public function setProvince($province)
210
    {
211
        $this->province = $province;
212
213
        return $this;
214
    }
215
216
    /**
217
     * Get province
218
     *
219
     * @return string
220
     */
221
    public function getProvince()
222
    {
223
        return $this->province;
224
    }
225
226
    /**
227
     * Set zipCode
228
     *
229
     * @param string $zipCode
230
     *
231
     * @return Workcenter
232
     */
233
    public function setZipCode($zipCode)
234
    {
235
        $this->zipCode = $zipCode;
236
237
        return $this;
238
    }
239
240
    /**
241
     * Get zipCode
242
     *
243
     * @return string
244
     */
245
    public function getZipCode()
246
    {
247
        return $this->zipCode;
248
    }
249
250
    /**
251
     * Set phoneNumber
252
     *
253
     * @param string $phoneNumber
254
     *
255
     * @return Workcenter
256
     */
257
    public function setPhoneNumber($phoneNumber)
258
    {
259
        $this->phoneNumber = $phoneNumber;
260
261
        return $this;
262
    }
263
264
    /**
265
     * Get phoneNumber
266
     *
267
     * @return string
268
     */
269
    public function getPhoneNumber()
270
    {
271
        return $this->phoneNumber;
272
    }
273
274
    /**
275
     * Set email
276
     *
277
     * @param string $email
278
     *
279
     * @return Workcenter
280
     */
281
    public function setEmail($email)
282
    {
283
        $this->email = $email;
284
285
        return $this;
286
    }
287
288
    /**
289
     * Get email
290
     *
291
     * @return string
292
     */
293
    public function getEmail()
294
    {
295
        return $this->email;
296
    }
297
298
    /**
299
     * Set manager
300
     *
301
     * @param User $manager
302
     *
303
     * @return Workcenter
304
     */
305
    public function setManager(User $manager)
306
    {
307
        $this->manager = $manager;
308
309
        return $this;
310
    }
311
312
    /**
313
     * Get manager
314
     *
315
     * @return User
316
     */
317
    public function getManager()
318
    {
319
        return $this->manager;
320
    }
321
322
    /**
323
     * Add agreement
324
     *
325
     * @param Agreement $agreement
326
     *
327
     * @return Workcenter
328
     */
329
    public function addAgreement(Agreement $agreement)
330
    {
331
        $this->agreements[] = $agreement;
332
333
        return $this;
334
    }
335
336
    /**
337
     * Remove agreement
338
     *
339
     * @param Agreement $agreement
340
     */
341
    public function removeAgreement(Agreement $agreement)
342
    {
343
        $this->agreements->removeElement($agreement);
344
    }
345
346
    /**
347
     * Get agreements
348
     *
349
     * @return Collection
350
     */
351
    public function getAgreements()
352
    {
353
        return $this->agreements;
354
    }
355
356
    /**
357
     * Set name
358
     *
359
     * @param string $name
360
     *
361
     * @return Workcenter
362
     */
363
    public function setName($name)
364
    {
365
        $this->name = $name;
366
367
        return $this;
368
    }
369
370
    /**
371
     * Get name
372
     *
373
     * @return string
374
     */
375
    public function getName()
376
    {
377
        return $this->name;
378
    }
379
380
    /**
381
     * Add visit
382
     *
383
     * @param \AppBundle\Entity\Visit $visit
384
     *
385
     * @return Workcenter
386
     */
387
    public function addVisit(\AppBundle\Entity\Visit $visit)
388
    {
389
        $this->visits[] = $visit;
390
391
        return $this;
392
    }
393
394
    /**
395
     * Remove visit
396
     *
397
     * @param \AppBundle\Entity\Visit $visit
398
     */
399
    public function removeVisit(\AppBundle\Entity\Visit $visit)
400
    {
401
        $this->visits->removeElement($visit);
402
    }
403
404
    /**
405
     * Get visits
406
     *
407
     * @return Collection
408
     */
409
    public function getVisits()
410
    {
411
        return $this->visits;
412
    }
413
}
414