Completed
Push — 1.1 ( 12efad )
by David
02:09
created

DefaultExchange   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 12
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A init() 0 4 1
1
<?php
2
3
4
namespace Mouf\AmqpClient\Objects;
5
6
7
use Mouf\AmqpClient\Client;
8
use PhpAmqpLib\Channel\AMQPChannel;
9
10
/**
11
 * The RabbitMQ default exchange will automatically send messages to the queue whose key is the key of the message.
12
 * This is RabbitMQ specific.
13
 */
14
class DefaultExchange extends Exchange
15
{
16
    public function __construct(Client $client)
17
    {
18
        parent::__construct($client, '', 'direct');
19
    }
20
21
    public function init(AMQPChannel $amqpChannel)
22
    {
23
        // Let's do nothing. The default exchange already exists and cannot be overwritten.
24
    }
25
}