Total Complexity | 7 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class QueueDecorator implements QueueInterface |
||
13 | { |
||
14 | public function __construct( |
||
15 | private QueueInterface $queue, |
||
16 | private QueueCollector $collector, |
||
17 | ) { |
||
18 | } |
||
19 | |||
20 | public function status(string $id): JobStatus |
||
21 | { |
||
22 | $result = $this->queue->status($id); |
||
23 | $this->collector->collectStatus($id); |
||
24 | |||
25 | return $result; |
||
26 | } |
||
27 | |||
28 | public function push(MessageInterface $message): void |
||
29 | { |
||
30 | $this->queue->push($message); |
||
31 | $this->collector->collectPush($this->queue->getChannelName(), $message); |
||
32 | } |
||
33 | |||
34 | public function run(int $max = 0): void |
||
37 | } |
||
38 | |||
39 | public function listen(): void |
||
40 | { |
||
41 | $this->queue->listen(); |
||
42 | } |
||
43 | |||
44 | public function withAdapter(AdapterInterface $adapter): QueueInterface |
||
45 | { |
||
46 | return $this->queue->withAdapter($adapter); |
||
47 | } |
||
48 | |||
49 | public function getChannelName(): string |
||
52 | } |
||
53 | } |
||
54 |