Completed
Push — master ( d52ee7...e7842c )
by Alexandr
03:54
created

Argument::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1
Metric Value
dl 0
loc 4
rs 10
ccs 2
cts 2
cp 1
cc 1
eloc 2
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;
9
10
11
use Youshido\GraphQL\Parser\Ast\ArgumentValue\ValueInterface;
12
13
class Argument
14
{
15
16
    /** @var string */
17
    private $name;
18
19
    /** @var ValueInterface */
20
    private $value;
21
22 27
    public function __construct($name, ValueInterface $value)
23
    {
24 27
        $this->name  = $name;
25 27
        $this->value = $value;
26 27
    }
27
28
    /**
29
     * @return mixed
30
     */
31 12
    public function getName()
32
    {
33 12
        return $this->name;
34
    }
35
36
    /**
37
     * @param mixed $name
38
     */
39 1
    public function setName($name)
40
    {
41 1
        $this->name = $name;
42 1
    }
43
44
    /**
45
     * @return ValueInterface
46
     */
47 12
    public function getValue()
48
    {
49 12
        return $this->value;
50
    }
51
52
    /**
53
     * @param mixed $value
54
     */
55 1
    public function setValue($value)
56
    {
57 1
        $this->value = $value;
58 1
    }
59
60
61
}