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 ( 2d33dc...ef1041 )
by Luis Ramón
02:50
created

Group::__toString()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 2
eloc 2
nc 2
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\Collection;
24
use Doctrine\ORM\Mapping as ORM;
25
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
26
27
/**
28
 * @ORM\Entity
29
 * @ORM\Table(name="classroom")
30
 * @UniqueEntity(fields={"name"})
31
 */
32
class Group
33
{
34
    /**
35
     * @ORM\Id
36
     * @ORM\Column(type="integer")
37
     * @ORM\GeneratedValue
38
     * @var int
39
     */
40
    protected $id;
41
42
    /**
43
     * @ORM\Column(type="string")
44
     * @var string
45
     */
46
    protected $name;
47
48
    /**
49
     * @ORM\ManyToOne(targetEntity="Training", inversedBy="groups")
50
     * @var Training
51
     */
52
    protected $training;
53
54
    /**
55
     * @ORM\ManyToMany(targetEntity="Teacher", inversedBy="tutorizedGroups")
56
     * @var Collection
57
     */
58
    protected $tutors;
59
60
    /**
61
     * @ORM\OneToMany(targetEntity="Student", mappedBy="group")
62
     * @var Collection
63
     */
64
    protected $students;
65
    /**
66
     * Constructor
67
     */
68
    public function __construct()
69
    {
70
        $this->tutors = new \Doctrine\Common\Collections\ArrayCollection();
71
        $this->students = new \Doctrine\Common\Collections\ArrayCollection();
72
    }
73
74
    public function __toString()
75
    {
76
        return $this->getName() ? $this->getName() : '';
77
    }
78
79
    /**
80
     * Get id
81
     *
82
     * @return integer
83
     */
84
    public function getId()
85
    {
86
        return $this->id;
87
    }
88
89
    /**
90
     * Set name
91
     *
92
     * @param string $name
93
     *
94
     * @return Group
95
     */
96
    public function setName($name)
97
    {
98
        $this->name = $name;
99
100
        return $this;
101
    }
102
103
    /**
104
     * Get name
105
     *
106
     * @return string
107
     */
108
    public function getName()
109
    {
110
        return $this->name;
111
    }
112
113
    /**
114
     * Set training
115
     *
116
     * @param Training $training
117
     *
118
     * @return Group
119
     */
120
    public function setTraining(Training $training = null)
121
    {
122
        $this->training = $training;
123
124
        return $this;
125
    }
126
127
    /**
128
     * Get training
129
     *
130
     * @return Training
131
     */
132
    public function getTraining()
133
    {
134
        return $this->training;
135
    }
136
137
    /**
138
     * Add tutor
139
     *
140
     * @param Teacher $tutor
141
     *
142
     * @return Group
143
     */
144
    public function addTutor(Teacher $tutor)
145
    {
146
        $this->tutors[] = $tutor;
147
148
        return $this;
149
    }
150
151
    /**
152
     * Remove tutor
153
     *
154
     * @param Teacher $tutor
155
     */
156
    public function removeTutor(Teacher $tutor)
157
    {
158
        $this->tutors->removeElement($tutor);
159
    }
160
161
    /**
162
     * Get tutors
163
     *
164
     * @return \Doctrine\Common\Collections\Collection
165
     */
166
    public function getTutors()
167
    {
168
        return $this->tutors;
169
    }
170
171
    /**
172
     * Add student
173
     *
174
     * @param Student $student
175
     *
176
     * @return Group
177
     */
178
    public function addStudent(Student $student)
179
    {
180
        $this->students[] = $student;
181
182
        return $this;
183
    }
184
185
    /**
186
     * Remove student
187
     *
188
     * @param Student $student
189
     */
190
    public function removeStudent(Student $student)
191
    {
192
        $this->students->removeElement($student);
193
    }
194
195
    /**
196
     * Get students
197
     *
198
     * @return \Doctrine\Common\Collections\Collection
199
     */
200
    public function getStudents()
201
    {
202
        return $this->students;
203
    }
204
}
205