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

InterfaceTypeConfig   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 19
ccs 0
cts 13
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRules() 0 9 1
A build() 0 4 1
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
}