Completed
Push — master ( 613d98...fa04c9 )
by Rémi
20:40
created

ConsumeOptions   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 49
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A isAutoAck() 0 4 1
A getTimeout() 0 4 1
A disableAutoAck() 0 4 1
A setTimeout() 0 4 1
1
<?php
2
3
namespace Burrow;
4
5
class ConsumeOptions
6
{
7
    /** @var bool */
8
    private $autoAck;
9
10
    /** @var int */
11
    private $timeout;
12
13
    /**
14
     * ConsumeOptions constructor.
15
     */
16
    public function __construct()
17
    {
18
        $this->autoAck = true;
19
        $this->timeout = 0;
20
    }
21
22
    /**
23
     * @return bool
24
     */
25
    public function isAutoAck()
26
    {
27
        return $this->autoAck;
28
    }
29
30
    /**
31
     * @return int
32
     */
33
    public function getTimeout()
34
    {
35
        return $this->timeout;
36
    }
37
38
    /**
39
     * Disable the auto ack.
40
     */
41
    public function disableAutoAck()
42
    {
43
        $this->autoAck = false;
44
    }
45
46
    /**
47
     * @param int $timeout
48
     */
49
    public function setTimeout($timeout)
50
    {
51
        $this->timeout = $timeout;
52
    }
53
}
54