LogRabbitMqConfig::getExchangeName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Xervice\LogRabbitMq;
5
6
use Xervice\Core\Business\Model\Config\AbstractConfig;
7
8
class LogRabbitMqConfig extends AbstractConfig
9
{
10
    public const QUEUE_NAME = 'log.queue.name';
11
12
    public const EXCHANGE_NAME = 'log.exchange.name';
13
14
    /**
15
     * @return string
16
     */
17 1
    public function getQueueName(): string
18
    {
19 1
        return $this->get(self::QUEUE_NAME, 'log');
20
    }
21
22
    /**
23
     * @return string
24
     */
25 1
    public function getExchangeName(): string
26
    {
27 1
        return $this->get(
28 1
            self::EXCHANGE_NAME,
29 1
            $this->getQueueName()
30
        );
31
    }
32
}