Directive   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 38
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

3 Methods

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