Completed
Push — master ( 020154...e8c337 )
by Alexandr
02:45
created

InterfaceTypeConfig::getRules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
ccs 0
cts 9
cp 0
rs 9.6667
cc 1
eloc 6
nc 1
nop 0
crap 2
1
<?php
2
/*
3
* This file is a part of GraphQL project.
4
*
5
* @author Alexandr Viniychuk <[email protected]>
6
* created: 12/5/15 12:18 AM
7
*/
8
9
namespace Youshido\GraphQL\Type\Config\Object;
10
11
12
use Youshido\GraphQL\Type\Config\Config;
13
use Youshido\GraphQL\Type\Config\Traits\FieldsAwareTrait;
14
use Youshido\GraphQL\Type\TypeMap;
15
16
class InterfaceTypeConfig extends Config
17
{
18
    use FieldsAwareTrait;
19
20
    public function getRules()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
21
    {
22
        return [
23
            'name'        => ['type' => TypeMap::TYPE_STRING, 'required' => true],
24
            'fields'      => ['type' => TypeMap::TYPE_ARRAY_OF_FIELDS, 'required' => true],
25
            'description' => ['type' => TypeMap::TYPE_STRING],
26
            'resolveType' => ['type' => TypeMap::TYPE_FUNCTION]
27
        ];
28
    }
29
30
    protected function build()
31
    {
32
        $this->buildFields();
33
    }
34
}