Passed
Pull Request — master (#169)
by Quang
02:41
created

Path::getKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace Digia\GraphQL\Execution;
4
5
class Path
6
{
7
    private $previous;
8
9
    private $key;
10
11
    /**
12
     * Path constructor.
13
     * @param $previous
14
     * @param $key
15
     */
16
    public function __construct($previous, $key)
17
    {
18
        $this->previous = $previous;
19
        $this->key      = $key;
20
    }
21
22
    /**
23
     * @return mixed
24
     */
25
    public function getPrevious()
26
    {
27
        return $this->previous;
28
    }
29
30
    /**
31
     * @param mixed $previous
32
     * @return Path
33
     */
34
    public function setPrevious($previous)
35
    {
36
        $this->previous = $previous;
37
        return $this;
38
    }
39
40
    /**
41
     * @return mixed
42
     */
43
    public function getKey()
44
    {
45
        return $this->key;
46
    }
47
48
    /**
49
     * @param mixed $key
50
     * @return Path
51
     */
52
    public function setKey($key)
53
    {
54
        $this->key = $key;
55
        return $this;
56
    }
57
}