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
Push — master ( b51e64...57b2f6 )
by Luis Ramón
13:02
created

Visit::getStudents()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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\ArrayCollection;
24
use Doctrine\Common\Collections\Collection;
25
use Doctrine\ORM\Mapping as ORM;
26
27
/**
28
 * @ORM\Entity(repositoryClass="VisitRepository")
29
 */
30
class Visit
31
{
32
    /**
33
     * @ORM\Id
34
     * @ORM\Column(type="integer")
35
     * @ORM\GeneratedValue
36
     * @var int
37
     */
38
    protected $id;
39
40
    /**
41
     * @ORM\Column(type="datetime")
42
     * @var \DateTime
43
     */
44
    protected $date;
45
46
    /**
47
     * @ORM\ManyToOne(targetEntity="User", inversedBy="visits")
48
     * @ORM\JoinColumn(nullable=false)
49
     * @var User
50
     */
51
    protected $tutor;
52
53
    /**
54
     * @ORM\ManyToMany(targetEntity="Agreement")
55
     * @var Collection
56
     */
57
    protected $agreements;
58
59
    /**
60
     * @ORM\ManyToOne(targetEntity="Workcenter", inversedBy="visits")
61
     * @ORM\JoinColumn(nullable=false)
62
     * @var Workcenter
63
     */
64
    protected $workcenter;
65
66
    /**
67
     * @ORM\Column(type="text", nullable=true)
68
     * @var string
69
     */
70
    protected $notes;
71
72
    /**
73
     * Constructor
74
     */
75
    public function __construct()
76
    {
77
        $this->agreements = new ArrayCollection();
78
    }
79
80
    /**
81
     * Get id
82
     *
83
     * @return integer
84
     */
85
    public function getId()
86
    {
87
        return $this->id;
88
    }
89
90
    /**
91
     * Set when
92
     *
93
     * @param \DateTime $date
94
     *
95
     * @return Visit
96
     */
97
    public function setDate($date)
98
    {
99
        $this->date = $date;
100
101
        return $this;
102
    }
103
104
    /**
105
     * Get when
106
     *
107
     * @return \DateTime
108
     */
109
    public function getDate()
110
    {
111
        return $this->date;
112
    }
113
114
    /**
115
     * Set notes
116
     *
117
     * @param string $notes
118
     *
119
     * @return Visit
120
     */
121
    public function setNotes($notes)
122
    {
123
        $this->notes = $notes;
124
125
        return $this;
126
    }
127
128
    /**
129
     * Get notes
130
     *
131
     * @return string
132
     */
133
    public function getNotes()
134
    {
135
        return $this->notes;
136
    }
137
138
    /**
139
     * Set teacher
140
     *
141
     * @param User $tutor
142
     *
143
     * @return Visit
144
     */
145
    public function setTutor(User $tutor)
146
    {
147
        $this->tutor = $tutor;
148
149
        return $this;
150
    }
151
152
    /**
153
     * Get teacher
154
     *
155
     * @return User
156
     */
157
    public function getTutor()
158
    {
159
        return $this->tutor;
160
    }
161
162
    /**
163
     * Set workcenter
164
     *
165
     * @param Workcenter $workcenter
166
     *
167
     * @return Visit
168
     */
169
    public function setWorkcenter(Workcenter $workcenter)
170
    {
171
        $this->workcenter = $workcenter;
172
173
        return $this;
174
    }
175
176
    /**
177
     * Get workcenter
178
     *
179
     * @return Workcenter
180
     */
181
    public function getWorkcenter()
182
    {
183
        return $this->workcenter;
184
    }
185
186
    /**
187
     * Add agreement
188
     *
189
     * @param User $agreement
190
     *
191
     * @return Visit
192
     */
193
    public function addStudent(User $agreement)
194
    {
195
        $this->agreements[] = $agreement;
196
197
        return $this;
198
    }
199
200
    /**
201
     * Remove agreement
202
     *
203
     * @param User $agreement
204
     */
205
    public function removeStudent(User $agreement)
206
    {
207
        $this->agreements->removeElement($agreement);
208
    }
209
210
    /**
211
     * Get agreements
212
     *
213
     * @return Collection
214
     */
215
    public function getAgreements()
216
    {
217
        return $this->agreements;
218
    }
219
}
220