Completed
Push — master ( 6c3722...239355 )
by Matthew
19:49 queued 17:50
created

RetryableJob   A

Complexity

Total Complexity 16

Size/Duplication

Total Lines 169
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 16
lcom 0
cbo 1
dl 0
loc 169
ccs 0
cts 71
cp 0
rs 10
c 1
b 1
f 0

16 Methods

Rating   Name   Duplication   Size   Complexity  
A getMaxStalled() 0 4 1
A setMaxStalled() 0 6 1
A getStalledCount() 0 4 1
A setStalledCount() 0 6 1
A getMaxError() 0 4 1
A setMaxError() 0 6 1
A getErrorCount() 0 4 1
A setErrorCount() 0 6 1
A getRetries() 0 4 1
A setRetries() 0 6 1
A getMaxRetries() 0 4 1
A setMaxRetries() 0 6 1
A getCreatedAt() 0 4 1
A getUpdatedAt() 0 4 1
A setCreatedAt() 0 6 1
A setUpdatedAt() 0 4 1
1
<?php
2
3
namespace Dtc\QueueBundle\Model;
4
5
abstract class RetryableJob extends \Dtc\QueueBundle\Model\Job
6
{
7
    const STATUS_MAX_ERROR = 'max_error';
8
    const STATUS_MAX_STALLED = 'max_stallled';
9
    const STATUS_MAX_RETRIES = 'max_retries';
10
11
    protected $maxStalled;
12
    protected $stalledCount = 0;
13
    protected $maxError;
14
    protected $errorCount = 0;
15
    protected $maxRetries;
16
    protected $retries = 0;
17
    protected $createdAt;
18
    protected $updatedAt;
19
20
    /**
21
     * @return int|null
22
     */
23
    public function getMaxStalled()
24
    {
25
        return $this->maxStalled;
26
    }
27
28
    /**
29
     * @param int|null $maxStalled
30
     *
31
     * @return RetryableJob
32
     */
33
    public function setMaxStalled($maxStalled)
34
    {
35
        $this->maxStalled = $maxStalled;
36
37
        return $this;
38
    }
39
40
    /**
41
     * @return int
42
     */
43
    public function getStalledCount()
44
    {
45
        return $this->stalledCount;
46
    }
47
48
    /**
49
     * @param int $stalledCount
50
     *
51
     * @return RetryableJob
52
     */
53
    public function setStalledCount($stalledCount)
54
    {
55
        $this->stalledCount = $stalledCount;
56
57
        return $this;
58
    }
59
60
    /**
61
     * @return int|null
62
     */
63
    public function getMaxError()
64
    {
65
        return $this->maxError;
66
    }
67
68
    /**
69
     * @param int|null $maxError
70
     *
71
     * @return RetryableJob
72
     */
73
    public function setMaxError($maxError)
74
    {
75
        $this->maxError = $maxError;
76
77
        return $this;
78
    }
79
80
    /**
81
     * @return int
82
     */
83
    public function getErrorCount()
84
    {
85
        return $this->errorCount;
86
    }
87
88
    /**
89
     * @param int $erroredCount
0 ignored issues
show
Documentation introduced by
There is no parameter named $erroredCount. Did you maybe mean $errorCount?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.

Consider the following example. The parameter $ireland is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $ireland
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was changed, but the annotation was not.

Loading history...
90
     *
91
     * @return RetryableJob
92
     */
93
    public function setErrorCount($errorCount)
94
    {
95
        $this->errorCount = $errorCount;
96
97
        return $this;
98
    }
99
100
    /**
101
     * @return int
102
     */
103
    public function getRetries()
104
    {
105
        return $this->retries;
106
    }
107
108
    /**
109
     * @param int $retries
110
     *
111
     * @return RetryableJob
112
     */
113
    public function setRetries($retries)
114
    {
115
        $this->retries = $retries;
116
117
        return $this;
118
    }
119
120
    /**
121
     * @return int|null
122
     */
123
    public function getMaxRetries()
124
    {
125
        return $this->maxRetries;
126
    }
127
128
    /**
129
     * @param int|null $maxRetries
130
     *
131
     * @return RetryableJob
132
     */
133
    public function setMaxRetries($maxRetries)
134
    {
135
        $this->maxRetries = $maxRetries;
136
137
        return $this;
138
    }
139
140
    /**
141
     * @return \DateTime
142
     */
143
    public function getCreatedAt()
144
    {
145
        return $this->createdAt;
146
    }
147
148
    /**
149
     * @return \DateTime
150
     */
151
    public function getUpdatedAt()
152
    {
153
        return $this->updatedAt;
154
    }
155
156
    /**
157
     * @param \DateTime $createdAt
158
     */
159
    public function setCreatedAt(\DateTime $createdAt)
160
    {
161
        $this->createdAt = $createdAt;
162
163
        return $this;
164
    }
165
166
    /**
167
     * @param \DateTime $updatedAt
168
     */
169
    public function setUpdatedAt(\DateTime $updatedAt)
170
    {
171
        $this->updatedAt = $updatedAt;
172
    }
173
}
174