Completed
Push — master ( f8702a...461e07 )
by Alexandr
04:08
created

NonNullTypeConfig   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getRules() 0 6 1
A getItemConfig() 0 4 1
A getItem() 0 4 1
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 1:22 AM
7
*/
8
9
namespace Youshido\GraphQL\Type\Config\Object;
10
11
12
use Youshido\GraphQL\Type\Field\Field;
13
use Youshido\GraphQL\Type\TypeMap;
14
15
class NonNullTypeConfig extends ObjectTypeConfig
16
{
17
    public function getRules()
18
    {
19
        return [
20
            'item' => ['type' => TypeMap::TYPE_OBJECT_TYPE, 'required' => true],
21
        ];
22
    }
23
24
    /**
25
     * @return ObjectTypeConfig
26
     */
27
    public function getItemConfig()
28
    {
29
        return $this->getItem()->getConfig();
30
    }
31
32
    public function getItem()
33
    {
34
        return $this->get('item');
35
    }
36
}
37