Test Setup Failed
Push — master ( 0d28da...2c219d )
by Julito
31:57
created

SysAnnouncement::isVisibleSessionAdmin()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CoreBundle\Entity;
5
6
use Doctrine\ORM\Mapping as ORM;
7
8
/**
9
 * SysAnnouncement
10
 *
11
 * @ORM\Table(name="sys_announcement")
12
 * @ORM\Entity
13
 */
14
class SysAnnouncement
15
{
16
    /**
17
     * @var integer
18
     *
19
     * @ORM\Column(name="id", type="integer")
20
     * @ORM\Id
21
     * @ORM\GeneratedValue()
22
     */
23
    private $id;
24
25
    /**
26
     * @var \DateTime
27
     *
28
     * @ORM\Column(name="date_start", type="datetime", nullable=false)
29
     */
30
    private $dateStart;
31
32
    /**
33
     * @var \DateTime
34
     *
35
     * @ORM\Column(name="date_end", type="datetime", nullable=false)
36
     */
37
    private $dateEnd;
38
39
    /**
40
     * @var boolean
41
     *
42
     * @ORM\Column(name="visible_teacher", type="boolean", nullable=false)
43
     */
44
    private $visibleTeacher;
45
46
    /**
47
     * @var boolean
48
     *
49
     * @ORM\Column(name="visible_student", type="boolean", nullable=false)
50
     */
51
    private $visibleStudent;
52
53
    /**
54
     * @var boolean
55
     *
56
     * @ORM\Column(name="visible_guest", type="boolean", nullable=false)
57
     */
58
    private $visibleGuest;
59
60
     /**
61
     * @var boolean
62
     *
63
     * @ORM\Column(name="visible_drh", type="boolean", nullable=false)
64
     */
65
    private $visibleDrh;
66
67
    /**
68
     * @var boolean
69
     *
70
     * @ORM\Column(name="visible_session_admin", type="boolean", nullable=false)
71
     */
72
    private $visibleSessionAdmin;
73
74
    /**
75
     * @var boolean
76
     *
77
     * @ORM\Column(name="visible_boss", type="boolean", nullable=false)
78
     */
79
    private $visibleBoss;
80
81
    /**
82
     * @var string
83
     *
84
     * @ORM\Column(name="title", type="string", length=250, nullable=false)
85
     */
86
    private $title;
87
88
    /**
89
     * @var string
90
     *
91
     * @ORM\Column(name="content", type="text", nullable=false)
92
     */
93
    private $content;
94
95
    /**
96
     * @var string
97
     *
98
     * @ORM\Column(name="lang", type="string", length=70, nullable=true)
99
     */
100
    private $lang;
101
102
    /**
103
     * @var integer
104
     *
105
     * @ORM\Column(name="access_url_id", type="integer", nullable=false)
106
     */
107
    private $accessUrlId;
108
109
    /**
110
     * SysAnnouncement constructor.
111
     */
112
    public function __construct()
113
    {
114
        $this->visibleBoss = 0;
0 ignored issues
show
Documentation Bug introduced by
The property $visibleBoss was declared of type boolean, but 0 is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
115
        $this->visibleDrh = 0;
0 ignored issues
show
Documentation Bug introduced by
The property $visibleDrh was declared of type boolean, but 0 is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
116
        $this->visibleGuest= 0;
0 ignored issues
show
Documentation Bug introduced by
The property $visibleGuest was declared of type boolean, but 0 is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
117
        $this->visibleSessionAdmin = 0;
0 ignored issues
show
Documentation Bug introduced by
The property $visibleSessionAdmin was declared of type boolean, but 0 is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
118
        $this->visibleStudent = 0;
0 ignored issues
show
Documentation Bug introduced by
The property $visibleStudent was declared of type boolean, but 0 is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
119
        $this->visibleTeacher = 0;
0 ignored issues
show
Documentation Bug introduced by
The property $visibleTeacher was declared of type boolean, but 0 is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
120
    }
121
122
    /**
123
     * Set dateStart
124
     *
125
     * @param \DateTime $dateStart
126
     * @return SysAnnouncement
127
     */
128
    public function setDateStart($dateStart)
129
    {
130
        $this->dateStart = $dateStart;
131
132
        return $this;
133
    }
134
135
    /**
136
     * Get dateStart
137
     *
138
     * @return \DateTime
139
     */
140
    public function getDateStart()
141
    {
142
        return $this->dateStart;
143
    }
144
145
    /**
146
     * Set dateEnd
147
     *
148
     * @param \DateTime $dateEnd
149
     * @return SysAnnouncement
150
     */
151
    public function setDateEnd($dateEnd)
152
    {
153
        $this->dateEnd = $dateEnd;
154
155
        return $this;
156
    }
157
158
    /**
159
     * Get dateEnd
160
     *
161
     * @return \DateTime
162
     */
163
    public function getDateEnd()
164
    {
165
        return $this->dateEnd;
166
    }
167
168
    /**
169
     * Set visibleTeacher
170
     *
171
     * @param boolean $visibleTeacher
172
     * @return SysAnnouncement
173
     */
174
    public function setVisibleTeacher($visibleTeacher)
175
    {
176
        $this->visibleTeacher = $visibleTeacher;
177
178
        return $this;
179
    }
180
181
    /**
182
     * Get visibleTeacher
183
     *
184
     * @return boolean
185
     */
186
    public function getVisibleTeacher()
187
    {
188
        return $this->visibleTeacher;
189
    }
190
191
    /**
192
     * Set visibleStudent
193
     *
194
     * @param boolean $visibleStudent
195
     * @return SysAnnouncement
196
     */
197
    public function setVisibleStudent($visibleStudent)
198
    {
199
        $this->visibleStudent = $visibleStudent;
200
201
        return $this;
202
    }
203
204
    /**
205
     * Get visibleStudent
206
     *
207
     * @return boolean
208
     */
209
    public function getVisibleStudent()
210
    {
211
        return $this->visibleStudent;
212
    }
213
214
    /**
215
     * Set visibleGuest
216
     *
217
     * @param boolean $visibleGuest
218
     * @return SysAnnouncement
219
     */
220
    public function setVisibleGuest($visibleGuest)
221
    {
222
        $this->visibleGuest = $visibleGuest;
223
224
        return $this;
225
    }
226
227
    /**
228
     * Get visibleGuest
229
     *
230
     * @return boolean
231
     */
232
    public function getVisibleGuest()
233
    {
234
        return $this->visibleGuest;
235
    }
236
237
    /**
238
     * Set title
239
     *
240
     * @param string $title
241
     * @return SysAnnouncement
242
     */
243
    public function setTitle($title)
244
    {
245
        $this->title = $title;
246
247
        return $this;
248
    }
249
250
    /**
251
     * Get title
252
     *
253
     * @return string
254
     */
255
    public function getTitle()
256
    {
257
        return $this->title;
258
    }
259
260
    /**
261
     * Set content
262
     *
263
     * @param string $content
264
     * @return SysAnnouncement
265
     */
266
    public function setContent($content)
267
    {
268
        $this->content = $content;
269
270
        return $this;
271
    }
272
273
    /**
274
     * Get content
275
     *
276
     * @return string
277
     */
278
    public function getContent()
279
    {
280
        return $this->content;
281
    }
282
283
    /**
284
     * Set lang
285
     *
286
     * @param string $lang
287
     * @return SysAnnouncement
288
     */
289
    public function setLang($lang)
290
    {
291
        $this->lang = $lang;
292
293
        return $this;
294
    }
295
296
    /**
297
     * Get lang
298
     *
299
     * @return string
300
     */
301
    public function getLang()
302
    {
303
        return $this->lang;
304
    }
305
306
    /**
307
     * Set accessUrlId
308
     *
309
     * @param integer $accessUrlId
310
     * @return SysAnnouncement
311
     */
312
    public function setAccessUrlId($accessUrlId)
313
    {
314
        $this->accessUrlId = $accessUrlId;
315
316
        return $this;
317
    }
318
319
    /**
320
     * Get accessUrlId
321
     *
322
     * @return integer
323
     */
324
    public function getAccessUrlId()
325
    {
326
        return $this->accessUrlId;
327
    }
328
329
    /**
330
     * Get id
331
     *
332
     * @return integer
333
     */
334
    public function getId()
335
    {
336
        return $this->id;
337
    }
338
339
    /**
340
     * @return bool
341
     */
342
    public function isVisibleDrh(): bool
343
    {
344
        return $this->visibleDrh;
345
    }
346
347
    /**
348
     * @param bool $visibleDrh
349
     * @return SysAnnouncement
350
     */
351
    public function setVisibleDrh(bool $visibleDrh): SysAnnouncement
352
    {
353
        $this->visibleDrh = $visibleDrh;
354
355
        return $this;
356
    }
357
358
    /**
359
     * @return bool
360
     */
361
    public function isVisibleSessionAdmin(): bool
362
    {
363
        return $this->visibleSessionAdmin;
364
    }
365
366
    /**
367
     * @param bool $visibleSessionAdmin
368
     * @return SysAnnouncement
369
     */
370
    public function setVisibleSessionAdmin(bool $visibleSessionAdmin
371
    ): SysAnnouncement {
372
        $this->visibleSessionAdmin = $visibleSessionAdmin;
373
374
        return $this;
375
    }
376
377
    /**
378
     * @return bool
379
     */
380
    public function isVisibleBoss(): bool
381
    {
382
        return $this->visibleBoss;
383
    }
384
385
    /**
386
     * @param bool $visibleBoss
387
     * @return SysAnnouncement
388
     */
389
    public function setVisibleBoss(bool $visibleBoss): SysAnnouncement
390
    {
391
        $this->visibleBoss = $visibleBoss;
392
393
        return $this;
394
    }
395
396
}
397