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

Argument   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 49
rs 10
ccs 14
cts 14
cp 1

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getName() 0 4 1
A setName() 0 4 1
A getValue() 0 4 1
A setValue() 0 4 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
}