Test Failed
Pull Request — master (#39)
by Aleksandr
05:36
created

OnIdleEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 33
ccs 7
cts 7
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A isForceStop() 0 3 1
A setForceStop() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
namespace OldSound\RabbitMqBundle\Event;
4
5
use OldSound\RabbitMqBundle\RabbitMq\Consumer;
6
7
/**
8
 * Class OnIdleEvent
9
 *
10
 * @package OldSound\RabbitMqBundle\Command
11
 */
12
class OnIdleEvent extends AbstractAMQPEvent
13
{
14
    const NAME = 'old_sound_rabbit_mq.on_idle';
15
    /**
16
     * @var bool
17
     */
18
    private $forceStop;
19
20
    /**
21
     * OnConsumeEvent constructor.
22
     *
23
     * @param Consumer $consumer
24
     */
25
    public function __construct(Consumer $consumer)
26 7
    {
27
        $this->consumer = $consumer;
0 ignored issues
show
Bug Best Practice introduced by
The property consumer does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
28 7
        $this->forceStop = true;
29
    }
30 7
31 7
    /**
32
     * @return boolean
33
     */
34
    public function isForceStop()
35
    {
36 6
        return $this->forceStop;
37
    }
38 6
39
    /**
40
     * @param boolean $forceStop
41
     */
42
    public function setForceStop($forceStop)
43
    {
44 3
        $this->forceStop = $forceStop;
45
    }
46
}
47