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 ( a34f50...45667e )
by Luis Ramón
02:54
created

Training::getProgramHours()   A

Complexity

Conditions 1
Paths 1

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 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\Collection;
24
use Doctrine\ORM\Mapping as ORM;
25
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
26
27
/**
28
 * @ORM\Entity
29
 * @UniqueEntity(fields={"name"})
30
 */
31
class Training
32
{
33
    /**
34
     * @ORM\Id
35
     * @ORM\Column(type="integer")
36
     * @ORM\GeneratedValue
37
     * @var int
38
     */
39
    protected $id;
40
41
    /**
42
     * @ORM\Column(type="string")
43
     * @var string
44
     */
45
    protected $name;
46
47
    /**
48
     * @ORM\OneToMany(targetEntity="Group", mappedBy="training")
49
     * @var Collection
50
     */
51
    protected $groups;
52
53
    /**
54
     * @ORM\ManyToOne(targetEntity="Department", inversedBy="trainings")
55
     * @ORM\JoinColumn(nullable=false)
56
     * @var Department
57
     */
58
    protected $department;
59
60
    /**
61
     * @ORM\OneToMany(targetEntity="Activity", mappedBy="training")
62
     * @var Collection
63
     */
64
    protected $activities;
65
66
    /**
67
     * @ORM\Column(type="integer")
68
     * @var int
69
     */
70
    protected $programHours;
71
72
    /**
73
     * Constructor
74
     */
75
    public function __construct()
76
    {
77
        $this->groups = new \Doctrine\Common\Collections\ArrayCollection();
78
        $this->activities = new \Doctrine\Common\Collections\ArrayCollection();
79
    }
80
81
    /**
82
     * Get id
83
     *
84
     * @return integer
85
     */
86
    public function getId()
87
    {
88
        return $this->id;
89
    }
90
91
    /**
92
     * Set name
93
     *
94
     * @param string $name
95
     *
96
     * @return Training
97
     */
98
    public function setName($name)
99
    {
100
        $this->name = $name;
101
102
        return $this;
103
    }
104
105
    /**
106
     * Get name
107
     *
108
     * @return string
109
     */
110
    public function getName()
111
    {
112
        return $this->name;
113
    }
114
115
    /**
116
     * Add group
117
     *
118
     * @param Group $group
119
     *
120
     * @return Training
121
     */
122
    public function addGroup(Group $group)
123
    {
124
        $this->groups[] = $group;
125
126
        return $this;
127
    }
128
129
    /**
130
     * Remove group
131
     *
132
     * @param Group $group
133
     */
134
    public function removeGroup(Group $group)
135
    {
136
        $this->groups->removeElement($group);
137
    }
138
139
    /**
140
     * Get groups
141
     *
142
     * @return Collection
143
     */
144
    public function getGroups()
145
    {
146
        return $this->groups;
147
    }
148
149
    /**
150
     * Set department
151
     *
152
     * @param Department $department
153
     *
154
     * @return Training
155
     */
156
    public function setDepartment(Department $department)
157
    {
158
        $this->department = $department;
159
160
        return $this;
161
    }
162
163
    /**
164
     * Get department
165
     *
166
     * @return Department
167
     */
168
    public function getDepartment()
169
    {
170
        return $this->department;
171
    }
172
173
    /**
174
     * Add activity
175
     *
176
     * @param Activity $activity
177
     *
178
     * @return Training
179
     */
180
    public function addActivity(Activity $activity)
181
    {
182
        $this->activities[] = $activity;
183
184
        return $this;
185
    }
186
187
    /**
188
     * Remove activity
189
     *
190
     * @param Activity $activity
191
     */
192
    public function removeActivity(Activity $activity)
193
    {
194
        $this->activities->removeElement($activity);
195
    }
196
197
    /**
198
     * Get activities
199
     *
200
     * @return Collection
201
     */
202
    public function getActivities()
203
    {
204
        return $this->activities;
205
    }
206
207
    /**
208
     * Set programHours
209
     *
210
     * @param integer $programHours
211
     *
212
     * @return Training
213
     */
214
    public function setProgramHours($programHours)
215
    {
216
        $this->programHours = $programHours;
217
218
        return $this;
219
    }
220
221
    /**
222
     * Get programHours
223
     *
224
     * @return integer
225
     */
226
    public function getProgramHours()
227
    {
228
        return $this->programHours;
229
    }
230
}
231