Passed
Pull Request — master (#159)
by Christoffer
02:37
created

SchemaExtensionProvider::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Digia\GraphQL\SchemaExtension;
4
5
use Digia\GraphQL\SchemaBuilder\DefinitionBuilderCreatorInterface;
6
use League\Container\ServiceProvider\AbstractServiceProvider;
7
use Psr\SimpleCache\CacheInterface;
8
9
class SchemaExtensionProvider extends AbstractServiceProvider
10
{
11
    /**
12
     * @var array
13
     */
14
    protected $provides = [
15
        SchemaExtenderInterface::class,
16
    ];
17
18
    /**
19
     * @inheritdoc
20
     */
21
    public function register()
22
    {
23
        $this->container->add(SchemaExtenderInterface::class, SchemaExtender::class)
24
            ->withArgument(DefinitionBuilderCreatorInterface::class)
25
            ->withArgument(CacheInterface::class);
26
    }
27
}
28