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 — criterios ( 85d533 )
by Luis Ramón
10:14
created

LearningOutcome::removeCriterion()   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 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\ArrayCollection;
24
use Doctrine\Common\Collections\Collection;
25
use Doctrine\ORM\Mapping as ORM;
26
27
/**
28
 * @ORM\Entity(repositoryClass="LearningOutcomeRepository")
29
 */
30
class LearningOutcome
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="string", nullable=true)
42
     * @var string
43
     */
44
    protected $code;
45
46
    /**
47
     * @ORM\Column(type="text")
48
     * @var string
49
     */
50
    protected $name;
51
52
    /**
53
     * @ORM\Column(type="text", nullable=true)
54
     * @var string
55
     */
56
    protected $description;
57
58
    /**
59
     * @ORM\ManyToOne(targetEntity="Training", inversedBy="learningOutcomes")
60
     * @ORM\JoinColumn(nullable=false)
61
     * @var Training
62
     */
63
    protected $training;
64
65
    /**
66
     * @ORM\OneToMany(targetEntity="Activity", mappedBy="learningOutcome")
67
     * @var Collection
68
     */
69
    protected $activities;
70
71
    /**
72
     * @ORM\Column(type="integer", nullable=true)
73
     * @var int
74
     */
75
    protected $orderNr;
76
77
    /**
78
     * @ORM\OneToMany(targetEntity="Criterion", mappedBy="learningOutcome")
79
     * @var Collection
80
     */
81
    protected $criteria;
82
83
    /**
84
     * Constructor
85
     */
86
    public function __construct()
87
    {
88
        $this->activities = new ArrayCollection();
89
        $this->criteria = new ArrayCollection();
90
    }
91
92
    /**
93
     * Get id
94
     *
95
     * @return integer
96
     */
97
    public function getId()
98
    {
99
        return $this->id;
100
    }
101
102
    /**
103
     * @return string
104
     */
105
    public function __toString()
106
    {
107
        return $this->getCode() ? $this->getCode() . ': ' . $this->getName() : $this->getName();
108
    }
109
110
    /**
111
     * Set name
112
     *
113
     * @param string $name
114
     *
115
     * @return LearningOutcome
116
     */
117
    public function setName($name)
118
    {
119
        $this->name = $name;
120
121
        return $this;
122
    }
123
124
    /**
125
     * Get name
126
     *
127
     * @return string
128
     */
129
    public function getName()
130
    {
131
        return $this->name;
132
    }
133
134
    /**
135
     * Set description
136
     *
137
     * @param string $description
138
     *
139
     * @return LearningOutcome
140
     */
141
    public function setDescription($description)
142
    {
143
        $this->description = $description;
144
145
        return $this;
146
    }
147
148
    /**
149
     * Get description
150
     *
151
     * @return string
152
     */
153
    public function getDescription()
154
    {
155
        return $this->description;
156
    }
157
158
    /**
159
     * Set order
160
     *
161
     * @param integer $orderNr
162
     *
163
     * @return LearningOutcome
164
     */
165
    public function setOrderNr($orderNr)
166
    {
167
        $this->orderNr = $orderNr;
168
169
        return $this;
170
    }
171
172
    /**
173
     * Get order
174
     *
175
     * @return integer
176
     */
177
    public function getOrderNr()
178
    {
179
        return $this->orderNr;
180
    }
181
182
    /**
183
     * Set code
184
     *
185
     * @param string $code
186
     *
187
     * @return LearningOutcome
188
     */
189
    public function setCode($code)
190
    {
191
        $this->code = $code;
192
193
        return $this;
194
    }
195
196
    /**
197
     * Get code
198
     *
199
     * @return string
200
     */
201
    public function getCode()
202
    {
203
        return $this->code;
204
    }
205
206
    /**
207
     * Add activity
208
     *
209
     * @param Activity $activity
210
     *
211
     * @return LearningOutcome
212
     */
213
    public function addActivity(Activity $activity)
214
    {
215
        $this->activities[] = $activity;
216
217
        return $this;
218
    }
219
220
    /**
221
     * Remove activity
222
     *
223
     * @param Activity $activity
224
     */
225
    public function removeActivity(Activity $activity)
226
    {
227
        $this->activities->removeElement($activity);
228
    }
229
230
    /**
231
     * Get activities
232
     *
233
     * @return \Doctrine\Common\Collections\Collection
234
     */
235
    public function getActivities()
236
    {
237
        return $this->activities;
238
    }
239
240
    /**
241
     * Set training
242
     *
243
     * @param Training $training
244
     *
245
     * @return LearningOutcome
246
     */
247
    public function setTraining(Training $training)
248
    {
249
        $this->training = $training;
250
251
        return $this;
252
    }
253
254
    /**
255
     * Get training
256
     *
257
     * @return Training
258
     */
259
    public function getTraining()
260
    {
261
        return $this->training;
262
    }
263
264
    /**
265
     * Add criterion
266
     *
267
     * @param Criterion $criterion
268
     *
269
     * @return LearningOutcome
270
     */
271
    public function addCriterion(Criterion $criterion)
272
    {
273
        $this->criteria[] = $criterion;
274
275
        return $this;
276
    }
277
278
    /**
279
     * Remove criterion
280
     *
281
     * @param Criterion $criterion
282
     */
283
    public function removeCriterion(Criterion $criterion)
284
    {
285
        $this->criteria->removeElement($criterion);
286
    }
287
288
    /**
289
     * Get criteria
290
     *
291
     * @return \Doctrine\Common\Collections\Collection
292
     */
293
    public function getCriteria()
294
    {
295
        return $this->criteria;
296
    }
297
}
298