Passed
Pull Request — master (#29)
by Christoffer
02:26
created

CacheProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
1
<?php
2
3
namespace Digia\GraphQL\Provider;
4
5
use Digia\GraphQL\Cache\RuntimeCache;
6
use League\Container\ServiceProvider\AbstractServiceProvider;
7
use Psr\SimpleCache\CacheInterface;
8
9
class CacheProvider extends AbstractServiceProvider
10
{
11
12
    /**
13
     * @var array
14
     */
15
    protected $provides = [
16
        CacheInterface::class,
17
    ];
18
19
    /**
20
     * @inheritdoc
21
     */
22
    public function register()
23
    {
24
        $this->container->add(CacheInterface::class, RuntimeCache::class);
25
    }
26
}
27