TestInterfaceType   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 0
cbo 4
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A resolveType() 0 4 2
A build() 0 4 1
1
<?php
2
/*
3
* This file is a part of GraphQL project.
4
*
5
* @author Alexandr Viniychuk <[email protected]>
6
* created: 5/12/16 4:24 PM
7
*/
8
9
namespace Youshido\Tests\DataProvider;
10
11
12
use Youshido\GraphQL\Type\InterfaceType\AbstractInterfaceType;
13
use Youshido\GraphQL\Type\Scalar\StringType;
14
15
class TestInterfaceType extends AbstractInterfaceType
16
{
17
18
    public function resolveType($object)
19
    {
20
        return is_object($object) ? $object : new TestObjectType();
21
    }
22
23
    public function build($config)
24
    {
25
        $config->addField('name', new StringType());
26
    }
27
28
29
}
30