Passed
Push — master ( d58b05...f1b29b )
by Mike
02:14
created

EventQueue::declareQueue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 8
ccs 5
cts 5
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace Xervice\EventRabbitMq\Business\Plugin\Queue;
5
6
7
use Xervice\Core\Plugin\AbstractBusinessPlugin;
8
use Xervice\RabbitMQ\Business\Dependency\Queue\QueueInterface;
9
use Xervice\RabbitMQ\Business\Model\Core\QueueProviderInterface;
10
11
/**
12
 * @method \Xervice\EventRabbitMq\Business\EventRabbitMqBusinessFactory getFactory()
13
 */
14
class EventQueue extends AbstractBusinessPlugin implements QueueInterface
15
{
16
    /**
17
     * @param \Xervice\RabbitMQ\Business\Model\Core\QueueProviderInterface $queueProvider
18
     */
19 1
    public function declareQueue(QueueProviderInterface $queueProvider)
20
    {
21 1
        $queueProvider->declare(
22 1
            $this->getFactory()->createEventQueue()
23
        );
24
25 1
        $queueProvider->bind(
26 1
            $this->getFactory()->createBindQueue()
27
        );
28 1
    }
29
30
}