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

ScheduledJob   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 99
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 99
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getId() 0 4 1
A isReschedulable() 0 4 1
A setReschedulable() 0 4 1
A getJob() 0 4 1
A setJob() 0 6 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 JMS\JobQueueBundle\Entity\Job;
16
17
/**
18
 * Persists information about scheduled transition (as jms Job) for specified workflow and subject
19
 * and allows to fetch it in order to manipulate or re-schedule
20
 * @see Job
21
 *
22
 * @ORM\Entity(repositoryClass = "Gtt\Bundle\WorkflowExtensionsBundle\Entity\Repository\ScheduledJobRepository")
23
 *
24
 * @ORM\Table(name = "gtt_workflow_scheduled_job")
25
 *
26
 * (c) fduch <[email protected]>
27
 */
28
class ScheduledJob
29
{
30
    /**
31
     * Autogenerated id
32
     *
33
     * @var int
34
     *
35
     * @ORM\Id
36
     * @ORM\GeneratedValue(strategy = "AUTO")
37
     * @ORM\Column(type = "integer", options = {"unsigned": true})
38
     */
39
    private $id;
40
41
    /**
42
     * Reschedulable or not
43
     *
44
     * @var boolean
45
     *
46
     * @ORM\Column(type = "boolean", columnDefinition="COMMENT 'Defines whether related job can be rescheduled or not'")
47
     */
48
    private $reschedulable = true;
49
50
    /**
51
     * Related jms Job to be executed later
52
     *
53
     * @var Job
54
     *
55
     * @ORM\OneToOne(targetEntity="JMS\JobQueueBundle\Entity\Job")
56
     * @ORM\JoinColumn(name="jms_job_id", referencedColumnName="id", nullable=false)
57
     */
58
    private $job;
59
60
    /**
61
     * ScheduledJob constructor.
62
     *
63
     * @param Job     $transitionTriggerJob transition trigger job
64
     * @param boolean $reschedulable        reschedulable or not
65
     */
66
    public function __construct(Job $transitionTriggerJob, $reschedulable = true)
67
    {
68
        $this->reschedulable = $reschedulable;
69
        $this->job           = $transitionTriggerJob;
70
    }
71
72
73
    /**
74
     * Returns id
75
     *
76
     * @return int
77
     */
78
    public function getId()
79
    {
80
        return $this->id;
81
    }
82
83
    /**
84
     * Return true if scheduled job can be rescheduled
85
     *
86
     * @return boolean
87
     */
88
    public function isReschedulable()
89
    {
90
        return $this->reschedulable;
91
    }
92
93
    /**
94
     * Sets reschedulable flag
95
     *
96
     * @param boolean $reschedulable
97
     */
98
    public function setReschedulable($reschedulable = true)
99
    {
100
        $this->reschedulable = $reschedulable;
101
    }
102
103
    /**
104
     * Returns Job
105
     *
106
     * @return Job
107
     */
108
    public function getJob()
109
    {
110
        return $this->job;
111
    }
112
113
    /**
114
     * Sets Job
115
     *
116
     * @param Job $job Related jms job
117
     *
118
     * @return ScheduledJob
119
     */
120
    public function setJob($job)
121
    {
122
        $this->job = $job;
123
124
        return $this;
125
    }
126
}