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

Strand::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQL\Experimental\Executor;
6
7
use Generator;
8
9
/**
10
 * @internal
11
 */
12
class Strand
13
{
14
    /** @var Generator */
15
    public $current;
16
17
    /** @var Generator[] */
18
    public $stack;
19
20
    /** @var int */
21
    public $depth;
22
23
    /** @var bool|null */
24
    public $success;
25
26
    /** @var mixed */
27
    public $value;
28
29
    public function __construct(Generator $coroutine)
30
    {
31
        $this->current = $coroutine;
32
        $this->stack   = [];
33
        $this->depth   = 0;
34
    }
35
}
36