Completed
Push — master ( f8702a...461e07 )
by Alexandr
04:08
created

PostInputType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 4
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 6 1
1
<?php
2
/**
3
 * PostInputType.php
4
 */
5
6
namespace Examples\Blog\Schema;
7
8
9
use Youshido\GraphQL\Type\Config\InputTypeConfigInterface;
10
use Youshido\GraphQL\Type\NonNullType;
11
use Youshido\GraphQL\Type\Object\AbstractInputObjectType;
12
use Youshido\GraphQL\Type\Scalar\StringType;
13
14
class PostInputType extends AbstractInputObjectType
15
{
16
17
    public function build(InputTypeConfigInterface $config)
18
    {
19
        $config
20
            ->addField('title', new NonNullType(new StringType()))
21
            ->addField('summary', new StringType());
22
    }
23
24
25
}
26