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

ConsumeOptions::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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