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

SchemaExtensionProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

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

1 Method

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