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

NonNullTypeConfig::getItemConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
rs 10
ccs 0
cts 4
cp 0
cc 1
eloc 2
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 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