Total Complexity | 6 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 66.67% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
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 |
||
48 | } |
||
49 | } |
||
50 |