Completed
Push — master ( 325209...de8c12 )
by Portey
06:47
created

TypedFragmentReference::getFields()   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 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * Date: 23.11.15
4
 *
5
 * @author Portey Vasil <[email protected]>
6
 */
7
8
namespace Youshido\GraphQL\Parser\Ast;
9
10
11
class TypedFragmentReference
12
{
13
14
    /** @var Field[]|Query[] */
15
    protected $fields;
16
17
    /** @var string */
18
    protected $typeName;
19
20
    /**
21
     * @param string          $typeName
22
     * @param Field[]|Query[] $fields
23
     */
24 1
    public function __construct($typeName, $fields)
25
    {
26 1
        $this->typeName = $typeName;
27 1
        $this->fields   = $fields;
0 ignored issues
show
Documentation Bug introduced by
It seems like $fields of type array<integer,object<You...phQL\Parser\Ast\Query>> is incompatible with the declared type array<integer,object<You...phQL\Parser\Ast\Field>> of property $fields.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
28 1
    }
29
30
    /**
31
     * @return Field[]|Query[]
32
     */
33
    public function getFields()
34
    {
35
        return $this->fields;
36
    }
37
38
    /**
39
     * @param Field[]|Query[] $fields
40
     */
41
    public function setFields($fields)
42
    {
43
        $this->fields = $fields;
0 ignored issues
show
Documentation Bug introduced by
It seems like $fields of type array<integer,object<You...phQL\Parser\Ast\Query>> is incompatible with the declared type array<integer,object<You...phQL\Parser\Ast\Field>> of property $fields.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getTypeName()
50
    {
51
        return $this->typeName;
52
    }
53
54
    /**
55
     * @param string $typeName
56
     */
57
    public function setTypeName($typeName)
58
    {
59
        $this->typeName = $typeName;
60
    }
61
62
}