Directive::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 4
cp 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * Date: 3/17/17
4
 *
5
 * @author Volodymyr Rashchepkin <[email protected]>
6
 */
7
8
namespace Youshido\GraphQL\Parser\Ast;
9
10
11
use Youshido\GraphQL\Parser\Location;
12
13
class Directive extends AbstractAst
14
{
15
    use AstArgumentsTrait;
16
17
    /** @var string */
18
    private $name;
19
20
21
    /**
22
     * @param string   $name
23
     * @param array    $arguments
24
     * @param Location $location
25
     */
26
    public function __construct($name, array $arguments, Location $location)
27
    {
28
        parent::__construct($location);
29
30
        $this->name = $name;
31
        $this->setArguments($arguments);
32
    }
33
34
    /**
35
     * @return mixed
36
     */
37
    public function getName()
38
    {
39
        return $this->name;
40
    }
41
42
    /**
43
     * @param mixed $name
44
     */
45
    public function setName($name)
46
    {
47
        $this->name = $name;
48
    }
49
50
}
51