Completed
Pull Request — master (#204)
by Ryan
11:34
created

BannerType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 5
dl 0
loc 15
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * BannerType.php
4
 */
5
6
namespace Examples\Blog\Schema;
7
8
use Youshido\GraphQL\Type\NonNullType;
9
use Youshido\GraphQL\Type\Object\AbstractObjectType;
10
use Youshido\GraphQL\Type\Scalar\StringType;
11
12
class BannerType extends AbstractObjectType
13
{
14
    public function build($config)
15
    {
16
        $config
17
            ->addField('title', new NonNullType(new StringType()))
18
            ->addField('summary', new StringType())
19
            ->addField('imageLink', new StringType());
20
    }
21
22
    public function getInterfaces()
23
    {
24
        return [new ContentBlockInterface()];
25
    }
26
}
27