InputObjectTypeConfig::getRules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
/*
3
* This file is a part of graphql-youshido project.
4
*
5
* @author Alexandr Viniychuk <[email protected]>
6
* created: 12/1/15 11:13 PM
7
*/
8
9
namespace Youshido\GraphQL\Config\Object;
10
11
12
use Youshido\GraphQL\Type\TypeService;
13
14
class InputObjectTypeConfig extends ObjectTypeConfig
15
{
16
    public function getRules()
17
    {
18
        return [
19
            'name'        => ['type' => TypeService::TYPE_STRING, 'required' => true],
20
            'fields'      => ['type' => TypeService::TYPE_ARRAY_OF_INPUT_FIELDS, 'final' => true],
21
            'description' => ['type' => TypeService::TYPE_STRING],
22
        ];
23
    }
24
}
25