Completed
Push — master ( 2208b3...57f4c6 )
by Adam
7s
created

RedisConfiguration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 1
cbo 3
dl 0
loc 17
ccs 6
cts 6
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A apply() 0 9 1
1
<?php
2
3
namespace Equip\Configuration;
4
5
use Auryn\Injector;
6
use Redis;
7
8
class RedisConfiguration implements ConfigurationInterface
9
{
10
    use EnvTrait;
11
12
    /**
13
     * @inheritDoc
14
     */
15
    public function apply(Injector $injector)
16
    {
17 1
        $injector->prepare(Redis::class, function($redis) {
18 1
            $redis->connect(
19 1
                $this->env->getValue('REDIS_HOST', '127.0.0.1'),
20 1
                $this->env->getValue('REDIS_PORT', 6379)
21
            );
22 1
        });
23 1
    }
24
}
25