Completed
Push — master ( 3a14e9...fe7442 )
by Portey
04:17
created

InputValueType   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 80%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 25
ccs 8
cts 10
cp 0.8
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 8 1
A resolve() 0 4 1
A getName() 0 4 1
1
<?php
2
/**
3
 * Date: 03.12.15
4
 *
5
 * @author Portey Vasil <[email protected]>
6
 */
7
8
namespace Youshido\GraphQL\Introspection;
9
10
11
use Youshido\GraphQL\Type\Config\TypeConfigInterface;
12
use Youshido\GraphQL\Type\Object\AbstractObjectType;
13
use Youshido\GraphQL\Type\TypeMap;
14
15
class InputValueType extends AbstractObjectType
16
{
17
18 3
    protected function build(TypeConfigInterface $config)
19
    {
20
        $config
21 3
            ->addField('name', TypeMap::TYPE_STRING)
22 3
            ->addField('description', TypeMap::TYPE_STRING)
23 3
            ->addField('type', new QueryType())
24 3
            ->addField('defaultValue', TypeMap::TYPE_STRING); //todo: check here
25 3
    }
26
27
    public function resolve($value = null, $args = [])
28
    {
29
        return null;
30
    }
31
32
    /**
33
     * @return String type name
34
     */
35 6
    public function getName()
36
    {
37 6
        return '__InputValue';
38
    }
39
}