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

CoroutineContext   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 14
dl 0
loc 43
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 14 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQL\Experimental\Executor;
6
7
use GraphQL\Type\Definition\ObjectType;
8
use GraphQL\Type\Definition\ResolveInfo;
9
10
/**
11
 * @internal
12
 */
13
class CoroutineContext
14
{
15
    /** @var CoroutineContextShared */
16
    public $shared;
17
18
    /** @var ObjectType */
19
    public $type;
20
21
    /** @var mixed */
22
    public $value;
23
24
    /** @var object */
25
    public $result;
26
27
    /** @var string[] */
28
    public $path;
29
30
    /** @var ResolveInfo|null */
31
    public $resolveInfo;
32
33
    /** @var string[]|null */
34
    public $nullFence;
35
36
    /**
37
     * @param mixed         $value
38
     * @param object        $result
39
     * @param string[]      $path
40
     * @param string[]|null $nullFence
41
     */
42
    public function __construct(
43
        CoroutineContextShared $shared,
44
        ObjectType $type,
45
        $value,
46
        $result,
47
        array $path,
48
        ?array $nullFence = null
49
    ) {
50
        $this->shared    = $shared;
51
        $this->type      = $type;
52
        $this->value     = $value;
53
        $this->result    = $result;
54
        $this->path      = $path;
55
        $this->nullFence = $nullFence;
56
    }
57
}
58