CacheServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 16
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 8 1
1
<?php
2
/**
3
 * @author    jan huang <[email protected]>
4
 * @copyright 2016
5
 *
6
 * @see      https://www.github.com/janhuang
7
 * @see      https://fastdlabs.com
8
 */
9
10
namespace FastD\ServiceProvider;
11
12
use FastD\Container\Container;
13
use FastD\Container\ServiceProviderInterface;
14
use FastD\Pool\CachePool;
15
16
/**
17
 * Class CacheServiceProvider.
18
 */
19
class CacheServiceProvider implements ServiceProviderInterface
20
{
21
    /**
22
     * @param Container $container
23
     *
24
     * @return mixed
25
     */
26 32
    public function register(Container $container)
27
    {
28 32
        $config = $container->get('config')->get('cache');
29
30 32
        $container->add('cache', new CachePool($config));
31
32 32
        unset($config);
33 32
    }
34
}
35