TimestampsInterfaceType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 5 1
1
<?php
2
3
namespace Digia\Lumen\GraphQL\Types;
4
5
use Digia\Lumen\GraphQL\Traits\ResolvesTypeTrait;
6
use Youshido\GraphQL\Type\InterfaceType\AbstractInterfaceType;
7
use Youshido\GraphQL\Type\NonNullType;
8
9
class TimestampsInterfaceType extends AbstractInterfaceType
10
{
11
12
    use ResolvesTypeTrait;
13
14
    /**
15
     * @inheritdoc
16
     */
17
    public function build($config)
18
    {
19
        $config->addFields([
20
            'createdAt' => new NonNullType(new UTCTimeType()),
21
            'updatedAt' => new NonNullType(new UTCTimeType()),
22
        ]);
23
    }
24
}