Argument::setValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1
cc 1
nc 1
nop 1
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\Interfaces\ValueInterface;
12
use Youshido\GraphQL\Parser\Location;
13
14 View Code Duplication
class Argument extends AbstractAst
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
15
{
16
17
    /** @var string */
18
    private $name;
19
20
    /** @var ValueInterface */
21
    private $value;
22
23
    /**
24
     * @param string         $name
25
     * @param ValueInterface $value
26
     * @param Location       $location
27
     */
28 58
    public function __construct($name, ValueInterface $value, Location $location)
29
    {
30 58
        parent::__construct($location);
31
32 58
        $this->name  = $name;
33 58
        $this->value = $value;
34 58
    }
35
36
    /**
37
     * @return mixed
38
     */
39 56
    public function getName()
40
    {
41 56
        return $this->name;
42
    }
43
44
    /**
45
     * @param mixed $name
46
     */
47 1
    public function setName($name)
48
    {
49 1
        $this->name = $name;
50 1
    }
51
52
    /**
53
     * @return \Youshido\GraphQL\Parser\Ast\Interfaces\ValueInterface
54
     */
55 42
    public function getValue()
56
    {
57 42
        return $this->value;
58
    }
59
60
    /**
61
     * @param mixed $value
62
     */
63 38
    public function setValue($value)
64
    {
65 38
        $this->value = $value;
66 38
    }
67
68
69
}