Passed
Push — master ( 26669d...eddd64 )
by
unknown
04:41
created

Consumer::queue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Umbrellio\TableSync\Rabbit\Config;
6
7
use Umbrellio\TableSync\ReceivedMessageHandler;
8
9
class Consumer
10
{
11
    private $handler;
12
    private $queue;
13
    private $consumerTag;
14
    private $microsecondsToSleep = 1000000;
15
16 1
    public function __construct(ReceivedMessageHandler $handler, string $queue, string $consumerTag = '')
17
    {
18 1
        $this->handler = $handler;
19 1
        $this->queue = $queue;
20 1
        $this->consumerTag = $consumerTag;
21
    }
22
23 1
    public function handler(): ReceivedMessageHandler
24
    {
25 1
        return $this->handler;
26
    }
27
28 1
    public function queue(): string
29
    {
30 1
        return $this->queue;
31
    }
32
33 1
    public function consumerTag(): string
34
    {
35 1
        return $this->consumerTag;
36
    }
37
38
    public function microsecondsToSleep(): int
39
    {
40
        return $this->microsecondsToSleep;
41
    }
42
43
    public function setMicrosecondsToSleep(int $microsecondsToSleep): self
44
    {
45
        $this->microsecondsToSleep = $microsecondsToSleep;
46
47
        return $this;
48
    }
49
}
50