Completed
Push — master ( 17976d...325209 )
by Portey
07:00
created

FirstType::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 0
loc 6
rs 9.4286
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
/**
3
 * Date: 16.12.15
4
 *
5
 * @author Portey Vasil <[email protected]>
6
 */
7
8
namespace Youshido\Tests\Type\Union\Schema;
9
10
11
use Youshido\GraphQL\Type\Config\TypeConfigInterface;
12
use Youshido\GraphQL\Type\Object\AbstractObjectType;
13
14
class FirstType extends AbstractObjectType
15
{
16
17
18
    public function resolve($value = null, $args = [])
19
    {
20
21
    }
22
23
    protected function build(TypeConfigInterface $config)
24
    {
25
        $config
26
            ->addField('name', 'string')
27
            ->addField('description', 'string');
28
    }
29
30
    /**
31
     * @return String type name
32
     */
33
    public function getName()
34
    {
35
        return 'FirstType';
36
    }
37
}