Completed
Push — master ( 8c19ea...8f4b0a )
by Portey
03:08
created

VariableReference::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * Date: 10/24/16
4
 *
5
 * @author Portey Vasil <[email protected]>
6
 */
7
8
namespace Youshido\GraphQL\Parser\Ast\ArgumentValue;
9
10
11
class VariableReference implements ValueInterface
12
{
13
14
    /** @var  string */
15
    private $name;
16
17
    /** @var  Variable */
18
    private $variable;
19
20
    /** @var  mixed */
21
    private $value;
22
23
    /**
24
     * VariableReference constructor.
25
     *
26
     * @param string        $name
27
     * @param Variable|null $variable
28
     */
29 5
    public function __construct($name, Variable $variable = null)
30
    {
31 5
        $this->name     = $name;
32 5
        $this->variable = $variable;
33 5
    }
34
35 5
    public function getVariable()
36
    {
37 5
        return $this->variable;
38
    }
39
40
    public function getValue()
41
    {
42
        return $this->value;
43
    }
44
45
    public function setValue($value)
46
    {
47
        $this->value = $value;
48
    }
49
50
    /**
51
     * @return string
52
     */
53 1
    public function getName()
54
    {
55 1
        return $this->name;
56
    }
57
}
58