Passed
Push — master ( 102634...08910a )
by Christoffer
02:20
created

SchemaProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

1 Method

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