FanOutProducer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 11
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A declareExchange() 0 8 1
1
<?php
2
3
/**
4
 * This file is part of amqp
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
 
10
declare(strict_types=1);
11
12
namespace Slick\Amqp\Producer;
13
14
use Slick\Amqp\Producer;
15
16
/**
17
 * FanOutProducer
18
 *
19
 * @package Slick\Amqp\Producer
20
 */
21
abstract class FanOutProducer extends BasicProducer implements Producer
22
{
23
24
    protected function declareExchange(): void
25
    {
26
        $this->mergeOptions();
27
        $args = array_values($this->options());
28
        array_unshift($args, self::TYPE_FANOUT);
29
        array_unshift($args, $this->exchange);
30
        call_user_func_array([$this->channel(), 'exchange_declare'], $args);
31
        $this->declared = true;
32
    }
33
}
34