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

StallableJob::setStalls()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 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