Passed
Pull Request — master (#314)
by Jakub
08:46 queued 02:41
created

CoroutineContextShared::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 4
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQL\Experimental\Executor;
6
7
use GraphQL\Language\AST\FieldNode;
8
use GraphQL\Language\AST\SelectionSetNode;
9
use GraphQL\Language\AST\ValueNode;
10
use GraphQL\Type\Definition\ObjectType;
11
use GraphQL\Type\Definition\ResolveInfo;
12
13
/**
14
 * @internal
15
 */
16
class CoroutineContextShared
17
{
18
    /** @var FieldNode[] */
19
    public $fieldNodes;
20
21
    /** @var string */
22
    public $fieldName;
23
24
    /** @var string */
25
    public $resultName;
26
27
    /** @var ValueNode[]|null */
28
    public $argumentValueMap;
29
30
    /** @var SelectionSetNode|null */
31
    public $mergedSelectionSet;
32
33
    /** @var ObjectType|null */
34
    public $typeGuard1;
35
36
    /** @var callable|null */
37
    public $resolveIfType1;
38
39
    /** @var mixed */
40
    public $argumentsIfType1;
41
42
    /** @var ResolveInfo|null */
43
    public $resolveInfoIfType1;
44
45
    /** @var ObjectType|null */
46
    public $typeGuard2;
47
48
    /** @var CoroutineContext[]|null */
49
    public $childContextsIfType2;
50
51
    /**
52
     * @param FieldNode[]  $fieldNodes
53
     * @param mixed[]|null $argumentValueMap
54
     */
55 13
    public function __construct(array $fieldNodes, string $fieldName, string $resultName, ?array $argumentValueMap)
56
    {
57 13
        $this->fieldNodes       = $fieldNodes;
58 13
        $this->fieldName        = $fieldName;
59 13
        $this->resultName       = $resultName;
60 13
        $this->argumentValueMap = $argumentValueMap;
61 13
    }
62
}
63