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

ResponsePath   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 38
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getPrev() 0 3 1
A getKey() 0 3 1
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