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 ( ccb5b0...806400 )
by Alex
02:59
created

ScheduledJob::setReschedulable()   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
 * This file is part of the Global Trading Technologies Ltd workflow-extension-bundle package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * (c) fduch <[email protected]>
9
 * @date 27.07.16
10
 */
11
12
namespace Gtt\Bundle\WorkflowExtensionsBundle\Entity;
13
14
use Doctrine\ORM\Mapping as ORM;
15
use Gtt\Bundle\WorkflowExtensionsBundle\Exception\InvalidArgumentException;
16
use JMS\JobQueueBundle\Entity\Job;
17
18
/**
19
 * Persists information about scheduled transition (as jms Job) for specified workflow and subject
20
 * and allows to fetch it in order to manipulate or re-schedule
21
 * @see Job
22
 *
23
 * @ORM\Entity(repositoryClass = "Gtt\Bundle\WorkflowExtensionsBundle\Entity\Repository\ScheduledJobRepository")
24
 *
25
 * @ORM\Table(name = "gtt_workflow_scheduled_job")
26
 *
27
 * (c) fduch <[email protected]>
28
 */
29
class ScheduledJob
30
{
31
    /**
32
     * Autogenerated id
33
     *
34
     * @var int
35
     *
36
     * @ORM\Id
37
     * @ORM\GeneratedValue(strategy = "AUTO")
38
     * @ORM\Column(type = "integer", options = {"unsigned": true})
39
     */
40
    private $id;
41
42
    /**
43
     * Reschedulable or not
44
     *
45
     * @var boolean
46
     *
47
     * @ORM\Column(type = "boolean")
48
     */
49
    private $reschedulable;
50
51
    /**
52
     * Related jms Job to be executed later
53
     *
54
     * @var Job
55
     *
56
     * @ORM\OneToOne(targetEntity="JMS\JobQueueBundle\Entity\Job")
57
     * @ORM\JoinColumn(name="jms_job_id", referencedColumnName="id", nullable=false)
58
     */
59
    private $job;
60
61
    /**
62
     * ScheduledJob constructor.
63
     *
64
     * @param Job     $transitionTriggerJob transition trigger job
65
     * @param boolean $reschedulable        reschedulable or not
66
     */
67
    public function __construct(Job $transitionTriggerJob, $reschedulable = true)
68
    {
69
        $this->reschedulable = $reschedulable;
70
        $this->job           = $transitionTriggerJob;
71
    }
72
73
74
    /**
75
     * Returns id
76
     *
77
     * @return int
78
     */
79
    public function getId()
80
    {
81
        return $this->id;
82
    }
83
84
    /**
85
     * @return boolean
86
     */
87
    public function getReschedulable()
88
    {
89
        return $this->reschedulable;
90
    }
91
92
    /**
93
     * @param boolean $reschedulable
94
     */
95
    public function setReschedulable($reschedulable)
96
    {
97
        $this->reschedulable = $reschedulable;
98
    }
99
100
    /**
101
     * Returns Job
102
     *
103
     * @return Job
104
     */
105
    public function getJob()
106
    {
107
        return $this->job;
108
    }
109
110
    /**
111
     * Sets Job
112
     *
113
     * @param Job $job Related jms job
114
     *
115
     * @return ScheduledJob
116
     */
117
    public function setJob($job)
118
    {
119
        $this->job = $job;
120
121
        return $this;
122
    }
123
}