EventRabbitMqConfig   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
c 2
b 0
f 0
dl 0
loc 21
ccs 6
cts 6
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getQueueName() 0 3 1
A getExchangeName() 0 5 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Xervice\EventRabbitMq;
5
6
use Xervice\Core\Business\Model\Config\AbstractConfig;
7
8
class EventRabbitMqConfig extends AbstractConfig
9
{
10
    public const QUEUE_NAME = 'event.queue.name';
11
    public const EXCHANGE_NAME = 'event.exchange.name';
12
13
    /**
14
     * @return string
15
     */
16 1
    public function getQueueName(): string
17
    {
18 1
        return $this->get(self::QUEUE_NAME, 'event');
19
    }
20
21
    /**
22
     * @return string
23
     */
24 1
    public function getExchangeName(): string
25
    {
26 1
        return $this->get(
27 1
            self::EXCHANGE_NAME,
28 1
            $this->getQueueName()
29
        );
30
    }
31
}