Completed
Pull Request — master (#30)
by Matthew
07:24
created

StallableJob   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 48
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getMaxStalls() 0 4 1
A setMaxStalls() 0 6 1
A getStalls() 0 4 1
A setStalls() 0 6 1
1
<?php
2
3
namespace Dtc\QueueBundle\Model;
4
5
abstract class StallableJob extends \Dtc\QueueBundle\Model\RetryableJob
6
{
7
    const STATUS_MAX_STALLS = 'max_stalls';
8
    const STATUS_STALLED = 'stalled';
9
10
    protected $maxStalls = 0;
11
    protected $stalls = 0;
12
13
    /**
14
     * @return int|null
15
     */
16 47
    public function getMaxStalls()
17
    {
18 47
        return $this->maxStalls;
19
    }
20
21
    /**
22
     * @param int|null $maxStalls
23
     *
24
     * @return StallableJob
25
     */
26 47
    public function setMaxStalls($maxStalls)
27
    {
28 47
        $this->maxStalls = $maxStalls;
29
30 47
        return $this;
31
    }
32
33
    /**
34
     * @return int
35
     */
36 37
    public function getStalls()
37
    {
38 37
        return $this->stalls;
39
    }
40
41
    /**
42
     * @param int $stalledCount
0 ignored issues
show
Bug introduced by
There is no parameter named $stalledCount. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

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

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

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

Loading history...
43
     *
44
     * @return StallableJob
45
     */
46 37
    public function setStalls($stalls)
47
    {
48 37
        $this->stalls = $stalls;
49
50 37
        return $this;
51
    }
52
}
53