Completed
Push — master ( 6c95d8...49bfd8 )
by Christoffer
03:47 queued 01:30
created

ResponsePath::getKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Digia\GraphQL\Execution;
4
5
class ResponsePath
6
{
7
    /**
8
     * @var ResponsePath|null
9
     */
10
    protected $prev;
11
12
    /**
13
     * @var string|int
14
     */
15
    protected $key;
16
17
    /**
18
     * ResponsePath constructor.
19
     *
20
     * @param ResponsePath|null $prev
21
     * @param int|string        $key
22
     */
23
    public function __construct(?ResponsePath $prev, $key)
24
    {
25
        $this->prev = $prev;
26
        $this->key  = $key;
27
    }
28
29
    /**
30
     * @return ResponsePath|null
31
     */
32
    public function getPrev(): ?ResponsePath
33
    {
34
        return $this->prev;
35
    }
36
37
    /**
38
     * @return int|string
39
     */
40
    public function getKey()
41
    {
42
        return $this->key;
43
    }
44
}
45