RedisConfig   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 28
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRedisConfig() 0 3 1
A getRedisOptions() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
5
namespace Xervice\Redis;
6
7
8
use Xervice\Core\Business\Model\Config\AbstractConfig;
9
10
class RedisConfig extends AbstractConfig
11
{
12
    public const REDIS = 'redis';
13
14
    public const REDIS_OPTIONS = 'redis.options';
15
16
    public const REDIS_HOST = 'redis.host';
17
18
    public const REDIS_PORT = 'redis.port';
19
20
    public const REDIS_PASSWORD = 'redis.password';
21
22
    public const REDIS_DATABASE = 'redis.database';
23
24
    /**
25
     * @return array
26
     */
27 1
    public function getRedisConfig(): array
28
    {
29 1
        return $this->get(self::REDIS);
30
    }
31
32
    /**
33
     * @return array
34
     */
35 1
    public function getRedisOptions(): array
36
    {
37 1
        return $this->get(self::REDIS_OPTIONS);
38
    }
39
}
40