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.

CronTask::setInterval()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4286
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/*
4
 * To change this license header, choose License Headers in Project Properties.
5
 * To change this template file, choose Tools | Templates
6
 * and open the template in the editor.
7
 */
8
9
namespace TMSolution\CronBundle\Entity;
10
11
use Doctrine\ORM\Mapping as ORM;
12
13
/**
14
 * Description of CronTask
15
 * 
16
 *
17
 * @author Łukasz Wawrzyniak <[email protected]>
18
 * 
19
 * @ORM\Entity(repositoryClass="\TMSolution\CronBundle\Repository\CronTaskRepository")
20
 */
21
class CronTask
22
{
23
24
    /**
25
     * @ORM\Id
26
     * @ORM\Column(type="integer", options= {"comment":"[PODSTAWOWE ELEMENTY SYSTEMU]Tabela zawierająca informacje na temat zadań automatycznych wykorzystywanych przez system B2B."})
27
     * @ORM\GeneratedValue(strategy="AUTO")
28
     */
29
    protected $id;
30
31
    /**
32
     * @ORM\Column(type="string")
33
     */
34
    private $name;
35
36
    /**
37
     * @ORM\Column(type="array")
38
     */
39
    private $commands;
40
41
    /**
42
     * @ORM\Column(type="boolean")
43
     */
44
    private $repeatable;
45
46
    /**
47
     * @ORM\Column(name="`interval`", type="integer")
48
     */
49
    private $interval;
50
51
    /**
52
     * @ORM\Column(type="datetime", nullable=true)
53
     */
54
    private $firstRun;
55
56
    /**
57
     * @ORM\Column(type="datetime", nullable=true)
58
     */
59
    private $runDate;
60
61
    /**
62
     * @ORM\Column(type="boolean", nullable=true)
63
     */
64
    private $used = 0;
65
66
    /**
67
     * @ORM\Column(type="boolean", nullable=true)
68
     */
69
    private $success;
70
71
    /**
72
     * @ORM\Column(type="boolean")
73
     */
74
    private $disabled = 0;
75
76
    /**
77
     * @ORM\Column(type="integer")
78
     */
79
    private $execType;
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
     * @return CronTask
96
     */
97
    public function setName($name)
98
    {
99
        $this->name = $name;
100
101
        return $this;
102
    }
103
104
    /**
105
     * Get name
106
     *
107
     * @return string 
108
     */
109
    public function getName()
110
    {
111
        return $this->name;
112
    }
113
114
    /**
115
     * Set commands
116
     *
117
     * @param array $commands
118
     * @return CronTask
119
     */
120
    public function setCommands($commands)
121
    {
122
        $this->commands = $commands;
123
124
        return $this;
125
    }
126
127
    /**
128
     * Get commands
129
     *
130
     * @return array 
131
     */
132
    public function getCommands()
133
    {
134
        return $this->commands;
135
    }
136
137
    /**
138
     * Set repeatable
139
     *
140
     * @param boolean $repeatable
141
     * @return CronTask
142
     */
143
    public function setRepeatable($repeatable)
144
    {
145
        $this->repeatable = $repeatable;
146
147
        return $this;
148
    }
149
150
    /**
151
     * Get repeatable
152
     *
153
     * @return boolean 
154
     */
155
    public function getRepeatable()
156
    {
157
        return $this->repeatable;
158
    }
159
160
    /**
161
     * Set interval
162
     *
163
     * @param integer $interval
164
     * @return CronTask
165
     */
166
    public function setInterval($interval)
167
    {
168
        $this->interval = $interval;
169
170
        return $this;
171
    }
172
173
    /**
174
     * Get interval
175
     *
176
     * @return integer 
177
     */
178
    public function getInterval()
179
    {
180
        return $this->interval;
181
    }
182
183
    /**
184
     * Set firstRun
185
     *
186
     * @param \DateTime $firstRun
187
     * @return CronTask
188
     */
189
    public function setFirstRun($firstRun)
190
    {
191
        $this->firstRun = $firstRun;
192
193
        return $this;
194
    }
195
196
    /**
197
     * Get firstRun
198
     *
199
     * @return \DateTime 
200
     */
201
    public function getFirstRun()
202
    {
203
        return $this->firstRun;
204
    }
205
206
    /**
207
     * Set runDate
208
     *
209
     * @param \DateTime $runDate
210
     * @return CronTask
211
     */
212
    public function setRunDate($runDate)
213
    {
214
        $this->runDate = $runDate;
215
216
        return $this;
217
    }
218
219
    /**
220
     * Get runDate
221
     *
222
     * @return \DateTime 
223
     */
224
    public function getRunDate()
225
    {
226
        return $this->runDate;
227
    }
228
229
    /**
230
     * Set success
231
     *
232
     * @param boolean $success
233
     * @return CronTask
234
     */
235
    public function setSuccess($success)
236
    {
237
        $this->success = $success;
238
239
        return $this;
240
    }
241
242
    /**
243
     * Get success
244
     *
245
     * @return boolean 
246
     */
247
    public function getSuccess()
248
    {
249
        return $this->success;
250
    }
251
252
    /**
253
     * Set disabled
254
     *
255
     * @param boolean $disabled
256
     * @return CronTask
257
     */
258
    public function setDisabled($disabled)
259
    {
260
        $this->disabled = $disabled;
0 ignored issues
show
Documentation Bug introduced by
The property $disabled was declared of type integer, but $disabled is of type boolean. 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...
261
262
        return $this;
263
    }
264
265
    /**
266
     * Get disabled
267
     *
268
     * @return boolean 
269
     */
270
    public function getDisabled()
271
    {
272
        return $this->disabled;
273
    }
274
275
    /**
276
     * Set execType
277
     *
278
     * @param integer $execType
279
     * @return CronTask
280
     */
281
    public function setExecType($execType)
282
    {
283
        $this->execType = $execType;
284
285
        return $this;
286
    }
287
288
    /**
289
     * Get execType
290
     *
291
     * @return integer 
292
     */
293
    public function getExecType()
294
    {
295
        return $this->execType;
296
    }
297
298
    /**
299
     * Set used
300
     *
301
     * @param boolean $used
302
     * @return CronTask
303
     */
304
    public function setUsed($used)
305
    {
306
        $this->used = $used;
0 ignored issues
show
Documentation Bug introduced by
The property $used was declared of type integer, but $used is of type boolean. 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...
307
308
        return $this;
309
    }
310
311
    /**
312
     * Get used
313
     *
314
     * @return boolean 
315
     */
316
    public function getUsed()
317
    {
318
        return $this->used;
319
    }
320
321
}
322