Literal::getValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * Date: 23.11.15
4
 *
5
 * @author Portey Vasil <[email protected]>
6
 */
7
8
namespace Youshido\GraphQL\Parser\Ast\ArgumentValue;
9
10
11
use Youshido\GraphQL\Parser\Ast\AbstractAst;
12
use Youshido\GraphQL\Parser\Ast\Interfaces\ValueInterface;
13
use Youshido\GraphQL\Parser\Location;
14
15
class Literal extends AbstractAst implements ValueInterface
16
{
17
18
    private $value;
19
20
    /**
21
     * @param mixed $value
22
     * @param Location $location
23
     */
24 37
    public function __construct($value, Location $location)
25
    {
26 37
        parent::__construct($location);
27
28 37
        $this->value = $value;
29 37
    }
30
31 24
    public function getValue()
32
    {
33 24
        return $this->value;
34
    }
35
36
    /**
37
     * @param string $value
38
     */
39 1
    public function setValue($value)
40
    {
41 1
        $this->value = $value;
42 1
    }
43
}
44