Passed
Push — master ( d58b05...f1b29b )
by Mike
02:14
created

EventRabbitMqConfig::getExchangeName()   A

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\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
}