Passed
Push — master ( 319fcb...7a107a )
by Rafael
04:41
created

GraphQLFieldInfo::getInfo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 1
nc 1
nop 0
crap 2
1
<?php
2
/*******************************************************************************
3
 *  This file is part of the GraphQL Bundle package.
4
 *
5
 *  (c) YnloUltratech <[email protected]>
6
 *
7
 *  For the full copyright and license information, please view the LICENSE
8
 *  file that was distributed with this source code.
9
 ******************************************************************************/
10
11
namespace Ynlo\GraphQLBundle\Events;
12
13
use GraphQL\Type\Definition\ResolveInfo;
14
use Ynlo\GraphQLBundle\Definition\FieldDefinition;
15
use Ynlo\GraphQLBundle\Definition\FieldsAwareDefinitionInterface;
16
17
class GraphQLFieldInfo
18
{
19
    /**
20
     * @var ResolveInfo
21
     */
22
    protected $info;
23
24
    /**
25
     * @var FieldsAwareDefinitionInterface
26
     */
27
    protected $object;
28
29
    /**
30
     * @var FieldDefinition
31
     */
32
    protected $field;
33
34
    /**
35
     * GraphQLFieldInfo constructor.
36
     *
37
     * @param FieldsAwareDefinitionInterface $object
38
     * @param FieldDefinition                $field
39
     * @param ResolveInfo                    $info
40
     */
41 22
    public function __construct(FieldsAwareDefinitionInterface $object, FieldDefinition $field, ResolveInfo $info)
42
    {
43 22
        $this->info = $info;
44 22
        $this->object = $object;
45 22
        $this->field = $field;
46 22
    }
47
48
    /**
49
     * @return ResolveInfo
50
     */
51
    public function getInfo(): ResolveInfo
52
    {
53
        return $this->info;
54
    }
55
56
    /**
57
     * @return FieldsAwareDefinitionInterface
58
     */
59 22
    public function getObject(): FieldsAwareDefinitionInterface
60
    {
61 22
        return $this->object;
62
    }
63
64
    /**
65
     * @return FieldDefinition
66
     */
67 22
    public function getField(): FieldDefinition
68
    {
69 22
        return $this->field;
70
    }
71
}
72