Passed
Push — master ( 4d0252...b49d6f )
by Mike
01:47
created

LogRabbitMqConfig   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

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