Test Failed
Push — master ( 82b045...1f684d )
by Mike
04:10
created

QueueBuilder   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 30
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A buildQueues() 0 4 2
1
<?php
2
3
4
namespace Xervice\RabbitMQ\Business\Model\Queue;
5
6
7
use Xervice\RabbitMQ\Business\Model\Core\QueueProviderInterface;
8
9
class QueueBuilder implements QueueBuilderInterface
10
{
11
    /**
12
     * @var \Xervice\RabbitMQ\Business\Model\Core\QueueProviderInterface
13
     */
14
    private $queueProvider;
15
16
    /**
17
     * @var \Xervice\RabbitMQ\Business\Model\Queue\QueueCollection
18
     */
19
    private $queueCollection;
20
21
    /**
22
     * QueueBuilder constructor.
23
     *
24
     * @param \Xervice\RabbitMQ\Business\Model\Core\QueueProviderInterface $queueProvider
25
     * @param \Xervice\RabbitMQ\Business\Model\Queue\QueueCollection $queueCollection
26
     */
27
    public function __construct(
28
        QueueProviderInterface $queueProvider,
29
        QueueCollection $queueCollection
30
    ) {
31
        $this->queueProvider = $queueProvider;
32
        $this->queueCollection = $queueCollection;
33
    }
34
35
    public function buildQueues(): void
36
    {
37
        foreach ($this->queueCollection as $queue) {
38
            $queue->declareQueue($this->queueProvider);
39
        }
40
    }
41
42
}